]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.nll2018.stderr
Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyup
[rust.git] / src / test / ui / borrowck / two-phase-reservation-sharing-interference-2.nll2018.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:19:5
3    |
4 LL |     let shared = &v;
5    |                  -- immutable borrow occurs here
6 LL | 
7 LL |     v.extend(shared);
8    |     ^        ------ immutable borrow later used here
9    |     |
10    |     mutable borrow occurs here
11
12 error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable
13   --> $DIR/two-phase-reservation-sharing-interference-2.rs:29:5
14    |
15 LL |     v.extend(&v);
16    |     ^^------^--^
17    |     | |      |
18    |     | |      immutable borrow occurs here
19    |     | immutable borrow later used by call
20    |     mutable borrow occurs here
21
22 error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable
23   --> $DIR/two-phase-reservation-sharing-interference-2.rs:40:5
24    |
25 LL |     let shared = &v;
26    |                  -- immutable borrow occurs here
27 LL | 
28 LL |     v.push(shared.len());
29    |     ^      ------ immutable borrow later used here
30    |     |
31    |     mutable borrow occurs here
32
33 error: aborting due to 3 previous errors
34
35 For more information about this error, try `rustc --explain E0502`.