1 error: this if statement can be collapsed
2 --> $DIR/collapsible_if.rs:9:5
4 LL | / if x == "hello" {
5 LL | | if y == "world" {
6 LL | | println!("Hello world!");
11 = note: `-D clippy::collapsible-if` implied by `-D warnings`
14 LL | if x == "hello" && y == "world" {
15 LL | println!("Hello world!");
19 error: this if statement can be collapsed
20 --> $DIR/collapsible_if.rs:15:5
22 LL | / if x == "hello" || x == "world" {
23 LL | | if y == "world" || y == "hello" {
24 LL | | println!("Hello world!");
30 LL | if (x == "hello" || x == "world") && (y == "world" || y == "hello") {
31 LL | println!("Hello world!");
35 error: this if statement can be collapsed
36 --> $DIR/collapsible_if.rs:21:5
38 LL | / if x == "hello" && x == "world" {
39 LL | | if y == "world" || y == "hello" {
40 LL | | println!("Hello world!");
46 LL | if x == "hello" && x == "world" && (y == "world" || y == "hello") {
47 LL | println!("Hello world!");
51 error: this if statement can be collapsed
52 --> $DIR/collapsible_if.rs:27:5
54 LL | / if x == "hello" || x == "world" {
55 LL | | if y == "world" && y == "hello" {
56 LL | | println!("Hello world!");
62 LL | if (x == "hello" || x == "world") && y == "world" && y == "hello" {
63 LL | println!("Hello world!");
67 error: this if statement can be collapsed
68 --> $DIR/collapsible_if.rs:33:5
70 LL | / if x == "hello" && x == "world" {
71 LL | | if y == "world" && y == "hello" {
72 LL | | println!("Hello world!");
78 LL | if x == "hello" && x == "world" && y == "world" && y == "hello" {
79 LL | println!("Hello world!");
83 error: this if statement can be collapsed
84 --> $DIR/collapsible_if.rs:39:5
86 LL | / if 42 == 1337 {
87 LL | | if 'a' != 'A' {
88 LL | | println!("world!")
94 LL | if 42 == 1337 && 'a' != 'A' {
95 LL | println!("world!")
99 error: this `else { if .. }` block can be collapsed
100 --> $DIR/collapsible_if.rs:48:12
104 LL | | if y == "world" {
105 LL | | println!("world!")
111 LL | } else if y == "world" {
112 LL | println!("world!")
116 error: this `else { if .. }` block can be collapsed
117 --> $DIR/collapsible_if.rs:56:12
121 LL | | if let Some(42) = Some(42) {
122 LL | | println!("world!")
128 LL | } else if let Some(42) = Some(42) {
129 LL | println!("world!")
133 error: this `else { if .. }` block can be collapsed
134 --> $DIR/collapsible_if.rs:64:12
138 LL | | if y == "world" {
139 LL | | println!("world")
147 LL | } else if y == "world" {
148 LL | println!("world")
155 error: this `else { if .. }` block can be collapsed
156 --> $DIR/collapsible_if.rs:75:12
160 LL | | if let Some(42) = Some(42) {
161 LL | | println!("world")
169 LL | } else if let Some(42) = Some(42) {
170 LL | println!("world")
177 error: this `else { if .. }` block can be collapsed
178 --> $DIR/collapsible_if.rs:86:12
182 LL | | if let Some(42) = Some(42) {
183 LL | | println!("world")
191 LL | } else if let Some(42) = Some(42) {
192 LL | println!("world")
199 error: this `else { if .. }` block can be collapsed
200 --> $DIR/collapsible_if.rs:97:12
204 LL | | if x == "hello" {
205 LL | | println!("world")
213 LL | } else if x == "hello" {
214 LL | println!("world")
221 error: this `else { if .. }` block can be collapsed
222 --> $DIR/collapsible_if.rs:108:12
226 LL | | if let Some(42) = Some(42) {
227 LL | | println!("world")
235 LL | } else if let Some(42) = Some(42) {
236 LL | println!("world")
243 error: this if statement can be collapsed
244 --> $DIR/collapsible_if.rs:167:5
246 LL | / if x == "hello" {
247 LL | | if y == "world" { // Collapsible
248 LL | | println!("Hello world!");
254 LL | if x == "hello" && y == "world" { // Collapsible
255 LL | println!("Hello world!");
259 error: aborting due to 14 previous errors