mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 19:17:43 +00:00
clean tests/ui/short_circuit_statement.rs
Cleaning the empty lines for clarity.
This commit is contained in:
parent
ffb768cf8d
commit
c79a350c55
@ -5,17 +5,8 @@
|
||||
|
||||
fn main() {
|
||||
f() && g();
|
||||
|
||||
|
||||
|
||||
f() || g();
|
||||
|
||||
|
||||
|
||||
1 == 2 || g();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
fn f() -> bool {
|
||||
|
@ -11,15 +11,15 @@ note: lint level defined here
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: boolean short circuit operator in statement may be clearer using an explicit test
|
||||
--> $DIR/short_circuit_statement.rs:11:5
|
||||
--> $DIR/short_circuit_statement.rs:8:5
|
||||
|
|
||||
11 | f() || g();
|
||||
8 | f() || g();
|
||||
| ^^^^^^^^^^^ help: replace it with `if !f() { g(); }`
|
||||
|
||||
error: boolean short circuit operator in statement may be clearer using an explicit test
|
||||
--> $DIR/short_circuit_statement.rs:15:5
|
||||
--> $DIR/short_circuit_statement.rs:9:5
|
||||
|
|
||||
15 | 1 == 2 || g();
|
||||
9 | 1 == 2 || g();
|
||||
| ^^^^^^^^^^^^^^ help: replace it with `if !(1 == 2) { g(); }`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
Loading…
Reference in New Issue
Block a user