1 error: this if statement can be collapsed
2 --> $DIR/collapsible_if.rs:8:5
5 | _____^ starting here...
9 12 | | if y == "world" {
10 13 | | println!("Hello world!");
13 | |_____^ ...ending here
15 note: lint level defined here
16 --> $DIR/collapsible_if.rs:4:8
18 4 | #[deny(collapsible_if)]
21 | if x == "hello" && y == "world" {
22 | println!("Hello world!");
25 error: this if statement can be collapsed
26 --> $DIR/collapsible_if.rs:17:5
28 17 | if x == "hello" || x == "world" {
29 | _____^ starting here...
33 21 | | if y == "world" || y == "hello" {
34 22 | | println!("Hello world!");
37 | |_____^ ...ending here
40 | if (x == "hello" || x == "world") && (y == "world" || y == "hello") {
41 | println!("Hello world!");
44 error: this if statement can be collapsed
45 --> $DIR/collapsible_if.rs:26:5
47 26 | if x == "hello" && x == "world" {
48 | _____^ starting here...
52 30 | | if y == "world" || y == "hello" {
53 31 | | println!("Hello world!");
56 | |_____^ ...ending here
59 | if x == "hello" && x == "world" && (y == "world" || y == "hello") {
60 | println!("Hello world!");
63 error: this if statement can be collapsed
64 --> $DIR/collapsible_if.rs:35:5
66 35 | if x == "hello" || x == "world" {
67 | _____^ starting here...
71 39 | | if y == "world" && y == "hello" {
72 40 | | println!("Hello world!");
75 | |_____^ ...ending here
78 | if (x == "hello" || x == "world") && y == "world" && y == "hello" {
79 | println!("Hello world!");
82 error: this if statement can be collapsed
83 --> $DIR/collapsible_if.rs:44:5
85 44 | if x == "hello" && x == "world" {
86 | _____^ starting here...
90 48 | | if y == "world" && y == "hello" {
91 49 | | println!("Hello world!");
94 | |_____^ ...ending here
97 | if x == "hello" && x == "world" && y == "world" && y == "hello" {
98 | println!("Hello world!");
101 error: this if statement can be collapsed
102 --> $DIR/collapsible_if.rs:53:5
105 | _____^ starting here...
109 57 | | if 'a' != 'A' {
110 58 | | println!("world!")
113 | |_____^ ...ending here
116 | if 42 == 1337 && 'a' != 'A' {
120 error: this `else { if .. }` block can be collapsed
121 --> $DIR/collapsible_if.rs:65:12
124 | ____________^ starting here...
128 69 | | if y == "world" {
129 70 | | println!("world!")
132 | |_____^ ...ending here
135 | } else if y == "world" {
139 error: this `else { if .. }` block can be collapsed
140 --> $DIR/collapsible_if.rs:76:12
143 | ____________^ starting here...
147 80 | | if let Some(42) = Some(42) {
148 81 | | println!("world!")
151 | |_____^ ...ending here
154 | } else if let Some(42) = Some(42) {
158 error: this `else { if .. }` block can be collapsed
159 --> $DIR/collapsible_if.rs:87:12
165 | } else if y == "world" {
172 error: this `else { if .. }` block can be collapsed
173 --> $DIR/collapsible_if.rs:101:12
179 | } else if let Some(42) = Some(42) {
186 error: this `else { if .. }` block can be collapsed
187 --> $DIR/collapsible_if.rs:115:12
193 | } else if let Some(42) = Some(42) {
200 error: this `else { if .. }` block can be collapsed
201 --> $DIR/collapsible_if.rs:129:12
207 | } else if x == "hello" {
214 error: this `else { if .. }` block can be collapsed
215 --> $DIR/collapsible_if.rs:143:12
221 | } else if let Some(42) = Some(42) {
228 error: aborting due to 13 previous errors