]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/two-phase-reservation-sharing-interference-future-compat-lint.nll.stderr
Auto merge of #95689 - lqd:self-profiler, r=wesleywiser
[rust.git] / src / test / ui / borrowck / two-phase-reservation-sharing-interference-future-compat-lint.nll.stderr
1 error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable
2   --> $DIR/two-phase-reservation-sharing-interference-future-compat-lint.rs:13:9
3    |
4 LL |         let shared = &v;
5    |                      -- immutable borrow occurs here
6 LL | 
7 LL |         v.push(shared.len());
8    |         ^^^^^^^------------^
9    |         |      |
10    |         |      immutable borrow later used here
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-future-compat-lint.rs:24:9
15    |
16 LL |         let shared = &v;
17    |                      -- immutable borrow occurs here
18 LL | 
19 LL |         v.push(shared.len());
20    |         ^^^^^^^------------^
21    |         |      |
22    |         |      immutable borrow later used here
23    |         mutable borrow occurs here
24
25 error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable
26   --> $DIR/two-phase-reservation-sharing-interference-future-compat-lint.rs:37:9
27    |
28 LL |         let shared = &v;
29    |                      -- immutable borrow occurs here
30 LL | 
31 LL |         v.push(shared.len());
32    |         ^^^^^^^------------^
33    |         |      |
34    |         |      immutable borrow later used here
35    |         mutable borrow occurs here
36
37 error: aborting due to 3 previous errors
38
39 For more information about this error, try `rustc --explain E0502`.