fork/rust

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

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
1.2 KiB35 linesraw
1error[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   |
4LL |     let shared = &v;
5   |                  -- immutable borrow occurs here
6LL | 
7LL |     v.extend(shared);
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-2.rs:29:5
14   |
15LL |     v.extend(&v);
16   |     ^^------^--^
17   |     | |      |
18   |     | |      immutable borrow occurs here
19   |     | immutable borrow later used by call
20   |     mutable borrow occurs here
21
22error[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   |
25LL |     let shared = &v;
26   |                  -- immutable borrow occurs here
27LL | 
28LL |     v.push(shared.len());
29   |     ^      ------ immutable borrow later used here
30   |     |
31   |     mutable borrow occurs here
32
33error: aborting due to 3 previous errors
34
35For more information about this error, try `rustc --explain E0502`.