rust/tests/ui/if_same_then_else.stderr

87 lines
1.8 KiB
Plaintext
Raw Normal View History

error: this `if` has identical blocks
--> $DIR/if_same_then_else.rs:21:13
|
LL | if true {
| _____________^
LL | | Foo { bar: 42 };
LL | | 0..10;
LL | | ..;
... |
LL | | foo();
LL | | } else {
| |_____^
|
= note: `-D clippy::if-same-then-else` implied by `-D warnings`
note: same as this
--> $DIR/if_same_then_else.rs:29:12
|
LL | } else {
| ____________^
LL | | //~ ERROR same body as `if` block
LL | | Foo { bar: 42 };
LL | | 0..10;
... |
LL | | foo();
LL | | }
| |_____^
error: this `if` has identical blocks
--> $DIR/if_same_then_else.rs:65:21
|
LL | let _ = if true {
| _____________________^
LL | | 0.0
LL | | } else {
| |_____^
|
note: same as this
--> $DIR/if_same_then_else.rs:67:12
|
LL | } else {
| ____________^
LL | | //~ ERROR same body as `if` block
LL | | 0.0
LL | | };
| |_____^
error: this `if` has identical blocks
--> $DIR/if_same_then_else.rs:72:21
|
LL | let _ = if true {
| _____________________^
LL | | -0.0
LL | | } else {
| |_____^
|
note: same as this
--> $DIR/if_same_then_else.rs:74:12
|
LL | } else {
| ____________^
LL | | //~ ERROR same body as `if` block
LL | | -0.0
LL | | };
| |_____^
error: this `if` has identical blocks
--> $DIR/if_same_then_else.rs:88:21
|
LL | let _ = if true {
| _____________________^
LL | | 42
LL | | } else {
| |_____^
|
note: same as this
--> $DIR/if_same_then_else.rs:90:12
|
LL | } else {
| ____________^
LL | | //~ ERROR same body as `if` block
LL | | 42
LL | | };
| |_____^
error: aborting due to 4 previous errors