全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Borrow checker?

Definition 6.6 University Computer Science — Year 2 · 第 6 章 — Rust: Ownership and Borrowing

The borrow checker is the part of the Rust compiler that checks, for every function, that each value is used only while owned and not moved, and that the borrowing rule holds at every point, using the types of the function’s parameters and results and not the bodies of the functions it calls.

The borrowing rule, for the borrows in use at one point of the program. Two writers, like a writer and a reader, are refused: .
The borrowing rule, for the borrows in use at one point of the program. Two writers, like a writer and a reader, are refused: Output 6.7.
在原文中阅读 →