1 error: this if statement can be collapsed
2 --> $DIR/collapsible_if.rs:8:5
5 | _____^ starting here...
12 | |_____^ ...ending here
14 note: lint level defined here
15 --> $DIR/collapsible_if.rs:4:8
17 4 | #[deny(collapsible_if)]
20 | if x == "hello" && y == "world" {
21 | println!("Hello world!");
24 error: this if statement can be collapsed
25 --> $DIR/collapsible_if.rs:17:5
27 17 | if x == "hello" || x == "world" {
28 | _____^ starting here...
35 | |_____^ ...ending here
38 | if (x == "hello" || x == "world") && (y == "world" || y == "hello") {
39 | println!("Hello world!");
42 error: this if statement can be collapsed
43 --> $DIR/collapsible_if.rs:26:5
45 26 | if x == "hello" && x == "world" {
46 | _____^ starting here...
53 | |_____^ ...ending here
56 | if x == "hello" && x == "world" && (y == "world" || y == "hello") {
57 | println!("Hello world!");
60 error: this if statement can be collapsed
61 --> $DIR/collapsible_if.rs:35:5
63 35 | if x == "hello" || x == "world" {
64 | _____^ starting here...
71 | |_____^ ...ending here
74 | if (x == "hello" || x == "world") && y == "world" && y == "hello" {
75 | println!("Hello world!");
78 error: this if statement can be collapsed
79 --> $DIR/collapsible_if.rs:44:5
81 44 | if x == "hello" && x == "world" {
82 | _____^ starting here...
89 | |_____^ ...ending here
92 | if x == "hello" && x == "world" && y == "world" && y == "hello" {
93 | println!("Hello world!");
96 error: this if statement can be collapsed
97 --> $DIR/collapsible_if.rs:53:5
100 | _____^ starting here...
107 | |_____^ ...ending here
110 | if 42 == 1337 && 'a' != 'A' {
114 error: this `else { if .. }` block can be collapsed
115 --> $DIR/collapsible_if.rs:65:12
118 | ____________^ starting here...
125 | |_____^ ...ending here
128 | } else if y == "world" {
132 error: this `else { if .. }` block can be collapsed
133 --> $DIR/collapsible_if.rs:76:12
136 | ____________^ starting here...
143 | |_____^ ...ending here
146 | } else if let Some(42) = Some(42) {
150 error: this `else { if .. }` block can be collapsed
151 --> $DIR/collapsible_if.rs:87:12
154 | ____________^ starting here...
161 | |_____^ ...ending here
164 | } else if y == "world" {
171 error: this `else { if .. }` block can be collapsed
172 --> $DIR/collapsible_if.rs:101:12
175 | ____________^ starting here...
182 | |_____^ ...ending here
185 | } else if let Some(42) = Some(42) {
192 error: this `else { if .. }` block can be collapsed
193 --> $DIR/collapsible_if.rs:115:12
196 | ____________^ starting here...
203 | |_____^ ...ending here
206 | } else if let Some(42) = Some(42) {
213 error: this `else { if .. }` block can be collapsed
214 --> $DIR/collapsible_if.rs:129:12
217 | ____________^ starting here...
224 | |_____^ ...ending here
227 | } else if x == "hello" {
234 error: this `else { if .. }` block can be collapsed
235 --> $DIR/collapsible_if.rs:143:12
238 | ____________^ starting here...
245 | |_____^ ...ending here
248 | } else if let Some(42) = Some(42) {
255 error: aborting due to 13 previous errors