]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/two-phase-activation-sharing-interference.nll_target.stderr
implement Hash for proc_macro::LineColumn
[rust.git] / tests / ui / borrowck / two-phase-activation-sharing-interference.nll_target.stderr
1 error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
2   --> $DIR/two-phase-activation-sharing-interference.rs:28:15
3    |
4 LL |     let y = &mut x;
5    |             ------ mutable borrow occurs here
6 LL |     { let z = &x; read(z); }
7    |               ^^ immutable borrow occurs here
8 LL |
9 LL |     *y += 1;
10    |     ------- mutable borrow later used here
11
12 error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
13   --> $DIR/two-phase-activation-sharing-interference.rs:36:13
14    |
15 LL |     let y = &mut x;
16    |             ------ mutable borrow occurs here
17 LL |     let z = &x;
18    |             ^^ immutable borrow occurs here
19 LL |
20 LL |     *y += 1;
21    |     ------- mutable borrow later used here
22
23 error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
24   --> $DIR/two-phase-activation-sharing-interference.rs:47:13
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;
32    |     ------- mutable borrow later used here
33
34 error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
35   --> $DIR/two-phase-activation-sharing-interference.rs:58:14
36    |
37 LL |     let y = &mut x;
38    |             ------ mutable borrow occurs here
39 LL |     let _z = &x;
40    |              ^^ immutable borrow occurs here
41 LL |
42 LL |     *y += 1;
43    |     ------- mutable borrow later used here
44
45 error: aborting due to 4 previous errors
46
47 For more information about this error, try `rustc --explain E0502`.