1
1
error: variable does not need to be mutable
2
2
--> $DIR/lint-unused-mut-variables.rs:59:14
3
3
|
4
- LL | let x = |mut y: isize| 10; //[lexical] ~ ERROR: variable does not need to be mutable
4
+ LL | let x = |mut y: isize| 10; //~ ERROR: variable does not need to be mutable
5
5
| ----^
6
6
| |
7
7
| help: remove this `mut`
@@ -15,111 +15,111 @@ LL | #![deny(unused_mut)]
15
15
error: variable does not need to be mutable
16
16
--> $DIR/lint-unused-mut-variables.rs:24:9
17
17
|
18
- LL | let mut a = 3; //[lexical] ~ ERROR: variable does not need to be mutable
18
+ LL | let mut a = 3; //~ ERROR: variable does not need to be mutable
19
19
| ----^
20
20
| |
21
21
| help: remove this `mut`
22
22
23
23
error: variable does not need to be mutable
24
24
--> $DIR/lint-unused-mut-variables.rs:26:9
25
25
|
26
- LL | let mut a = 2; //[lexical] ~ ERROR: variable does not need to be mutable
26
+ LL | let mut a = 2; //~ ERROR: variable does not need to be mutable
27
27
| ----^
28
28
| |
29
29
| help: remove this `mut`
30
30
31
31
error: variable does not need to be mutable
32
32
--> $DIR/lint-unused-mut-variables.rs:28:9
33
33
|
34
- LL | let mut b = 3; //[lexical] ~ ERROR: variable does not need to be mutable
34
+ LL | let mut b = 3; //~ ERROR: variable does not need to be mutable
35
35
| ----^
36
36
| |
37
37
| help: remove this `mut`
38
38
39
39
error: variable does not need to be mutable
40
40
--> $DIR/lint-unused-mut-variables.rs:30:9
41
41
|
42
- LL | let mut a = vec![3]; //[lexical] ~ ERROR: variable does not need to be mutable
42
+ LL | let mut a = vec![3]; //~ ERROR: variable does not need to be mutable
43
43
| ----^
44
44
| |
45
45
| help: remove this `mut`
46
46
47
47
error: variable does not need to be mutable
48
48
--> $DIR/lint-unused-mut-variables.rs:32:10
49
49
|
50
- LL | let (mut a, b) = (1, 2); //[lexical] ~ ERROR: variable does not need to be mutable
50
+ LL | let (mut a, b) = (1, 2); //~ ERROR: variable does not need to be mutable
51
51
| ----^
52
52
| |
53
53
| help: remove this `mut`
54
54
55
55
error: variable does not need to be mutable
56
56
--> $DIR/lint-unused-mut-variables.rs:34:9
57
57
|
58
- LL | let mut a; //[lexical] ~ ERROR: variable does not need to be mutable
58
+ LL | let mut a; //~ ERROR: variable does not need to be mutable
59
59
| ----^
60
60
| |
61
61
| help: remove this `mut`
62
62
63
63
error: variable does not need to be mutable
64
64
--> $DIR/lint-unused-mut-variables.rs:38:9
65
65
|
66
- LL | let mut b; //[lexical] ~ ERROR: variable does not need to be mutable
66
+ LL | let mut b; //~ ERROR: variable does not need to be mutable
67
67
| ----^
68
68
| |
69
69
| help: remove this `mut`
70
70
71
71
error: variable does not need to be mutable
72
72
--> $DIR/lint-unused-mut-variables.rs:47:9
73
73
|
74
- LL | mut x => {} //[lexical] ~ ERROR: variable does not need to be mutable
74
+ LL | mut x => {} //~ ERROR: variable does not need to be mutable
75
75
| ----^
76
76
| |
77
77
| help: remove this `mut`
78
78
79
79
error: variable does not need to be mutable
80
80
--> $DIR/lint-unused-mut-variables.rs:51:8
81
81
|
82
- LL | (mut x, 1) | //[lexical] ~ ERROR: variable does not need to be mutable
82
+ LL | (mut x, 1) | //~ ERROR: variable does not need to be mutable
83
83
| ----^
84
84
| |
85
85
| help: remove this `mut`
86
86
87
87
error: variable does not need to be mutable
88
88
--> $DIR/lint-unused-mut-variables.rs:64:9
89
89
|
90
- LL | let mut a = &mut 5; //[lexical] ~ ERROR: variable does not need to be mutable
90
+ LL | let mut a = &mut 5; //~ ERROR: variable does not need to be mutable
91
91
| ----^
92
92
| |
93
93
| help: remove this `mut`
94
94
95
95
error: variable does not need to be mutable
96
96
--> $DIR/lint-unused-mut-variables.rs:69:9
97
97
|
98
- LL | let mut b = (&mut a,); //[lexical] ~ ERROR: variable does not need to be mutable
98
+ LL | let mut b = (&mut a,); //~ ERROR: variable does not need to be mutable
99
99
| ----^
100
100
| |
101
101
| help: remove this `mut`
102
102
103
103
error: variable does not need to be mutable
104
104
--> $DIR/lint-unused-mut-variables.rs:72:9
105
105
|
106
- LL | let mut x = &mut 1; //[lexical] ~ ERROR: variable does not need to be mutable
106
+ LL | let mut x = &mut 1; //~ ERROR: variable does not need to be mutable
107
107
| ----^
108
108
| |
109
109
| help: remove this `mut`
110
110
111
111
error: variable does not need to be mutable
112
112
--> $DIR/lint-unused-mut-variables.rs:84:9
113
113
|
114
- LL | let mut v : &mut Vec<()> = &mut vec![]; //[lexical] ~ ERROR: variable does not need to be mutable
114
+ LL | let mut v : &mut Vec<()> = &mut vec![]; //~ ERROR: variable does not need to be mutable
115
115
| ----^
116
116
| |
117
117
| help: remove this `mut`
118
118
119
119
error: variable does not need to be mutable
120
120
--> $DIR/lint-unused-mut-variables.rs:61:13
121
121
|
122
- LL | fn what(mut foo: isize) {} //[lexical] ~ ERROR: variable does not need to be mutable
122
+ LL | fn what(mut foo: isize) {} //~ ERROR: variable does not need to be mutable
123
123
| ----^^^
124
124
| |
125
125
| help: remove this `mut`
@@ -135,7 +135,7 @@ LL | fn mut_ref_arg(mut arg : &mut [u8]) -> &mut [u8] {
135
135
error: variable does not need to be mutable
136
136
--> $DIR/lint-unused-mut-variables.rs:143:9
137
137
|
138
- LL | let mut b = vec![2]; //[lexical] ~ ERROR: variable does not need to be mutable
138
+ LL | let mut b = vec![2]; //~ ERROR: variable does not need to be mutable
139
139
| ----^
140
140
| |
141
141
| help: remove this `mut`
0 commit comments