]> git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/closure-use-spans.stderr
Update upstream source from tag 'upstream/1.31.0_beta.4+dfsg1'
[rustc.git] / src / test / ui / nll / closure-use-spans.stderr
1 error[E0506]: cannot assign to `x` because it is borrowed
2 --> $DIR/closure-use-spans.rs:17:5
3 |
4 LL | let y = &x;
5 | -- borrow of `x` occurs here
6 LL | x = 0; //~ ERROR
7 | ^^^^^ assignment to borrowed `x` occurs here
8 LL | || *y;
9 | - borrow later captured here by closure
10
11 error[E0506]: cannot assign to `x` because it is borrowed
12 --> $DIR/closure-use-spans.rs:23:5
13 |
14 LL | let y = &mut x;
15 | ------ borrow of `x` occurs here
16 LL | x = 0; //~ ERROR
17 | ^^^^^ assignment to borrowed `x` occurs here
18 LL | || *y = 1;
19 | - borrow later captured here by closure
20
21 error[E0506]: cannot assign to `x` because it is borrowed
22 --> $DIR/closure-use-spans.rs:29:5
23 |
24 LL | let y = &x;
25 | -- borrow of `x` occurs here
26 LL | x = 0; //~ ERROR
27 | ^^^^^ assignment to borrowed `x` occurs here
28 LL | move || *y;
29 | - borrow later captured here by closure
30
31 error: aborting due to 3 previous errors
32
33 For more information about this error, try `rustc --explain E0506`.