2018-08-08 14:28:26 +02:00
|
|
|
error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable
|
|
|
|
--> $DIR/regions-adjusted-lvalue-op.rs:24:16
|
|
|
|
|
|
|
|
|
LL | v[0].oh_no(&v); //~ ERROR cannot borrow `v` as immutable because
|
2018-09-29 11:47:47 +01:00
|
|
|
| - ----- ^^ immutable borrow occurs here
|
|
|
|
| | |
|
|
|
|
| | mutable borrow later used by call
|
2018-08-08 14:28:26 +02:00
|
|
|
| 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:16
|
|
|
|
|
|
|
|
|
LL | (*v).oh_no(&v); //~ ERROR cannot borrow `v` as immutable because
|
2018-09-29 11:47:47 +01:00
|
|
|
| - ----- ^^ immutable borrow occurs here
|
|
|
|
| | |
|
|
|
|
| | mutable borrow later used by call
|
|
|
|
| mutable borrow occurs here
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0502`.
|