]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-mut-borrow-linear-errors.stderr
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / ui / borrowck / borrowck-mut-borrow-linear-errors.stderr
1 error[E0499]: cannot borrow `x` as mutable more than once at a time
2   --> $DIR/borrowck-mut-borrow-linear-errors.rs:10:30
3    |
4 LL |             1 => { addr.push(&mut x); }
5    |                              ^^^^^^ second mutable borrow occurs here
6 LL |             2 => { addr.push(&mut x); }
7 LL |             _ => { addr.push(&mut x); }
8    |                    -----------------
9    |                    |         |
10    |                    |         first mutable borrow occurs here
11    |                    first borrow later used here
12
13 error[E0499]: cannot borrow `x` as mutable more than once at a time
14   --> $DIR/borrowck-mut-borrow-linear-errors.rs:11:30
15    |
16 LL |             2 => { addr.push(&mut x); }
17    |                              ^^^^^^ second mutable borrow occurs here
18 LL |             _ => { addr.push(&mut x); }
19    |                    -----------------
20    |                    |         |
21    |                    |         first mutable borrow occurs here
22    |                    first borrow later used here
23
24 error[E0499]: cannot borrow `x` as mutable more than once at a time
25   --> $DIR/borrowck-mut-borrow-linear-errors.rs:12:30
26    |
27 LL |             _ => { addr.push(&mut x); }
28    |                    ----------^^^^^^-
29    |                    |         |
30    |                    |         `x` was mutably borrowed here in the previous iteration of the loop
31    |                    first borrow used here, in later iteration of loop
32
33 error: aborting due to 3 previous errors
34
35 For more information about this error, try `rustc --explain E0499`.