rust/tests/ui/borrowck/borrowck-bad-nested-calls-free.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
818 B
Plaintext
Raw Normal View History

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
|
LL | add(
| --- immutable borrow later used by call
2018-08-08 07:28:26 -05:00
LL | &*a,
| --- immutable borrow occurs here
2019-03-09 06:03:44 -06:00
LL | rewrite(&mut a));
| ^^^^^^ mutable borrow occurs here
2018-08-08 07:28:26 -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
|
LL | add(
| --- immutable borrow later used by call
2018-08-08 07:28:26 -05:00
LL | &*a,
| --- immutable borrow occurs here
2019-03-09 06:03:44 -06:00
LL | rewrite(&mut a));
| ^^^^^^ 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`.