blob: b3c86a56091d266096ca57d69554016fab16fdf9 [file] [log] [blame]
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/borrowck-mut-borrow-linear-errors.rs:23:30
|
LL | 1 => { addr.push(&mut x); } //[ast]~ ERROR [E0499]
| ---- ^^^^^^ second mutable borrow occurs here
| |
| borrow used here in later iteration of loop
...
LL | _ => { addr.push(&mut x); } //[ast]~ ERROR [E0499]
| ------ first mutable borrow occurs here
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/borrowck-mut-borrow-linear-errors.rs:25:30
|
LL | 1 => { addr.push(&mut x); } //[ast]~ ERROR [E0499]
| ---- borrow used here in later iteration of loop
LL | //[mir]~^ ERROR [E0499]
LL | 2 => { addr.push(&mut x); } //[ast]~ ERROR [E0499]
| ^^^^^^ second mutable borrow occurs here
LL | //[mir]~^ ERROR [E0499]
LL | _ => { addr.push(&mut x); } //[ast]~ ERROR [E0499]
| ------ first mutable borrow occurs here
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/borrowck-mut-borrow-linear-errors.rs:27:30
|
LL | _ => { addr.push(&mut x); } //[ast]~ ERROR [E0499]
| ^^^^^^ mutable borrow starts here in previous iteration of loop
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0499`.