blob: 77c637b7b4e97b844fdcdfb418b83b6bce3b5dc2 [file] [log] [blame]
error[E0502]: cannot borrow `a` as mutable because it is also borrowed as immutable
--> $DIR/borrowck-bad-nested-calls-free.rs:35:17
|
LL | add(
| --- immutable borrow later used by call
LL | &*a,
| --- immutable borrow occurs here
LL | rewrite(&mut a)); //~ ERROR cannot borrow
| ^^^^^^ 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:42:17
|
LL | add(
| --- immutable borrow later used by call
LL | &*a,
| --- immutable borrow occurs here
LL | rewrite(&mut a)); //~ ERROR cannot borrow
| ^^^^^^ mutable borrow occurs here
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0502`.