rust/src/test/ui/issue-42106.stderr

14 lines
505 B
Plaintext
Raw Normal View History

error[E0502]: cannot borrow `*collection` as mutable because `collection` is also borrowed as immutable
--> $DIR/issue-42106.rs:13:5
|
12 | let _a = &collection;
| ---------- immutable borrow occurs here
2017-11-20 12:13:27 +00:00
13 | collection.swap(1, 2); //~ ERROR also borrowed as immutable
| ^^^^^^^^^^ mutable borrow occurs here
14 | }
| - immutable borrow ends here
error: aborting due to previous error
2018-02-19 20:40:25 +00:00
If you want more information on this error, try using "rustc --explain E0502"