]> git.proxmox.com Git - rustc.git/blame - src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / unboxed-closures / unboxed-closure-immutable-capture.stderr
CommitLineData
48663c56
XL
1error[E0594]: cannot assign to `x`, as it is not declared as mutable
2 --> $DIR/unboxed-closure-immutable-capture.rs:9:13
b7449926
XL
3 |
4LL | let x = 0;
48663c56
XL
5 | - help: consider changing this to be mutable: `mut x`
6LL | move || x = 1;
7 | ^^^^^ cannot assign
b7449926 8
48663c56
XL
9error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
10 --> $DIR/unboxed-closure-immutable-capture.rs:10:17
b7449926
XL
11 |
12LL | let x = 0;
48663c56
XL
13 | - help: consider changing this to be mutable: `mut x`
14LL | move || x = 1;
15LL | move || set(&mut x);
16 | ^^^^^^ cannot borrow as mutable
b7449926 17
48663c56
XL
18error[E0594]: cannot assign to `x`, as it is not declared as mutable
19 --> $DIR/unboxed-closure-immutable-capture.rs:11:13
b7449926
XL
20 |
21LL | let x = 0;
48663c56 22 | - help: consider changing this to be mutable: `mut x`
b7449926 23...
48663c56
XL
24LL | move || x = 1;
25 | ^^^^^ cannot assign
b7449926 26
48663c56
XL
27error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
28 --> $DIR/unboxed-closure-immutable-capture.rs:12:17
b7449926
XL
29 |
30LL | let x = 0;
48663c56 31 | - help: consider changing this to be mutable: `mut x`
b7449926 32...
48663c56
XL
33LL | move || set(&mut x);
34 | ^^^^^^ cannot borrow as mutable
b7449926 35
48663c56
XL
36error[E0594]: cannot assign to `x`, as it is not declared as mutable
37 --> $DIR/unboxed-closure-immutable-capture.rs:13:8
b7449926
XL
38 |
39LL | let x = 0;
48663c56
XL
40 | - help: consider changing this to be mutable: `mut x`
41...
42LL | || x = 1;
43 | ^^^^^ cannot assign
b7449926 44
48663c56
XL
45error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
46 --> $DIR/unboxed-closure-immutable-capture.rs:14:12
b7449926 47 |
48663c56
XL
48LL | let x = 0;
49 | - help: consider changing this to be mutable: `mut x`
50...
51LL | || set(&mut x);
52 | ^^^^^^ cannot borrow as mutable
b7449926 53
48663c56
XL
54error[E0594]: cannot assign to `x`, as it is not declared as mutable
55 --> $DIR/unboxed-closure-immutable-capture.rs:15:8
b7449926
XL
56 |
57LL | let x = 0;
48663c56 58 | - help: consider changing this to be mutable: `mut x`
b7449926 59...
48663c56
XL
60LL | || x = 1;
61 | ^^^^^ cannot assign
b7449926 62
48663c56
XL
63error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
64 --> $DIR/unboxed-closure-immutable-capture.rs:16:12
b7449926 65 |
48663c56
XL
66LL | let x = 0;
67 | - help: consider changing this to be mutable: `mut x`
68...
69LL | || set(&mut x);
70 | ^^^^^^ cannot borrow as mutable
b7449926
XL
71
72error: aborting due to 8 previous errors
73
60c5eb7d
XL
74Some errors have detailed explanations: E0594, E0596.
75For more information about an error, try `rustc --explain E0594`.