]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/if_same_then_else.stderr
iterate List by value
[rust.git] / tests / ui / if_same_then_else.stderr
index b170db31b85331e4fb5d87e4175d59e049c0366a..d9fdf06fa8b732b669f5d3c931b062f4196fcf4b 100644 (file)
@@ -1,5 +1,5 @@
 error: this `if` has identical blocks
-  --> $DIR/if_same_then_else.rs:31:12
+  --> $DIR/if_same_then_else.rs:28:12
    |
 LL |       } else {
    |  ____________^
@@ -13,7 +13,7 @@ LL | |     }
    |
    = note: `-D clippy::if-same-then-else` implied by `-D warnings`
 note: same as this
-  --> $DIR/if_same_then_else.rs:23:13
+  --> $DIR/if_same_then_else.rs:20:13
    |
 LL |       if true {
    |  _____________^
@@ -26,7 +26,7 @@ LL | |     } else {
    | |_____^
 
 error: this `if` has identical blocks
-  --> $DIR/if_same_then_else.rs:69:12
+  --> $DIR/if_same_then_else.rs:66:12
    |
 LL |       } else {
    |  ____________^
@@ -36,7 +36,7 @@ LL | |     };
    | |_____^
    |
 note: same as this
-  --> $DIR/if_same_then_else.rs:67:21
+  --> $DIR/if_same_then_else.rs:64:21
    |
 LL |       let _ = if true {
    |  _____________________^
@@ -45,7 +45,7 @@ LL | |     } else {
    | |_____^
 
 error: this `if` has identical blocks
-  --> $DIR/if_same_then_else.rs:76:12
+  --> $DIR/if_same_then_else.rs:73:12
    |
 LL |       } else {
    |  ____________^
@@ -55,7 +55,7 @@ LL | |     };
    | |_____^
    |
 note: same as this
-  --> $DIR/if_same_then_else.rs:74:21
+  --> $DIR/if_same_then_else.rs:71:21
    |
 LL |       let _ = if true {
    |  _____________________^
@@ -64,7 +64,7 @@ LL | |     } else {
    | |_____^
 
 error: this `if` has identical blocks
-  --> $DIR/if_same_then_else.rs:92:12
+  --> $DIR/if_same_then_else.rs:89:12
    |
 LL |       } else {
    |  ____________^
@@ -74,7 +74,7 @@ LL | |     };
    | |_____^
    |
 note: same as this
-  --> $DIR/if_same_then_else.rs:90:21
+  --> $DIR/if_same_then_else.rs:87:21
    |
 LL |       let _ = if true {
    |  _____________________^
@@ -83,33 +83,7 @@ LL | |     } else {
    | |_____^
 
 error: this `if` has identical blocks
-  --> $DIR/if_same_then_else.rs:106:12
-   |
-LL |       } else {
-   |  ____________^
-LL | |         //~ ERROR same body as `if` block
-LL | |         for _ in &[42] {
-LL | |             let foo: &Option<_> = &Some::<u8>(42);
-...  |
-LL | |         }
-LL | |     }
-   | |_____^
-   |
-note: same as this
-  --> $DIR/if_same_then_else.rs:97:13
-   |
-LL |       if true {
-   |  _____________^
-LL | |         for _ in &[42] {
-LL | |             let foo: &Option<_> = &Some::<u8>(42);
-LL | |             if true {
-...  |
-LL | |         }
-LL | |     } else {
-   | |_____^
-
-error: this `if` has identical blocks
-  --> $DIR/if_same_then_else.rs:125:12
+  --> $DIR/if_same_then_else.rs:101:12
    |
 LL |       } else {
    |  ____________^
@@ -122,7 +96,7 @@ LL | |     }
    | |_____^
    |
 note: same as this
-  --> $DIR/if_same_then_else.rs:118:13
+  --> $DIR/if_same_then_else.rs:94:13
    |
 LL |       if true {
    |  _____________^
@@ -134,81 +108,5 @@ LL | |         bar + 1;
 LL | |     } else {
    | |_____^
 
-error: this `if` has identical blocks
-  --> $DIR/if_same_then_else.rs:155:12
-   |
-LL |       } else {
-   |  ____________^
-LL | |         //~ ERROR same body as `if` block
-LL | |         if let Some(a) = Some(42) {}
-LL | |     }
-   | |_____^
-   |
-note: same as this
-  --> $DIR/if_same_then_else.rs:153:13
-   |
-LL |       if true {
-   |  _____________^
-LL | |         if let Some(a) = Some(42) {}
-LL | |     } else {
-   | |_____^
-
-error: this `if` has identical blocks
-  --> $DIR/if_same_then_else.rs:162:12
-   |
-LL |       } else {
-   |  ____________^
-LL | |         //~ ERROR same body as `if` block
-LL | |         if let (1, .., 3) = (1, 2, 3) {}
-LL | |     }
-   | |_____^
-   |
-note: same as this
-  --> $DIR/if_same_then_else.rs:160:13
-   |
-LL |       if true {
-   |  _____________^
-LL | |         if let (1, .., 3) = (1, 2, 3) {}
-LL | |     } else {
-   | |_____^
-
-error: this `if` has identical blocks
-  --> $DIR/if_same_then_else.rs:212:12
-   |
-LL |       } else {
-   |  ____________^
-LL | |         //~ ERROR same body as `if` block
-LL | |         std::f32::NAN
-LL | |     };
-   | |_____^
-   |
-note: same as this
-  --> $DIR/if_same_then_else.rs:210:21
-   |
-LL |       let _ = if true {
-   |  _____________________^
-LL | |         std::f32::NAN
-LL | |     } else {
-   | |_____^
-
-error: this `if` has identical blocks
-  --> $DIR/if_same_then_else.rs:219:12
-   |
-LL |       } else {
-   |  ____________^
-LL | |         //~ ERROR same body as `if` block
-LL | |         try!(Ok("foo"));
-LL | |     }
-   | |_____^
-   |
-note: same as this
-  --> $DIR/if_same_then_else.rs:217:13
-   |
-LL |       if true {
-   |  _____________^
-LL | |         try!(Ok("foo"));
-LL | |     } else {
-   | |_____^
-
-error: aborting due to 10 previous errors
+error: aborting due to 5 previous errors