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`
12 help: collapse nested if block
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!");
29 help: collapse nested if block
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!");
46 help: collapse nested if block
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!");
63 help: collapse nested if block
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!");
80 help: collapse nested if block
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!")
97 help: collapse nested if block
99 LL | if 42 == 1337 && 'a' != 'A' {
100 LL | println!("world!")
104 error: this `if` statement can be collapsed
105 --> $DIR/collapsible_if.rs:95:5
107 LL | / if x == "hello" {
108 LL | | if y == "world" { // Collapsible
109 LL | | println!("Hello world!");
114 help: collapse nested if block
116 LL | if x == "hello" && y == "world" { // Collapsible
117 LL | println!("Hello world!");
121 error: this `if` statement can be collapsed
122 --> $DIR/collapsible_if.rs:154:5
124 LL | / if matches!(true, true) {
125 LL | | if matches!(true, true) {}
127 | |_____^ help: collapse nested if block: `if matches!(true, true) && matches!(true, true) {}`
129 error: aborting due to 8 previous errors