1 error: unneeded late initalization
2 --> $DIR/needless_late_init.rs:4:5
7 = note: `-D clippy::needless-late-init` implied by `-D warnings`
10 LL | let a = match n {
12 help: remove the assignments from the `match` arms
18 help: add a semicolon after the `match` expression
23 error: unneeded late initalization
24 --> $DIR/needless_late_init.rs:13:5
29 help: declare `b` here
31 LL | let b = if n == 3 {
33 help: remove the assignments from the branches
39 help: add a semicolon after the `if` expression
44 error: unneeded late initalization
45 --> $DIR/needless_late_init.rs:20:5
50 help: declare `c` here
52 LL | let c = if let Some(n) = Some(5) {
54 help: remove the assignments from the branches
60 help: add a semicolon after the `if` expression
65 error: unneeded late initalization
66 --> $DIR/needless_late_init.rs:27:5
71 help: declare `d` here
73 LL | let d = if true {
75 help: remove the assignments from the branches
81 help: add a semicolon after the `if` expression
86 error: unneeded late initalization
87 --> $DIR/needless_late_init.rs:35:5
92 help: declare `e` here
94 LL | let e = if true {
96 help: remove the assignments from the branches
98 LL ~ format!("{} {}", a, b)
100 LL ~ format!("{}", c)
102 help: add a semicolon after the `if` expression
107 error: unneeded late initalization
108 --> $DIR/needless_late_init.rs:42:5
113 help: declare `f` here
115 LL | let f = match 1 {
117 help: remove the assignments from the `match` arms
119 LL - 1 => f = "three",
123 error: unneeded late initalization
124 --> $DIR/needless_late_init.rs:48:5
129 help: declare `g` here
131 LL | let g: usize = if true {
133 help: remove the assignments from the branches
138 help: add a semicolon after the `if` expression
143 error: unneeded late initalization
144 --> $DIR/needless_late_init.rs:63:5
149 help: declare `a` here
151 LL | let a = match n {
153 help: remove the assignments from the `match` arms
159 help: add a semicolon after the `match` expression
164 error: unneeded late initalization
165 --> $DIR/needless_late_init.rs:80:5
170 help: declare `a` here
172 LL | let a = match n {
174 help: remove the assignments from the `match` arms
180 help: add a semicolon after the `match` expression
185 error: aborting due to 9 previous errors