summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/borrowck-match-binding-is-assignment.stderr
blob: dd22d7e2e2ed2986cfa1d023a750d91abae1936d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
error[E0384]: cannot assign twice to immutable variable `x`
  --> $DIR/borrowck-match-binding-is-assignment.rs:14:13
   |
LL |         x => {
   |         -
   |         |
   |         first assignment to `x`
   |         help: consider making this binding mutable: `mut x`
LL |             x += 1;
   |             ^^^^^^ cannot assign twice to immutable variable

error[E0384]: cannot assign twice to immutable variable `x`
  --> $DIR/borrowck-match-binding-is-assignment.rs:20:13
   |
LL |         E::Foo(x) => {
   |                -
   |                |
   |                first assignment to `x`
   |                help: consider making this binding mutable: `mut x`
LL |             x += 1;
   |             ^^^^^^ cannot assign twice to immutable variable

error[E0384]: cannot assign twice to immutable variable `x`
  --> $DIR/borrowck-match-binding-is-assignment.rs:26:13
   |
LL |         S { bar: x } => {
   |                  -
   |                  |
   |                  first assignment to `x`
   |                  help: consider making this binding mutable: `mut x`
LL |             x += 1;
   |             ^^^^^^ cannot assign twice to immutable variable

error[E0384]: cannot assign twice to immutable variable `x`
  --> $DIR/borrowck-match-binding-is-assignment.rs:32:13
   |
LL |         (x,) => {
   |          -
   |          |
   |          first assignment to `x`
   |          help: consider making this binding mutable: `mut x`
LL |             x += 1;
   |             ^^^^^^ cannot assign twice to immutable variable

error[E0384]: cannot assign twice to immutable variable `x`
  --> $DIR/borrowck-match-binding-is-assignment.rs:38:13
   |
LL |         [x,_,_] => {
   |          -
   |          |
   |          first assignment to `x`
   |          help: consider making this binding mutable: `mut x`
LL |             x += 1;
   |             ^^^^^^ cannot assign twice to immutable variable

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0384`.