1 error: unneeded late initialization
2 --> $DIR/needless_late_init.rs:24:5
7 | ^^^^^^^^^^ initialised here
9 = note: `-D clippy::needless-late-init` implied by `-D warnings`
10 help: declare `a` here
15 error: unneeded late initialization
16 --> $DIR/needless_late_init.rs:27:5
22 | ^^^^^ initialised here
24 help: declare `b` here
29 error: unneeded late initialization
30 --> $DIR/needless_late_init.rs:28:5
36 | ^^^^^ initialised here
38 help: declare `c` here
43 error: unneeded late initialization
44 --> $DIR/needless_late_init.rs:32:5
47 | ^^^^^^^^^^^^^ created here
49 | ^^^^^ initialised here
51 help: declare `d` here
53 LL | let d: usize = 1;
56 error: unneeded late initialization
57 --> $DIR/needless_late_init.rs:35:5
61 LL | e = format!("{}", d);
62 | ^^^^^^^^^^^^^^^^^^^^ initialised here
64 help: declare `e` here
66 LL | let e = format!("{}", d);
69 error: unneeded late initialization
70 --> $DIR/needless_late_init.rs:40:5
75 help: declare `a` here
77 LL | let a = match n {
79 help: remove the assignments from the `match` arms
85 help: add a semicolon after the `match` expression
90 error: unneeded late initialization
91 --> $DIR/needless_late_init.rs:49:5
96 help: declare `b` here
98 LL | let b = if n == 3 {
100 help: remove the assignments from the branches
106 help: add a semicolon after the `if` expression
111 error: unneeded late initialization
112 --> $DIR/needless_late_init.rs:56:5
117 help: declare `d` here
119 LL | let d = if true {
121 help: remove the assignments from the branches
127 help: add a semicolon after the `if` expression
132 error: unneeded late initialization
133 --> $DIR/needless_late_init.rs:64:5
138 help: declare `e` here
140 LL | let e = if true {
142 help: remove the assignments from the branches
144 LL ~ format!("{} {}", a, b)
146 LL ~ format!("{}", n)
148 help: add a semicolon after the `if` expression
153 error: unneeded late initialization
154 --> $DIR/needless_late_init.rs:71:5
159 help: declare `f` here
161 LL | let f = match 1 {
163 help: remove the assignments from the `match` arms
165 LL - 1 => f = "three",
169 error: unneeded late initialization
170 --> $DIR/needless_late_init.rs:77:5
175 help: declare `g` here
177 LL | let g: usize = if true {
179 help: remove the assignments from the branches
184 help: add a semicolon after the `if` expression
189 error: unneeded late initialization
190 --> $DIR/needless_late_init.rs:85:5
193 | ^^^^^^ created here
194 LL | let y = SignificantDrop;
196 | ^^^^^ initialised here
198 help: declare `x` here
203 error: unneeded late initialization
204 --> $DIR/needless_late_init.rs:89:5
207 | ^^^^^^ created here
209 LL | x = SignificantDrop;
210 | ^^^^^^^^^^^^^^^^^^^ initialised here
212 help: declare `x` here
214 LL | let x = SignificantDrop;
217 error: unneeded late initialization
218 --> $DIR/needless_late_init.rs:93:5
221 | ^^^^^^ created here
223 LL | x = SignificantDrop;
224 | ^^^^^^^^^^^^^^^^^^^ initialised here
226 help: declare `x` here
228 LL | let x = SignificantDrop;
231 error: unneeded late initialization
232 --> $DIR/needless_late_init.rs:112:5
237 help: declare `a` here
239 LL | let a = match n {
241 help: remove the assignments from the `match` arms
247 help: add a semicolon after the `match` expression
252 error: unneeded late initialization
253 --> $DIR/needless_late_init.rs:129:5
258 help: declare `a` here
260 LL | let a = match n {
262 help: remove the assignments from the `match` arms
268 help: add a semicolon after the `match` expression
273 error: aborting due to 16 previous errors