]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-match-binding-is-assignment.stderr
Rollup merge of #106321 - compiler-errors:delayed-bug-backtrace, r=Nilstrieb
[rust.git] / tests / ui / borrowck / borrowck-match-binding-is-assignment.stderr
1 error[E0384]: cannot assign twice to immutable variable `x`
2   --> $DIR/borrowck-match-binding-is-assignment.rs:14:13
3    |
4 LL |         x => {
5    |         -
6    |         |
7    |         first assignment to `x`
8    |         help: consider making this binding mutable: `mut x`
9 LL |             x += 1;
10    |             ^^^^^^ cannot assign twice to immutable variable
11
12 error[E0384]: cannot assign twice to immutable variable `x`
13   --> $DIR/borrowck-match-binding-is-assignment.rs:20:13
14    |
15 LL |         E::Foo(x) => {
16    |                -
17    |                |
18    |                first assignment to `x`
19    |                help: consider making this binding mutable: `mut x`
20 LL |             x += 1;
21    |             ^^^^^^ cannot assign twice to immutable variable
22
23 error[E0384]: cannot assign twice to immutable variable `x`
24   --> $DIR/borrowck-match-binding-is-assignment.rs:26:13
25    |
26 LL |         S { bar: x } => {
27    |                  -
28    |                  |
29    |                  first assignment to `x`
30    |                  help: consider making this binding mutable: `mut x`
31 LL |             x += 1;
32    |             ^^^^^^ cannot assign twice to immutable variable
33
34 error[E0384]: cannot assign twice to immutable variable `x`
35   --> $DIR/borrowck-match-binding-is-assignment.rs:32:13
36    |
37 LL |         (x,) => {
38    |          -
39    |          |
40    |          first assignment to `x`
41    |          help: consider making this binding mutable: `mut x`
42 LL |             x += 1;
43    |             ^^^^^^ cannot assign twice to immutable variable
44
45 error[E0384]: cannot assign twice to immutable variable `x`
46   --> $DIR/borrowck-match-binding-is-assignment.rs:38:13
47    |
48 LL |         [x,_,_] => {
49    |          -
50    |          |
51    |          first assignment to `x`
52    |          help: consider making this binding mutable: `mut x`
53 LL |             x += 1;
54    |             ^^^^^^ cannot assign twice to immutable variable
55
56 error: aborting due to 5 previous errors
57
58 For more information about this error, try `rustc --explain E0384`.