]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable |
923072b8 | 2 | --> $DIR/two-phase-activation-sharing-interference.rs:28:15 |
b7449926 XL |
3 | | |
4 | LL | let y = &mut x; | |
5 | | ------ mutable borrow occurs here | |
6 | LL | { let z = &x; read(z); } | |
7 | | ^^ immutable borrow occurs here | |
532ac7d7 | 8 | LL | |
b7449926 | 9 | LL | *y += 1; |
0bf4aa26 | 10 | | ------- mutable borrow later used here |
b7449926 XL |
11 | |
12 | error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable | |
923072b8 | 13 | --> $DIR/two-phase-activation-sharing-interference.rs:36:13 |
b7449926 XL |
14 | | |
15 | LL | let y = &mut x; | |
16 | | ------ mutable borrow occurs here | |
17 | LL | let z = &x; | |
18 | | ^^ immutable borrow occurs here | |
532ac7d7 | 19 | LL | |
b7449926 | 20 | LL | *y += 1; |
0bf4aa26 | 21 | | ------- mutable borrow later used here |
b7449926 XL |
22 | |
23 | error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable | |
923072b8 | 24 | --> $DIR/two-phase-activation-sharing-interference.rs:47:13 |
b7449926 XL |
25 | | |
26 | LL | let y = &mut x; | |
27 | | ------ mutable borrow occurs here | |
28 | LL | let z = &x; | |
29 | | ^^ immutable borrow occurs here | |
30 | ... | |
31 | LL | *y += 1; | |
0bf4aa26 | 32 | | ------- mutable borrow later used here |
b7449926 XL |
33 | |
34 | error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable | |
923072b8 | 35 | --> $DIR/two-phase-activation-sharing-interference.rs:58:14 |
b7449926 XL |
36 | | |
37 | LL | let y = &mut x; | |
38 | | ------ mutable borrow occurs here | |
39 | LL | let _z = &x; | |
40 | | ^^ immutable borrow occurs here | |
532ac7d7 | 41 | LL | |
b7449926 | 42 | LL | *y += 1; |
0bf4aa26 | 43 | | ------- mutable borrow later used here |
b7449926 XL |
44 | |
45 | error: aborting due to 4 previous errors | |
46 | ||
47 | For more information about this error, try `rustc --explain E0502`. |