fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.4 KiB32 linesraw
1error[E0499]: cannot borrow `x` as mutable more than once at a time
2  --> $DIR/borrowck-mut-borrow-linear-errors.rs:10:30
3   |
4LL |             1 => { addr.push(&mut x); }
5   |                              ^^^^^^ second mutable borrow occurs here
6LL |             2 => { addr.push(&mut x); }
7LL |             _ => { addr.push(&mut x); }
8   |                    ----      ------ first mutable borrow occurs here
9   |                    |
10   |                    first borrow later used here
11
12error[E0499]: cannot borrow `x` as mutable more than once at a time
13  --> $DIR/borrowck-mut-borrow-linear-errors.rs:11:30
14   |
15LL |             2 => { addr.push(&mut x); }
16   |                              ^^^^^^ second mutable borrow occurs here
17LL |             _ => { addr.push(&mut x); }
18   |                    ----      ------ first mutable borrow occurs here
19   |                    |
20   |                    first borrow later used here
21
22error[E0499]: cannot borrow `x` as mutable more than once at a time
23  --> $DIR/borrowck-mut-borrow-linear-errors.rs:12:30
24   |
25LL |             _ => { addr.push(&mut x); }
26   |                    ----      ^^^^^^ `x` was mutably borrowed here in the previous iteration of the loop
27   |                    |
28   |                    first borrow used here, in later iteration of loop
29
30error: aborting due to 3 previous errors
31
32For more information about this error, try `rustc --explain E0499`.