Rephrase improperly reduced borrows introduction (#352)

Co-authored-by: Yuki Okushi <jtitor@2k36.org>
pull/364/head
Arthur Milchior 3 years ago committed by GitHub
parent 44428ea589
commit 45a76e867a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -73,9 +73,10 @@ care about, but the lifetime system is too coarse-grained to handle that.
## Improperly reduced borrows ## Improperly reduced borrows
The following code fails to compile, because Rust doesn't understand that the borrow The following code fails to compile, because Rust sees that a variable, `map`,
is no longer needed and conservatively falls back to using a whole scope for it. is borrowed twice, and can not infer that the first borrow stops to be needed
This will eventually get fixed. before the second one occurs. This is caused by Rust conservatively falling back
to using a whole scope for the first borow. This will eventually get fixed.
```rust,compile_fail ```rust,compile_fail
# use std::collections::HashMap; # use std::collections::HashMap;

Loading…
Cancel
Save