mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
24 lines
818 B
Plaintext
24 lines
818 B
Plaintext
error[E0502]: cannot borrow `a` as mutable because it is also borrowed as immutable
|
|
--> $DIR/borrowck-bad-nested-calls-free.rs:25:17
|
|
|
|
|
LL | add(
|
|
| --- immutable borrow later used by call
|
|
LL | &*a,
|
|
| --- immutable borrow occurs here
|
|
LL | rewrite(&mut a));
|
|
| ^^^^^^ mutable borrow occurs here
|
|
|
|
error[E0502]: cannot borrow `a` as mutable because it is also borrowed as immutable
|
|
--> $DIR/borrowck-bad-nested-calls-free.rs:32:17
|
|
|
|
|
LL | add(
|
|
| --- immutable borrow later used by call
|
|
LL | &*a,
|
|
| --- immutable borrow occurs here
|
|
LL | rewrite(&mut a));
|
|
| ^^^^^^ mutable borrow occurs here
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0502`.
|