lint-unused-mut-variables.stderr 5.4 KB
Newer Older
M
Matthew Jasper 已提交
1
warning: variable does not need to be mutable
C
Caio 已提交
2
  --> $DIR/lint-unused-mut-variables.rs:9:5
3
   |
C
Caio 已提交
4 5 6 7
LL |     mut a: i32,
   |     ----^
   |     |
   |     help: remove this `mut`
8
   |
V
varkor 已提交
9
note: the lint level is defined here
C
Caio 已提交
10
  --> $DIR/lint-unused-mut-variables.rs:5:9
11
   |
M
Matthew Jasper 已提交
12
LL | #![warn(unused_mut)]
13 14
   |         ^^^^^^^^^^

M
Matthew Jasper 已提交
15
warning: variable does not need to be mutable
C
Caio 已提交
16 17 18 19 20 21 22
  --> $DIR/lint-unused-mut-variables.rs:23:9
   |
LL |         mut a: i32,
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
23 24 25 26 27 28 29 30 31
warning: variable does not need to be mutable
  --> $DIR/lint-unused-mut-variables.rs:14:5
   |
LL |     mut a: i32,
   |     ----^
   |     |
   |     help: remove this `mut`

warning: variable does not need to be mutable
C
Caio 已提交
32 33 34 35 36 37 38
  --> $DIR/lint-unused-mut-variables.rs:29:9
   |
LL |         mut a: i32,
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
39
warning: variable does not need to be mutable
C
Caio 已提交
40 41 42 43 44 45 46
  --> $DIR/lint-unused-mut-variables.rs:39:9
   |
LL |         mut a: i32,
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
47
warning: variable does not need to be mutable
C
Caio 已提交
48 49 50 51 52 53 54
  --> $DIR/lint-unused-mut-variables.rs:48:9
   |
LL |         mut a: i32,
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
55
warning: variable does not need to be mutable
C
Caio 已提交
56 57 58 59 60 61 62
  --> $DIR/lint-unused-mut-variables.rs:57:9
   |
LL |         mut a: i32,
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
63
warning: variable does not need to be mutable
C
Caio 已提交
64 65 66 67 68 69 70
  --> $DIR/lint-unused-mut-variables.rs:62:9
   |
LL |         mut a: i32,
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
71
warning: variable does not need to be mutable
72
  --> $DIR/lint-unused-mut-variables.rs:107:14
C
Caio 已提交
73 74 75 76 77 78
   |
LL |     let x = |mut y: isize| 10;
   |              ----^
   |              |
   |              help: remove this `mut`

M
Matthew Jasper 已提交
79
warning: variable does not need to be mutable
C
Caio 已提交
80
  --> $DIR/lint-unused-mut-variables.rs:69:9
81
   |
V
Vadim Petrochenkov 已提交
82
LL |     let mut a = 3;
83 84 85 86
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
87
warning: variable does not need to be mutable
C
Caio 已提交
88
  --> $DIR/lint-unused-mut-variables.rs:71:9
89
   |
V
Vadim Petrochenkov 已提交
90
LL |     let mut a = 2;
91 92 93 94
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
95
warning: variable does not need to be mutable
C
Caio 已提交
96
  --> $DIR/lint-unused-mut-variables.rs:73:9
97
   |
V
Vadim Petrochenkov 已提交
98
LL |     let mut b = 3;
99 100 101 102
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
103
warning: variable does not need to be mutable
C
Caio 已提交
104
  --> $DIR/lint-unused-mut-variables.rs:75:9
105
   |
V
Vadim Petrochenkov 已提交
106
LL |     let mut a = vec![3];
107 108 109 110
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
111
warning: variable does not need to be mutable
C
Caio 已提交
112
  --> $DIR/lint-unused-mut-variables.rs:77:10
113
   |
V
Vadim Petrochenkov 已提交
114
LL |     let (mut a, b) = (1, 2);
115 116 117 118
   |          ----^
   |          |
   |          help: remove this `mut`

M
Matthew Jasper 已提交
119
warning: variable does not need to be mutable
C
Caio 已提交
120
  --> $DIR/lint-unused-mut-variables.rs:79:9
121
   |
V
Vadim Petrochenkov 已提交
122
LL |     let mut a;
123 124 125 126
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
127
warning: variable does not need to be mutable
C
Caio 已提交
128
  --> $DIR/lint-unused-mut-variables.rs:83:9
129
   |
V
Vadim Petrochenkov 已提交
130
LL |     let mut b;
131 132 133 134
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
135
warning: variable does not need to be mutable
C
Caio 已提交
136
  --> $DIR/lint-unused-mut-variables.rs:92:9
137
   |
V
Vadim Petrochenkov 已提交
138
LL |         mut x => {}
139 140 141 142
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
143
warning: variable does not need to be mutable
144
  --> $DIR/lint-unused-mut-variables.rs:99:10
145
   |
146 147 148 149
LL |         (mut x, 1) |
   |          ----^
   |          |
   |          help: remove this `mut`
150

M
Matthew Jasper 已提交
151
warning: variable does not need to be mutable
152
  --> $DIR/lint-unused-mut-variables.rs:112:9
153
   |
V
Vadim Petrochenkov 已提交
154
LL |     let mut a = &mut 5;
155 156 157 158
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
159
warning: variable does not need to be mutable
160
  --> $DIR/lint-unused-mut-variables.rs:117:9
161
   |
V
Vadim Petrochenkov 已提交
162
LL |     let mut b = (&mut a,);
163 164 165 166
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
167
warning: variable does not need to be mutable
168
  --> $DIR/lint-unused-mut-variables.rs:120:9
169
   |
V
Vadim Petrochenkov 已提交
170
LL |     let mut x = &mut 1;
171 172 173 174
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
175
warning: variable does not need to be mutable
176
  --> $DIR/lint-unused-mut-variables.rs:132:9
177
   |
V
Vadim Petrochenkov 已提交
178
LL |     let mut v : &mut Vec<()> = &mut vec![];
179 180 181 182
   |         ----^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
183
warning: variable does not need to be mutable
184
  --> $DIR/lint-unused-mut-variables.rs:187:9
M
Matthew Jasper 已提交
185 186 187 188 189 190
   |
LL |     let mut raw_address_of_const = 1;
   |         ----^^^^^^^^^^^^^^^^^^^^
   |         |
   |         help: remove this `mut`

M
Matthew Jasper 已提交
191
warning: variable does not need to be mutable
192
  --> $DIR/lint-unused-mut-variables.rs:109:13
193
   |
V
Vadim Petrochenkov 已提交
194
LL |     fn what(mut foo: isize) {}
195 196 197 198
   |             ----^^^
   |             |
   |             help: remove this `mut`

M
Matthew Jasper 已提交
199
warning: variable does not need to be mutable
200
  --> $DIR/lint-unused-mut-variables.rs:127:20
201 202 203 204 205 206 207
   |
LL |     fn mut_ref_arg(mut arg : &mut [u8]) -> &mut [u8] {
   |                    ----^^^
   |                    |
   |                    help: remove this `mut`

error: variable does not need to be mutable
208
  --> $DIR/lint-unused-mut-variables.rs:205:9
209
   |
V
Vadim Petrochenkov 已提交
210
LL |     let mut b = vec![2];
211 212 213 214
   |         ----^
   |         |
   |         help: remove this `mut`
   |
V
varkor 已提交
215
note: the lint level is defined here
216
  --> $DIR/lint-unused-mut-variables.rs:201:8
217 218 219 220
   |
LL | #[deny(unused_mut)]
   |        ^^^^^^^^^^

221
error: aborting due to previous error; 25 warnings emitted
222