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!");
31 LL | if (x == "hello" || x == "world") && (y == "world" || y == "hello") {
32 LL | println!("Hello world!");
36 error: this if statement can be collapsed
37 --> $DIR/collapsible_if.rs:21:5
39 LL | / if x == "hello" && x == "world" {
40 LL | | if y == "world" || y == "hello" {
41 LL | | println!("Hello world!");
48 LL | if x == "hello" && x == "world" && (y == "world" || y == "hello") {
49 LL | println!("Hello world!");
53 error: this if statement can be collapsed
54 --> $DIR/collapsible_if.rs:27:5
56 LL | / if x == "hello" || x == "world" {
57 LL | | if y == "world" && y == "hello" {
58 LL | | println!("Hello world!");
65 LL | if (x == "hello" || x == "world") && y == "world" && y == "hello" {
66 LL | println!("Hello world!");
70 error: this if statement can be collapsed
71 --> $DIR/collapsible_if.rs:33:5
73 LL | / if x == "hello" && x == "world" {
74 LL | | if y == "world" && y == "hello" {
75 LL | | println!("Hello world!");
82 LL | if x == "hello" && x == "world" && y == "world" && y == "hello" {
83 LL | println!("Hello world!");
87 error: this if statement can be collapsed
88 --> $DIR/collapsible_if.rs:39:5
90 LL | / if 42 == 1337 {
91 LL | | if 'a' != 'A' {
92 LL | | println!("world!")
99 LL | if 42 == 1337 && 'a' != 'A' {
100 LL | println!("world!")
104 error: this `else { if .. }` block can be collapsed
105 --> $DIR/collapsible_if.rs:48:12
109 LL | | if y == "world" {
110 LL | | println!("world!")
117 LL | } else if y == "world" {
118 LL | println!("world!")
122 error: this `else { if .. }` block can be collapsed
123 --> $DIR/collapsible_if.rs:56:12
127 LL | | if let Some(42) = Some(42) {
128 LL | | println!("world!")
135 LL | } else if let Some(42) = Some(42) {
136 LL | println!("world!")
140 error: this `else { if .. }` block can be collapsed
141 --> $DIR/collapsible_if.rs:64:12
145 LL | | if y == "world" {
146 LL | | println!("world")
155 LL | } else if y == "world" {
156 LL | println!("world")
163 error: this `else { if .. }` block can be collapsed
164 --> $DIR/collapsible_if.rs:75:12
168 LL | | if let Some(42) = Some(42) {
169 LL | | println!("world")
178 LL | } else if let Some(42) = Some(42) {
179 LL | println!("world")
186 error: this `else { if .. }` block can be collapsed
187 --> $DIR/collapsible_if.rs:86:12
191 LL | | if let Some(42) = Some(42) {
192 LL | | println!("world")
201 LL | } else if let Some(42) = Some(42) {
202 LL | println!("world")
209 error: this `else { if .. }` block can be collapsed
210 --> $DIR/collapsible_if.rs:97:12
214 LL | | if x == "hello" {
215 LL | | println!("world")
224 LL | } else if x == "hello" {
225 LL | println!("world")
232 error: this `else { if .. }` block can be collapsed
233 --> $DIR/collapsible_if.rs:108:12
237 LL | | if let Some(42) = Some(42) {
238 LL | | println!("world")
247 LL | } else if let Some(42) = Some(42) {
248 LL | println!("world")
255 error: this if statement can be collapsed
256 --> $DIR/collapsible_if.rs:167:5
258 LL | / if x == "hello" {
259 LL | | if y == "world" { // Collapsible
260 LL | | println!("Hello world!");
267 LL | if x == "hello" && y == "world" { // Collapsible
268 LL | println!("Hello world!");
272 error: aborting due to 14 previous errors