]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.nll.stderr
Update output for borrowck=migrate compare mode.
[rust.git] / src / test / ui / unboxed-closures / unboxed-closure-immutable-capture.nll.stderr
1 error[E0594]: cannot assign to `x`, as it is not declared as mutable
2   --> $DIR/unboxed-closure-immutable-capture.rs:19:13
3    |
4 LL |     let x = 0;
5    |         - help: consider changing this to be mutable: `mut x`
6 LL |     move || x = 1; //~ ERROR cannot assign
7    |             ^^^^^ cannot assign
8
9 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
10   --> $DIR/unboxed-closure-immutable-capture.rs:20:17
11    |
12 LL |     let x = 0;
13    |         - help: consider changing this to be mutable: `mut x`
14 LL |     move || x = 1; //~ ERROR cannot assign
15 LL |     move || set(&mut x); //~ ERROR cannot borrow
16    |                 ^^^^^^ cannot borrow as mutable
17
18 error[E0594]: cannot assign to `x`, as it is not declared as mutable
19   --> $DIR/unboxed-closure-immutable-capture.rs:21:13
20    |
21 LL |     let x = 0;
22    |         - help: consider changing this to be mutable: `mut x`
23 ...
24 LL |     move || x = 1; //~ ERROR cannot assign
25    |             ^^^^^ cannot assign
26
27 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
28   --> $DIR/unboxed-closure-immutable-capture.rs:22:17
29    |
30 LL |     let x = 0;
31    |         - help: consider changing this to be mutable: `mut x`
32 ...
33 LL |     move || set(&mut x); //~ ERROR cannot borrow
34    |                 ^^^^^^ cannot borrow as mutable
35
36 warning[E0594]: cannot assign to `x`, as it is not declared as mutable
37   --> $DIR/unboxed-closure-immutable-capture.rs:23:8
38    |
39 LL |     let x = 0;
40    |         - help: consider changing this to be mutable: `mut x`
41 ...
42 LL |     || x = 1; //~ ERROR cannot assign
43    |        ^^^^^ cannot assign
44    |
45    = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
46            It represents potential unsoundness in your code.
47            This warning will become a hard error in the future.
48
49 warning[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
50   --> $DIR/unboxed-closure-immutable-capture.rs:25:12
51    |
52 LL |     let x = 0;
53    |         - help: consider changing this to be mutable: `mut x`
54 ...
55 LL |     || set(&mut x); //~ ERROR cannot assign
56    |            ^^^^^^ cannot borrow as mutable
57    |
58    = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
59            It represents potential unsoundness in your code.
60            This warning will become a hard error in the future.
61
62 warning[E0594]: cannot assign to `x`, as it is not declared as mutable
63   --> $DIR/unboxed-closure-immutable-capture.rs:26:8
64    |
65 LL |     let x = 0;
66    |         - help: consider changing this to be mutable: `mut x`
67 ...
68 LL |     || x = 1; //~ ERROR cannot assign
69    |        ^^^^^ cannot assign
70    |
71    = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
72            It represents potential unsoundness in your code.
73            This warning will become a hard error in the future.
74
75 warning[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
76   --> $DIR/unboxed-closure-immutable-capture.rs:28:12
77    |
78 LL |     let x = 0;
79    |         - help: consider changing this to be mutable: `mut x`
80 ...
81 LL |     || set(&mut x); //~ ERROR cannot assign
82    |            ^^^^^^ cannot borrow as mutable
83    |
84    = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
85            It represents potential unsoundness in your code.
86            This warning will become a hard error in the future.
87
88 error: aborting due to 4 previous errors
89
90 Some errors occurred: E0594, E0596.
91 For more information about an error, try `rustc --explain E0594`.