]> git.proxmox.com Git - rustc.git/blame - src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.stderr
New upstream version 1.37.0+dfsg1
[rustc.git] / src / test / ui / borrowck / borrowck-mut-borrow-linear-errors.stderr
CommitLineData
b7449926 1error[E0499]: cannot borrow `x` as mutable more than once at a time
48663c56 2 --> $DIR/borrowck-mut-borrow-linear-errors.rs:10:30
b7449926 3 |
532ac7d7 4LL | 1 => { addr.push(&mut x); }
dc9dc135 5 | ^^^^^^ second mutable borrow occurs here
48663c56 6LL | 2 => { addr.push(&mut x); }
532ac7d7 7LL | _ => { addr.push(&mut x); }
dc9dc135
XL
8 | ---- ------ first mutable borrow occurs here
9 | |
10 | first borrow later used here
b7449926
XL
11
12error[E0499]: cannot borrow `x` as mutable more than once at a time
48663c56 13 --> $DIR/borrowck-mut-borrow-linear-errors.rs:11:30
b7449926 14 |
532ac7d7 15LL | 2 => { addr.push(&mut x); }
b7449926 16 | ^^^^^^ second mutable borrow occurs here
532ac7d7 17LL | _ => { addr.push(&mut x); }
dc9dc135
XL
18 | ---- ------ first mutable borrow occurs here
19 | |
20 | first borrow later used here
b7449926
XL
21
22error[E0499]: cannot borrow `x` as mutable more than once at a time
48663c56 23 --> $DIR/borrowck-mut-borrow-linear-errors.rs:12:30
b7449926 24 |
532ac7d7 25LL | _ => { addr.push(&mut x); }
b7449926
XL
26 | ^^^^^^ mutable borrow starts here in previous iteration of loop
27
28error: aborting due to 3 previous errors
29
30For more information about this error, try `rustc --explain E0499`.