2018-08-08 07:28:26 -05:00
|
|
|
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
|
2022-04-01 12:13:25 -05:00
|
|
|
--> $DIR/two-phase-activation-sharing-interference.rs:28:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let y = &mut x;
|
|
|
|
| ------ mutable borrow occurs here
|
|
|
|
LL | { let z = &x; read(z); }
|
|
|
|
| ^^ immutable borrow occurs here
|
2019-03-17 04:52:07 -05:00
|
|
|
LL |
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | *y += 1;
|
2018-09-29 05:47:47 -05:00
|
|
|
| ------- mutable borrow later used here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
|
2022-04-01 12:13:25 -05:00
|
|
|
--> $DIR/two-phase-activation-sharing-interference.rs:36:13
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let y = &mut x;
|
|
|
|
| ------ mutable borrow occurs here
|
|
|
|
LL | let z = &x;
|
|
|
|
| ^^ immutable borrow occurs here
|
2019-03-17 04:52:07 -05:00
|
|
|
LL |
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | *y += 1;
|
2018-09-29 05:47:47 -05:00
|
|
|
| ------- mutable borrow later used here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
|
2022-04-01 12:13:25 -05:00
|
|
|
--> $DIR/two-phase-activation-sharing-interference.rs:47:13
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let y = &mut x;
|
|
|
|
| ------ mutable borrow occurs here
|
|
|
|
LL | let z = &x;
|
|
|
|
| ^^ immutable borrow occurs here
|
|
|
|
...
|
|
|
|
LL | *y += 1;
|
2018-09-29 05:47:47 -05:00
|
|
|
| ------- mutable borrow later used here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
|
2022-04-01 12:13:25 -05:00
|
|
|
--> $DIR/two-phase-activation-sharing-interference.rs:58:14
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let y = &mut x;
|
|
|
|
| ------ mutable borrow occurs here
|
|
|
|
LL | let _z = &x;
|
|
|
|
| ^^ immutable borrow occurs here
|
2019-03-17 04:52:07 -05:00
|
|
|
LL |
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | *y += 1;
|
2018-09-29 05:47:47 -05:00
|
|
|
| ------- mutable borrow later used here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0502`.
|