rust/src/test/ui/regions/regions-adjusted-lvalue-op.stderr

22 lines
850 B
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable
--> $DIR/regions-adjusted-lvalue-op.rs:24:17
|
LL | v[0].oh_no(&v); //~ ERROR cannot borrow `v` as immutable because
| - ^- mutable borrow ends here
| | |
| | immutable borrow occurs here
| mutable borrow occurs here
error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable
--> $DIR/regions-adjusted-lvalue-op.rs:25:17
|
LL | (*v).oh_no(&v); //~ ERROR cannot borrow `v` as immutable because
| - ^- mutable borrow ends here
| | |
| | immutable borrow occurs here
| mutable borrow occurs here
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0502`.