]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/collapsible_if.stderr
iterate List by value
[rust.git] / tests / ui / collapsible_if.stderr
index d6d0b9d5d4eaa276de835167837ef68718173354..6440ff41be81e243da433c4ac3ac7ec67b6bf55a 100644 (file)
@@ -1,4 +1,4 @@
-error: this if statement can be collapsed
+error: this `if` statement can be collapsed
   --> $DIR/collapsible_if.rs:9:5
    |
 LL | /     if x == "hello" {
@@ -12,11 +12,11 @@ LL | |     }
 help: try
    |
 LL |     if x == "hello" && y == "world" {
-LL |     println!("Hello world!");
-LL | }
+LL |         println!("Hello world!");
+LL |     }
    |
 
-error: this if statement can be collapsed
+error: this `if` statement can be collapsed
   --> $DIR/collapsible_if.rs:15:5
    |
 LL | /     if x == "hello" || x == "world" {
@@ -25,14 +25,15 @@ LL | |             println!("Hello world!");
 LL | |         }
 LL | |     }
    | |_____^
+   |
 help: try
    |
 LL |     if (x == "hello" || x == "world") && (y == "world" || y == "hello") {
-LL |     println!("Hello world!");
-LL | }
+LL |         println!("Hello world!");
+LL |     }
    |
 
-error: this if statement can be collapsed
+error: this `if` statement can be collapsed
   --> $DIR/collapsible_if.rs:21:5
    |
 LL | /     if x == "hello" && x == "world" {
@@ -41,14 +42,15 @@ LL | |             println!("Hello world!");
 LL | |         }
 LL | |     }
    | |_____^
+   |
 help: try
    |
 LL |     if x == "hello" && x == "world" && (y == "world" || y == "hello") {
-LL |     println!("Hello world!");
-LL | }
+LL |         println!("Hello world!");
+LL |     }
    |
 
-error: this if statement can be collapsed
+error: this `if` statement can be collapsed
   --> $DIR/collapsible_if.rs:27:5
    |
 LL | /     if x == "hello" || x == "world" {
@@ -57,14 +59,15 @@ LL | |             println!("Hello world!");
 LL | |         }
 LL | |     }
    | |_____^
+   |
 help: try
    |
 LL |     if (x == "hello" || x == "world") && y == "world" && y == "hello" {
-LL |     println!("Hello world!");
-LL | }
+LL |         println!("Hello world!");
+LL |     }
    |
 
-error: this if statement can be collapsed
+error: this `if` statement can be collapsed
   --> $DIR/collapsible_if.rs:33:5
    |
 LL | /     if x == "hello" && x == "world" {
@@ -73,14 +76,15 @@ LL | |             println!("Hello world!");
 LL | |         }
 LL | |     }
    | |_____^
+   |
 help: try
    |
 LL |     if x == "hello" && x == "world" && y == "world" && y == "hello" {
-LL |     println!("Hello world!");
-LL | }
+LL |         println!("Hello world!");
+LL |     }
    |
 
-error: this if statement can be collapsed
+error: this `if` statement can be collapsed
   --> $DIR/collapsible_if.rs:39:5
    |
 LL | /     if 42 == 1337 {
@@ -89,159 +93,16 @@ LL | |             println!("world!")
 LL | |         }
 LL | |     }
    | |_____^
-help: try
-   |
-LL |     if 42 == 1337 && 'a' != 'A' {
-LL |     println!("world!")
-LL | }
-   |
-
-error: this `else { if .. }` block can be collapsed
-  --> $DIR/collapsible_if.rs:48:12
-   |
-LL |       } else {
-   |  ____________^
-LL | |         if y == "world" {
-LL | |             println!("world!")
-LL | |         }
-LL | |     }
-   | |_____^
-help: try
-   |
-LL |     } else if y == "world" {
-LL |     println!("world!")
-LL | }
-   |
-
-error: this `else { if .. }` block can be collapsed
-  --> $DIR/collapsible_if.rs:56:12
-   |
-LL |       } else {
-   |  ____________^
-LL | |         if let Some(42) = Some(42) {
-LL | |             println!("world!")
-LL | |         }
-LL | |     }
-   | |_____^
-help: try
-   |
-LL |     } else if let Some(42) = Some(42) {
-LL |     println!("world!")
-LL | }
-   |
-
-error: this `else { if .. }` block can be collapsed
-  --> $DIR/collapsible_if.rs:64:12
    |
-LL |       } else {
-   |  ____________^
-LL | |         if y == "world" {
-LL | |             println!("world")
-LL | |         }
-...  |
-LL | |         }
-LL | |     }
-   | |_____^
 help: try
    |
-LL |     } else if y == "world" {
-LL |     println!("world")
-LL | }
-LL | else {
-LL |     println!("!")
-LL | }
-   |
-
-error: this `else { if .. }` block can be collapsed
-  --> $DIR/collapsible_if.rs:75:12
-   |
-LL |       } else {
-   |  ____________^
-LL | |         if let Some(42) = Some(42) {
-LL | |             println!("world")
-LL | |         }
-...  |
-LL | |         }
-LL | |     }
-   | |_____^
-help: try
-   |
-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
-  --> $DIR/collapsible_if.rs:86:12
-   |
-LL |       } else {
-   |  ____________^
-LL | |         if let Some(42) = Some(42) {
-LL | |             println!("world")
-LL | |         }
-...  |
-LL | |         }
-LL | |     }
-   | |_____^
-help: try
-   |
-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
-  --> $DIR/collapsible_if.rs:97:12
-   |
-LL |       } else {
-   |  ____________^
-LL | |         if x == "hello" {
-LL | |             println!("world")
-LL | |         }
-...  |
-LL | |         }
-LL | |     }
-   | |_____^
-help: try
-   |
-LL |     } else if x == "hello" {
-LL |     println!("world")
-LL | }
-LL | else {
-LL |     println!("!")
-LL | }
-   |
-
-error: this `else { if .. }` block can be collapsed
-  --> $DIR/collapsible_if.rs:108:12
-   |
-LL |       } else {
-   |  ____________^
-LL | |         if let Some(42) = Some(42) {
-LL | |             println!("world")
-LL | |         }
-...  |
-LL | |         }
-LL | |     }
-   | |_____^
-help: try
-   |
-LL |     } else if let Some(42) = Some(42) {
-LL |     println!("world")
-LL | }
-LL | else {
-LL |     println!("!")
-LL | }
+LL |     if 42 == 1337 && 'a' != 'A' {
+LL |         println!("world!")
+LL |     }
    |
 
-error: this if statement can be collapsed
-  --> $DIR/collapsible_if.rs:167:5
+error: this `if` statement can be collapsed
+  --> $DIR/collapsible_if.rs:95:5
    |
 LL | /     if x == "hello" {
 LL | |         if y == "world" { // Collapsible
@@ -249,12 +110,13 @@ LL | |             println!("Hello world!");
 LL | |         }
 LL | |     }
    | |_____^
+   |
 help: try
    |
 LL |     if x == "hello" && y == "world" { // Collapsible
-LL |     println!("Hello world!");
-LL | }
+LL |         println!("Hello world!");
+LL |     }
    |
 
-error: aborting due to 14 previous errors
+error: aborting due to 7 previous errors