www.fgks.org   »   [go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update loop.md #1404

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Update loop.md
polonius是借用检查器,并非编译器
  • Loading branch information
lewiszlw committed Mar 26, 2024
commit 252e83436245b895559bc19fe86538805bb2d5c7
4 changes: 2 additions & 2 deletions src/compiler/fight-with-compiler/lifetime/loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ fn get_mut(&mut self, name: &String) -> &mut Symbol {

其中的关键就在于返回的时候,新建一个引用,而不是使用中间状态的引用。

## 新编译器 Polonius
## 新借用检查器 Polonius

针对现有编译器存在的各种问题,Rust 团队正在研发一个全新的编译器,名曰[`polonius`](https://github.com/rust-lang/polonius),但是目前它仍然处在开发阶段,如果想在自己项目中使用,需要在`rustc/RUSTFLAGS`中增加标志`-Zpolonius`,但是可能会导致编译速度变慢,或者引入一些新的编译错误。
针对现有借用检查器存在的各种问题,Rust 团队正在研发一个全新的借用检查器,名曰[`polonius`](https://github.com/rust-lang/polonius),但是目前它仍然处在开发阶段,如果想在自己项目中使用,需要在`rustc/RUSTFLAGS`中增加标志`-Zpolonius`,但是可能会导致编译速度变慢,或者引入一些新的编译错误。

## 总结

Expand Down