]> git.proxmox.com Git - rustc.git/blame - src/test/ui/borrowck/two-phase-activation-sharing-interference.nll_target.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / borrowck / two-phase-activation-sharing-interference.nll_target.stderr
CommitLineData
b7449926 1error[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 |
4LL | let y = &mut x;
5 | ------ mutable borrow occurs here
6LL | { let z = &x; read(z); }
7 | ^^ immutable borrow occurs here
532ac7d7 8LL |
b7449926 9LL | *y += 1;
0bf4aa26 10 | ------- mutable borrow later used here
b7449926
XL
11
12error[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 |
15LL | let y = &mut x;
16 | ------ mutable borrow occurs here
17LL | let z = &x;
18 | ^^ immutable borrow occurs here
532ac7d7 19LL |
b7449926 20LL | *y += 1;
0bf4aa26 21 | ------- mutable borrow later used here
b7449926
XL
22
23error[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 |
26LL | let y = &mut x;
27 | ------ mutable borrow occurs here
28LL | let z = &x;
29 | ^^ immutable borrow occurs here
30...
31LL | *y += 1;
0bf4aa26 32 | ------- mutable borrow later used here
b7449926
XL
33
34error[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 |
37LL | let y = &mut x;
38 | ------ mutable borrow occurs here
39LL | let _z = &x;
40 | ^^ immutable borrow occurs here
532ac7d7 41LL |
b7449926 42LL | *y += 1;
0bf4aa26 43 | ------- mutable borrow later used here
b7449926
XL
44
45error: aborting due to 4 previous errors
46
47For more information about this error, try `rustc --explain E0502`.