2019-04-22 02:40:08 -05:00
|
|
|
error[E0502]: cannot borrow `a` as mutable because it is also borrowed as immutable
|
|
|
|
--> $DIR/borrowck-bad-nested-calls-free.rs:25:17
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | add(
|
|
|
|
| --- immutable borrow later used by call
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | &*a,
|
2019-04-22 02:40:08 -05:00
|
|
|
| --- immutable borrow occurs here
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | rewrite(&mut a));
|
2019-04-22 02:40:08 -05:00
|
|
|
| ^^^^^^ mutable borrow occurs here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
error[E0502]: cannot borrow `a` as mutable because it is also borrowed as immutable
|
|
|
|
--> $DIR/borrowck-bad-nested-calls-free.rs:32:17
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | add(
|
|
|
|
| --- immutable borrow later used by call
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | &*a,
|
2019-04-22 02:40:08 -05:00
|
|
|
| --- immutable borrow occurs here
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | rewrite(&mut a));
|
2019-04-22 02:40:08 -05:00
|
|
|
| ^^^^^^ mutable borrow occurs here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0502`.
|