clean tests/ui/bool_comparison.rs

Cleaning the empty lines for clarity.
This commit is contained in:
Luis de Bethencourt 2017-05-10 15:48:58 +01:00
parent cc923b5d0e
commit 5865c2aacd
2 changed files with 10 additions and 22 deletions

View file

@ -5,19 +5,7 @@
fn main() {
let x = true;
if x == true { "yes" } else { "no" };
if x == false { "yes" } else { "no" };
if true == x { "yes" } else { "no" };
if false == x { "yes" } else { "no" };
}

View file

@ -11,21 +11,21 @@ note: lint level defined here
| ^^^^^^^^^^^^^^^
error: equality checks against false can be replaced by a negation
--> $DIR/bool_comparison.rs:11:8
|
11 | if x == false { "yes" } else { "no" };
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
--> $DIR/bool_comparison.rs:8:8
|
8 | if x == false { "yes" } else { "no" };
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
error: equality checks against true are unnecessary
--> $DIR/bool_comparison.rs:15:8
|
15 | if true == x { "yes" } else { "no" };
| ^^^^^^^^^ help: try simplifying it as shown: `x`
--> $DIR/bool_comparison.rs:9:8
|
9 | if true == x { "yes" } else { "no" };
| ^^^^^^^^^ help: try simplifying it as shown: `x`
error: equality checks against false can be replaced by a negation
--> $DIR/bool_comparison.rs:19:8
--> $DIR/bool_comparison.rs:10:8
|
19 | if false == x { "yes" } else { "no" };
10 | if false == x { "yes" } else { "no" };
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
error: aborting due to 4 previous errors