| error: this `else { if .. }` block can be collapsed |
| --> tests/ui/collapsible_else_if.rs:10:12 |
| | |
| LL | } else { |
| | ____________^ |
| LL | | if y == "world" { |
| LL | | println!("world!") |
| LL | | } |
| LL | | } |
| | |_____^ |
| | |
| = note: `-D clippy::collapsible-else-if` implied by `-D warnings` |
| = help: to override `-D warnings` add `#[allow(clippy::collapsible_else_if)]` |
| help: collapse nested if block |
| | |
| LL ~ } else if y == "world" { |
| LL + println!("world!") |
| LL + } |
| | |
| |
| error: this `else { if .. }` block can be collapsed |
| --> tests/ui/collapsible_else_if.rs:19:12 |
| | |
| LL | } else { |
| | ____________^ |
| LL | | if let Some(42) = Some(42) { |
| LL | | println!("world!") |
| LL | | } |
| LL | | } |
| | |_____^ |
| | |
| help: collapse nested if block |
| | |
| LL ~ } else if let Some(42) = Some(42) { |
| LL + println!("world!") |
| LL + } |
| | |
| |
| error: this `else { if .. }` block can be collapsed |
| --> tests/ui/collapsible_else_if.rs:28:12 |
| | |
| LL | } else { |
| | ____________^ |
| LL | | if y == "world" { |
| LL | | println!("world") |
| ... | |
| LL | | } |
| | |_____^ |
| | |
| help: collapse nested if block |
| | |
| LL ~ } else if y == "world" { |
| LL + println!("world") |
| LL + } |
| LL + else { |
| LL + println!("!") |
| LL + } |
| | |
| |
| error: this `else { if .. }` block can be collapsed |
| --> tests/ui/collapsible_else_if.rs:40:12 |
| | |
| LL | } else { |
| | ____________^ |
| LL | | if let Some(42) = Some(42) { |
| LL | | println!("world") |
| ... | |
| LL | | } |
| | |_____^ |
| | |
| help: collapse nested if block |
| | |
| LL ~ } else if let Some(42) = Some(42) { |
| LL + println!("world") |
| LL + } |
| LL + else { |
| LL + println!("!") |
| LL + } |
| | |
| |
| error: this `else { if .. }` block can be collapsed |
| --> tests/ui/collapsible_else_if.rs:52:12 |
| | |
| LL | } else { |
| | ____________^ |
| LL | | if let Some(42) = Some(42) { |
| LL | | println!("world") |
| ... | |
| LL | | } |
| | |_____^ |
| | |
| help: collapse nested if block |
| | |
| LL ~ } else if let Some(42) = Some(42) { |
| LL + println!("world") |
| LL + } |
| LL + else { |
| LL + println!("!") |
| LL + } |
| | |
| |
| error: this `else { if .. }` block can be collapsed |
| --> tests/ui/collapsible_else_if.rs:64:12 |
| | |
| LL | } else { |
| | ____________^ |
| LL | | if x == "hello" { |
| LL | | println!("world") |
| ... | |
| LL | | } |
| | |_____^ |
| | |
| help: collapse nested if block |
| | |
| LL ~ } else if x == "hello" { |
| LL + println!("world") |
| LL + } |
| LL + else { |
| LL + println!("!") |
| LL + } |
| | |
| |
| error: this `else { if .. }` block can be collapsed |
| --> tests/ui/collapsible_else_if.rs:76:12 |
| | |
| LL | } else { |
| | ____________^ |
| LL | | if let Some(42) = Some(42) { |
| LL | | println!("world") |
| ... | |
| LL | | } |
| | |_____^ |
| | |
| help: collapse nested if block |
| | |
| LL ~ } else if let Some(42) = Some(42) { |
| LL + println!("world") |
| LL + } |
| LL + else { |
| LL + println!("!") |
| LL + } |
| | |
| |
| error: this `else { if .. }` block can be collapsed |
| --> tests/ui/collapsible_else_if.rs:92:12 |
| | |
| LL | } else { |
| | ____________^ |
| LL | | if let Some(42) = Some(42) { |
| LL | | println!("42"); |
| LL | | } |
| LL | | } |
| | |_____^ |
| | |
| help: collapse nested if block |
| | |
| LL ~ } else if let Some(42) = Some(42) { |
| LL + println!("42"); |
| LL + } |
| | |
| |
| error: this `else { if .. }` block can be collapsed |
| --> tests/ui/collapsible_else_if.rs:127:10 |
| | |
| LL | }else{ |
| | __________^ |
| LL | | if false {} |
| LL | | } |
| | |_____^ help: collapse nested if block: `if false {}` |
| |
| error: this `else { if .. }` block can be collapsed |
| --> tests/ui/collapsible_else_if.rs:166:12 |
| | |
| LL | } else { |
| | ____________^ |
| LL | | (if y == "world" { println!("world") } else { println!("!") }) |
| LL | | } |
| | |_____^ help: collapse nested if block: `if y == "world" { println!("world") } else { println!("!") }` |
| |
| error: this `else { if .. }` block can be collapsed |
| --> tests/ui/collapsible_else_if.rs:197:12 |
| | |
| LL | } else{ |
| | ___________^ |
| LL | | if y == "world" { |
| LL | | println!("LRM world"); |
| LL | | } |
| LL | | } |
| | |_____^ |
| | |
| help: collapse nested if block |
| | |
| LL ~ } else if y == "world" { |
| LL + println!("LRM world"); |
| LL + } |
| | |
| |
| error: this `else { if .. }` block can be collapsed |
| --> tests/ui/collapsible_else_if.rs:207:12 |
| | |
| LL | } else{ |
| | ___________^ |
| LL | | if y == "world" { |
| LL | | println!("RLM world"); |
| LL | | } |
| LL | | } |
| | |_____^ |
| | |
| help: collapse nested if block |
| | |
| LL ~ } else if y == "world" { |
| LL + println!("RLM world"); |
| LL + } |
| | |
| |
| error: aborting due to 12 previous errors |
| |