]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/two-phase-reservation-sharing-interference-2.stderr
Rollup merge of #106715 - BoxyUwU:new_solver_triagebot, r=lcnr
[rust.git] / tests / ui / borrowck / two-phase-reservation-sharing-interference-2.stderr
1 error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable
2   --> $DIR/two-phase-reservation-sharing-interference-2.rs:11:5
3    |
4 LL |     let shared = &v;
5    |                  -- immutable borrow occurs here
6 LL |
7 LL |     v.extend(shared);
8    |     ^^------^^^^^^^^
9    |     | |
10    |     | immutable borrow later used by call
11    |     mutable borrow occurs here
12
13 error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable
14   --> $DIR/two-phase-reservation-sharing-interference-2.rs:18:5
15    |
16 LL |     v.extend(&v);
17    |     ^^------^--^
18    |     | |      |
19    |     | |      immutable borrow occurs here
20    |     | immutable borrow later used by call
21    |     mutable borrow occurs here
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0502`.