]> git.proxmox.com Git - rustc.git/blame - src/test/ui/lint/lint-unused-mut-variables.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / lint / lint-unused-mut-variables.stderr
CommitLineData
74b04a01 1warning: variable does not need to be mutable
416331ca 2 --> $DIR/lint-unused-mut-variables.rs:9:5
b7449926 3 |
416331ca
XL
4LL | mut a: i32,
5 | ----^
6 | |
7 | help: remove this `mut`
b7449926 8 |
74b04a01 9note: the lint level is defined here
416331ca 10 --> $DIR/lint-unused-mut-variables.rs:5:9
b7449926 11 |
74b04a01 12LL | #![warn(unused_mut)]
b7449926
XL
13 | ^^^^^^^^^^
14
74b04a01 15warning: variable does not need to be mutable
416331ca
XL
16 --> $DIR/lint-unused-mut-variables.rs:23:9
17 |
18LL | mut a: i32,
19 | ----^
20 | |
21 | help: remove this `mut`
22
74b04a01
XL
23warning: variable does not need to be mutable
24 --> $DIR/lint-unused-mut-variables.rs:14:5
25 |
26LL | mut a: i32,
27 | ----^
28 | |
29 | help: remove this `mut`
30
31warning: variable does not need to be mutable
416331ca
XL
32 --> $DIR/lint-unused-mut-variables.rs:29:9
33 |
34LL | mut a: i32,
35 | ----^
36 | |
37 | help: remove this `mut`
38
74b04a01 39warning: variable does not need to be mutable
416331ca
XL
40 --> $DIR/lint-unused-mut-variables.rs:39:9
41 |
42LL | mut a: i32,
43 | ----^
44 | |
45 | help: remove this `mut`
46
74b04a01 47warning: variable does not need to be mutable
416331ca
XL
48 --> $DIR/lint-unused-mut-variables.rs:48:9
49 |
50LL | mut a: i32,
51 | ----^
52 | |
53 | help: remove this `mut`
54
74b04a01 55warning: variable does not need to be mutable
416331ca
XL
56 --> $DIR/lint-unused-mut-variables.rs:57:9
57 |
58LL | mut a: i32,
59 | ----^
60 | |
61 | help: remove this `mut`
62
74b04a01 63warning: variable does not need to be mutable
416331ca
XL
64 --> $DIR/lint-unused-mut-variables.rs:62:9
65 |
66LL | mut a: i32,
67 | ----^
68 | |
69 | help: remove this `mut`
70
74b04a01 71warning: variable does not need to be mutable
f035d41b 72 --> $DIR/lint-unused-mut-variables.rs:107:14
416331ca
XL
73 |
74LL | let x = |mut y: isize| 10;
75 | ----^
76 | |
77 | help: remove this `mut`
78
74b04a01 79warning: variable does not need to be mutable
416331ca 80 --> $DIR/lint-unused-mut-variables.rs:69:9
b7449926 81 |
532ac7d7 82LL | let mut a = 3;
b7449926
XL
83 | ----^
84 | |
85 | help: remove this `mut`
86
74b04a01 87warning: variable does not need to be mutable
416331ca 88 --> $DIR/lint-unused-mut-variables.rs:71:9
b7449926 89 |
532ac7d7 90LL | let mut a = 2;
b7449926
XL
91 | ----^
92 | |
93 | help: remove this `mut`
94
74b04a01 95warning: variable does not need to be mutable
416331ca 96 --> $DIR/lint-unused-mut-variables.rs:73:9
b7449926 97 |
532ac7d7 98LL | let mut b = 3;
b7449926
XL
99 | ----^
100 | |
101 | help: remove this `mut`
102
74b04a01 103warning: variable does not need to be mutable
416331ca 104 --> $DIR/lint-unused-mut-variables.rs:75:9
b7449926 105 |
532ac7d7 106LL | let mut a = vec![3];
b7449926
XL
107 | ----^
108 | |
109 | help: remove this `mut`
110
74b04a01 111warning: variable does not need to be mutable
416331ca 112 --> $DIR/lint-unused-mut-variables.rs:77:10
b7449926 113 |
532ac7d7 114LL | let (mut a, b) = (1, 2);
b7449926
XL
115 | ----^
116 | |
117 | help: remove this `mut`
118
74b04a01 119warning: variable does not need to be mutable
416331ca 120 --> $DIR/lint-unused-mut-variables.rs:79:9
b7449926 121 |
532ac7d7 122LL | let mut a;
b7449926
XL
123 | ----^
124 | |
125 | help: remove this `mut`
126
74b04a01 127warning: variable does not need to be mutable
416331ca 128 --> $DIR/lint-unused-mut-variables.rs:83:9
b7449926 129 |
532ac7d7 130LL | let mut b;
b7449926
XL
131 | ----^
132 | |
133 | help: remove this `mut`
134
74b04a01 135warning: variable does not need to be mutable
416331ca 136 --> $DIR/lint-unused-mut-variables.rs:92:9
b7449926 137 |
532ac7d7 138LL | mut x => {}
b7449926
XL
139 | ----^
140 | |
141 | help: remove this `mut`
142
74b04a01 143warning: variable does not need to be mutable
f035d41b 144 --> $DIR/lint-unused-mut-variables.rs:99:10
b7449926 145 |
f035d41b
XL
146LL | (mut x, 1) |
147 | ----^
148 | |
149 | help: remove this `mut`
b7449926 150
74b04a01 151warning: variable does not need to be mutable
f035d41b 152 --> $DIR/lint-unused-mut-variables.rs:112:9
b7449926 153 |
532ac7d7 154LL | let mut a = &mut 5;
b7449926
XL
155 | ----^
156 | |
157 | help: remove this `mut`
158
74b04a01 159warning: variable does not need to be mutable
f035d41b 160 --> $DIR/lint-unused-mut-variables.rs:117:9
b7449926 161 |
532ac7d7 162LL | let mut b = (&mut a,);
b7449926
XL
163 | ----^
164 | |
165 | help: remove this `mut`
166
74b04a01 167warning: variable does not need to be mutable
f035d41b 168 --> $DIR/lint-unused-mut-variables.rs:120:9
b7449926 169 |
532ac7d7 170LL | let mut x = &mut 1;
b7449926
XL
171 | ----^
172 | |
173 | help: remove this `mut`
174
74b04a01 175warning: variable does not need to be mutable
f035d41b 176 --> $DIR/lint-unused-mut-variables.rs:132:9
b7449926 177 |
532ac7d7 178LL | let mut v : &mut Vec<()> = &mut vec![];
b7449926
XL
179 | ----^
180 | |
181 | help: remove this `mut`
182
74b04a01 183warning: variable does not need to be mutable
f035d41b 184 --> $DIR/lint-unused-mut-variables.rs:187:9
dfeec247
XL
185 |
186LL | let mut raw_address_of_const = 1;
187 | ----^^^^^^^^^^^^^^^^^^^^
188 | |
189 | help: remove this `mut`
190
74b04a01 191warning: variable does not need to be mutable
f035d41b 192 --> $DIR/lint-unused-mut-variables.rs:109:13
b7449926 193 |
532ac7d7 194LL | fn what(mut foo: isize) {}
b7449926
XL
195 | ----^^^
196 | |
197 | help: remove this `mut`
198
74b04a01 199warning: variable does not need to be mutable
f035d41b 200 --> $DIR/lint-unused-mut-variables.rs:127:20
b7449926
XL
201 |
202LL | fn mut_ref_arg(mut arg : &mut [u8]) -> &mut [u8] {
203 | ----^^^
204 | |
205 | help: remove this `mut`
206
207error: variable does not need to be mutable
f035d41b 208 --> $DIR/lint-unused-mut-variables.rs:205:9
b7449926 209 |
532ac7d7 210LL | let mut b = vec![2];
b7449926
XL
211 | ----^
212 | |
213 | help: remove this `mut`
214 |
74b04a01 215note: the lint level is defined here
f035d41b 216 --> $DIR/lint-unused-mut-variables.rs:201:8
b7449926
XL
217 |
218LL | #[deny(unused_mut)]
219 | ^^^^^^^^^^
220
ba9703b0 221error: aborting due to previous error; 25 warnings emitted
b7449926 222