1
1
error[E0384]: cannot assign twice to immutable variable `a`
2
- --> $DIR/mut-ref-mut-2021.rs:7 :5
2
+ --> $DIR/mut-ref-mut-2021.rs:9 :5
3
3
|
4
4
LL | let Foo(a) = Foo(0);
5
5
| -
@@ -10,55 +10,55 @@ LL | a = 42;
10
10
| ^^^^^^ cannot assign twice to immutable variable
11
11
12
12
error[E0384]: cannot assign twice to immutable variable `a`
13
- --> $DIR/mut-ref-mut-2021.rs:13 :5
13
+ --> $DIR/mut-ref-mut-2021.rs:15 :5
14
14
|
15
15
LL | let Foo(ref a) = Foo(0);
16
16
| ----- first assignment to `a`
17
17
LL | a = &42;
18
18
| ^^^^^^^ cannot assign twice to immutable variable
19
19
20
20
error[E0384]: cannot assign twice to immutable variable `a`
21
- --> $DIR/mut-ref-mut-2021.rs:19 :5
21
+ --> $DIR/mut-ref-mut-2021.rs:21 :5
22
22
|
23
23
LL | let Foo(ref mut a) = Foo(0);
24
24
| --------- first assignment to `a`
25
25
LL | a = &mut 42;
26
26
| ^^^^^^^^^^^ cannot assign twice to immutable variable
27
27
28
28
error[E0384]: cannot assign twice to immutable variable `a`
29
- --> $DIR/mut-ref-mut-2021.rs:25 :5
29
+ --> $DIR/mut-ref-mut-2021.rs:27 :5
30
30
|
31
31
LL | let Foo(a) = &Foo(0);
32
32
| - first assignment to `a`
33
33
LL | a = &42;
34
34
| ^^^^^^^ cannot assign twice to immutable variable
35
35
36
36
error[E0384]: cannot assign twice to immutable variable `a`
37
- --> $DIR/mut-ref-mut-2021.rs:31 :5
37
+ --> $DIR/mut-ref-mut-2021.rs:33 :5
38
38
|
39
39
LL | let Foo(ref a) = &Foo(0);
40
40
| ----- first assignment to `a`
41
41
LL | a = &42;
42
42
| ^^^^^^^ cannot assign twice to immutable variable
43
43
44
44
error[E0384]: cannot assign twice to immutable variable `a`
45
- --> $DIR/mut-ref-mut-2021.rs:37 :5
45
+ --> $DIR/mut-ref-mut-2021.rs:39 :5
46
46
|
47
47
LL | let Foo(a) = &mut Foo(0);
48
48
| - first assignment to `a`
49
49
LL | a = &mut 42;
50
50
| ^^^^^^^^^^^ cannot assign twice to immutable variable
51
51
52
52
error[E0384]: cannot assign twice to immutable variable `a`
53
- --> $DIR/mut-ref-mut-2021.rs:43 :5
53
+ --> $DIR/mut-ref-mut-2021.rs:45 :5
54
54
|
55
55
LL | let Foo(ref a) = &mut Foo(0);
56
56
| ----- first assignment to `a`
57
57
LL | a = &42;
58
58
| ^^^^^^^ cannot assign twice to immutable variable
59
59
60
60
error[E0384]: cannot assign twice to immutable variable `a`
61
- --> $DIR/mut-ref-mut-2021.rs:49 :5
61
+ --> $DIR/mut-ref-mut-2021.rs:51 :5
62
62
|
63
63
LL | let Foo(ref mut a) = &mut Foo(0);
64
64
| --------- first assignment to `a`
0 commit comments