]> git.lizzy.rs Git - rust.git/commitdiff
clean tests/ui/block_in_if_condition.rs
authorLuis de Bethencourt <luisbg@osg.samsung.com>
Wed, 10 May 2017 14:40:40 +0000 (15:40 +0100)
committerLuis de Bethencourt <luisbg@osg.samsung.com>
Thu, 11 May 2017 15:22:32 +0000 (16:22 +0100)
Cleaning the empty lines for clarity.

tests/ui/block_in_if_condition.rs
tests/ui/block_in_if_condition.stderr

index feb28e377970cd71e6f89d7a31b87829450c4232..648327717155b6fc51e4a328e6bcb08077aa27d1 100644 (file)
@@ -56,13 +56,10 @@ fn pred_test() {
     // inside a closure that the condition is using.  same principle applies.  add some extra
     // expressions to make sure linter isn't confused by them.
     if v == 3 && sky == "blue" && predicate(|x| { let target = 3; x == target }, v) {
-
     }
 
     if predicate(|x| { let target = 3; x == target }, v) {
-
     }
-
 }
 
 fn condition_is_normal() -> i32 {
index 403ad7efe8df37217ee56efe01e25b1f09b70381..fb7f11798633fcb6154352908e8c2f7ac423b71d 100644 (file)
@@ -45,15 +45,15 @@ error: in an 'if' condition, avoid complex blocks or closures with blocks; inste
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let'
-  --> $DIR/block_in_if_condition.rs:62:22
+  --> $DIR/block_in_if_condition.rs:61:22
    |
-62 |     if predicate(|x| { let target = 3; x == target }, v) {
+61 |     if predicate(|x| { let target = 3; x == target }, v) {
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: this boolean expression can be simplified
-  --> $DIR/block_in_if_condition.rs:70:8
+  --> $DIR/block_in_if_condition.rs:67:8
    |
-70 |     if true && x == 3 {
+67 |     if true && x == 3 {
    |        ^^^^^^^^^^^^^^ help: try `x == 3`
    |
 note: lint level defined here