]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2005-default-binding-mode/enum.nll.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / rfc-2005-default-binding-mode / enum.nll.stderr
1 error[E0594]: cannot assign to `*x` which is behind a `&` reference
2   --> $DIR/enum.rs:19:5
3    |
4 LL |     *x += 1; //~ ERROR cannot assign to immutable
5    |     ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written
6
7 error[E0594]: cannot assign to `*x` which is behind a `&` reference
8   --> $DIR/enum.rs:23:9
9    |
10 LL |         *x += 1; //~ ERROR cannot assign to immutable
11    |         ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written
12
13 error[E0594]: cannot assign to `*x` which is behind a `&` reference
14   --> $DIR/enum.rs:29:9
15    |
16 LL |         *x += 1; //~ ERROR cannot assign to immutable
17    |         ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written
18
19 error: aborting due to 3 previous errors
20
21 For more information about this error, try `rustc --explain E0594`.