fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.3 KiB36 linesraw
1error[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   |
4LL |         let shared = &v;
5   |                      -- immutable borrow occurs here
6LL | 
7LL |         v.push(shared.len());
8   |         ^      ------ immutable borrow later used here
9   |         |
10   |         mutable borrow occurs here
11
12error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable
13  --> $DIR/two-phase-reservation-sharing-interference-future-compat-lint.rs:24:9
14   |
15LL |         let shared = &v;
16   |                      -- immutable borrow occurs here
17LL | 
18LL |         v.push(shared.len());
19   |         ^      ------ immutable borrow later used here
20   |         |
21   |         mutable borrow occurs here
22
23error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable
24  --> $DIR/two-phase-reservation-sharing-interference-future-compat-lint.rs:37:9
25   |
26LL |         let shared = &v;
27   |                      -- immutable borrow occurs here
28LL | 
29LL |         v.push(shared.len());
30   |         ^      ------ immutable borrow later used here
31   |         |
32   |         mutable borrow occurs here
33
34error: aborting due to 3 previous errors
35
36For more information about this error, try `rustc --explain E0502`.