]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/collapsible_if.stderr
Merge commit '7248d06384c6a90de58c04c1f46be88821278d8b' into sync-from-clippy
[rust.git] / src / tools / clippy / tests / ui / collapsible_if.stderr
index acd1ec3f2caeaf6a924529a5f1d9307e8ca9075a..6327444df21d7641a151decebff28f3dcbca3a61 100644 (file)
@@ -11,9 +11,9 @@ LL | |     }
    = note: `-D clippy::collapsible-if` implied by `-D warnings`
 help: collapse nested if block
    |
-LL |     if x == "hello" && y == "world" {
-LL |         println!("Hello world!");
-LL |     }
+LL ~     if x == "hello" && y == "world" {
+LL +         println!("Hello world!");
+LL +     }
    |
 
 error: this `if` statement can be collapsed
@@ -28,9 +28,9 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     if (x == "hello" || x == "world") && (y == "world" || y == "hello") {
-LL |         println!("Hello world!");
-LL |     }
+LL ~     if (x == "hello" || x == "world") && (y == "world" || y == "hello") {
+LL +         println!("Hello world!");
+LL +     }
    |
 
 error: this `if` statement can be collapsed
@@ -45,9 +45,9 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     if x == "hello" && x == "world" && (y == "world" || y == "hello") {
-LL |         println!("Hello world!");
-LL |     }
+LL ~     if x == "hello" && x == "world" && (y == "world" || y == "hello") {
+LL +         println!("Hello world!");
+LL +     }
    |
 
 error: this `if` statement can be collapsed
@@ -62,9 +62,9 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     if (x == "hello" || x == "world") && y == "world" && y == "hello" {
-LL |         println!("Hello world!");
-LL |     }
+LL ~     if (x == "hello" || x == "world") && y == "world" && y == "hello" {
+LL +         println!("Hello world!");
+LL +     }
    |
 
 error: this `if` statement can be collapsed
@@ -79,9 +79,9 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     if x == "hello" && x == "world" && y == "world" && y == "hello" {
-LL |         println!("Hello world!");
-LL |     }
+LL ~     if x == "hello" && x == "world" && y == "world" && y == "hello" {
+LL +         println!("Hello world!");
+LL +     }
    |
 
 error: this `if` statement can be collapsed
@@ -96,9 +96,9 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     if 42 == 1337 && 'a' != 'A' {
-LL |         println!("world!")
-LL |     }
+LL ~     if 42 == 1337 && 'a' != 'A' {
+LL +         println!("world!")
+LL +     }
    |
 
 error: this `if` statement can be collapsed
@@ -113,9 +113,9 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     if x == "hello" && y == "world" { // Collapsible
-LL |         println!("Hello world!");
-LL |     }
+LL ~     if x == "hello" && y == "world" { // Collapsible
+LL +         println!("Hello world!");
+LL +     }
    |
 
 error: this `if` statement can be collapsed
@@ -126,5 +126,13 @@ LL | |         if matches!(true, true) {}
 LL | |     }
    | |_____^ help: collapse nested if block: `if matches!(true, true) && matches!(true, true) {}`
 
-error: aborting due to 8 previous errors
+error: this `if` statement can be collapsed
+  --> $DIR/collapsible_if.rs:159:5
+   |
+LL | /     if matches!(true, true) && truth() {
+LL | |         if matches!(true, true) {}
+LL | |     }
+   | |_____^ help: collapse nested if block: `if matches!(true, true) && truth() && matches!(true, true) {}`
+
+error: aborting due to 9 previous errors