forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed
ignore-test-compare-mode-nll
from hashmap-lifetimes.rs
by strengthening the test there.
- Loading branch information
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
error[E0502]: cannot borrow `my_stuff` as mutable because it is also borrowed as immutable | ||
--> $DIR/hashmap-lifetimes.rs:18:5 | ||
| | ||
LL | let mut it = my_stuff.iter(); | ||
| -------- immutable borrow occurs here | ||
LL | my_stuff.insert(1, 43); //~ ERROR cannot borrow | ||
| ^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here | ||
LL | it; | ||
| -- borrow later used here | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0502`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters