]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-42106.stderr
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-42106.stderr
CommitLineData
48663c56 1error[E0502]: cannot borrow `*collection` as mutable because it is also borrowed as immutable
0731742a 2 --> $DIR/issue-42106.rs:3:5
abe05a73 3 |
0531ce1d 4LL | let _a = &collection;
48663c56 5 | ----------- immutable borrow occurs here
532ac7d7 6LL | collection.swap(1, 2);
abe05a73 7 | ^^^^^^^^^^ mutable borrow occurs here
94b46f34 8LL | _a.use_ref();
48663c56 9 | -- immutable borrow later used here
abe05a73 10
2c00a5a8 11error: aborting due to previous error
abe05a73 12
0531ce1d 13For more information about this error, try `rustc --explain E0502`.