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
The following code fails to compile, because Rust doesn't understand that the borrow
is no longer needed and conservatively falls back to using a whole scope for it.
This will eventually get fixed.
The following code fails to compile, because Rust sees that a variable, `map`,
is borrowed twice, and can not infer that the first borrow stops to be needed
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
# use std::collections::HashMap;

Loading…
Cancel
Save