33 lines
1.5 KiB
Plaintext
33 lines
1.5 KiB
Plaintext
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`.
|