rust/tests/ui/if_same_then_else.stderr

113 lines
2.3 KiB
Plaintext
Raw Normal View History

error: this `if` has identical blocks
2020-01-19 06:04:41 +00:00
--> $DIR/if_same_then_else.rs:28:12
|
LL | } else {
| ____________^
LL | | //~ ERROR same body as `if` block
LL | | Foo { bar: 42 };
LL | | 0..10;
... |
LL | | foo();
LL | | }
| |_____^
|
= note: `-D clippy::if-same-then-else` implied by `-D warnings`
note: same as this
2020-01-19 06:04:41 +00:00
--> $DIR/if_same_then_else.rs:20:13
|
LL | if true {
| _____________^
LL | | Foo { bar: 42 };
LL | | 0..10;
LL | | ..;
... |
LL | | foo();
LL | | } else {
| |_____^
error: this `if` has identical blocks
2020-01-19 06:04:41 +00:00
--> $DIR/if_same_then_else.rs:66:12
|
LL | } else {
| ____________^
LL | | //~ ERROR same body as `if` block
LL | | 0.0
LL | | };
| |_____^
|
note: same as this
2020-01-19 06:04:41 +00:00
--> $DIR/if_same_then_else.rs:64:21
|
LL | let _ = if true {
| _____________________^
LL | | 0.0
LL | | } else {
| |_____^
error: this `if` has identical blocks
2020-01-19 06:04:41 +00:00
--> $DIR/if_same_then_else.rs:73:12
|
LL | } else {
| ____________^
LL | | //~ ERROR same body as `if` block
LL | | -0.0
LL | | };
| |_____^
|
note: same as this
2020-01-19 06:04:41 +00:00
--> $DIR/if_same_then_else.rs:71:21
|
LL | let _ = if true {
| _____________________^
LL | | -0.0
LL | | } else {
| |_____^
error: this `if` has identical blocks
2020-01-19 06:04:41 +00:00
--> $DIR/if_same_then_else.rs:89:12
|
LL | } else {
| ____________^
LL | | //~ ERROR same body as `if` block
LL | | 42
LL | | };
| |_____^
|
note: same as this
2020-01-19 06:04:41 +00:00
--> $DIR/if_same_then_else.rs:87:21
|
LL | let _ = if true {
| _____________________^
LL | | 42
LL | | } else {
| |_____^
error: this `if` has identical blocks
2020-01-19 06:04:41 +00:00
--> $DIR/if_same_then_else.rs:101:12
|
LL | } else {
| ____________^
LL | | //~ ERROR same body as `if` block
LL | | let bar = if true { 42 } else { 43 };
LL | |
... |
LL | | bar + 1;
LL | | }
| |_____^
|
note: same as this
2020-01-19 06:04:41 +00:00
--> $DIR/if_same_then_else.rs:94:13
|
LL | if true {
| _____________^
LL | | let bar = if true { 42 } else { 43 };
LL | |
LL | | while foo() {
... |
LL | | bar + 1;
LL | | } else {
| |_____^
2020-01-19 06:04:41 +00:00
error: aborting due to 5 previous errors