rust/tests/ui/borrowck/two-phase-reservation-sharing-interference.nll_target.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
529 B
Plaintext
Raw Normal View History

2018-08-08 12:28:26 +00:00
error[E0502]: cannot borrow `vec` as mutable because it is also borrowed as immutable
--> $DIR/two-phase-reservation-sharing-interference.rs:33:17
2018-08-08 12:28:26 +00:00
|
LL | let shared = &vec;
| ---- immutable borrow occurs here
...
LL | delay = &mut vec;
| ^^^^^^^^ mutable borrow occurs here
...
LL | shared[0];
| ------ immutable borrow later used here
2018-08-08 12:28:26 +00:00
error: aborting due to 1 previous error
2018-08-08 12:28:26 +00:00
For more information about this error, try `rustc --explain E0502`.