]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/block_in_if_condition.stderr
Auto merge of #4478 - tsurai:master, r=flip1995
[rust.git] / tests / ui / block_in_if_condition.stderr
index d83cef26a8b558d879c0637c5ed559d0b474af96..0876d5db6964152aa585e57f11f4210f90d47909 100644 (file)
@@ -1,11 +1,11 @@
 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:35:8
+  --> $DIR/block_in_if_condition.rs:26:8
    |
-35 |       if {
+LL |       if {
    |  ________^
-36 | |         let x = 3;
-37 | |         x == 3
-38 | |     } {
+LL | |         let x = 3;
+LL | |         x == 3
+LL | |     } {
    | |_____^
    |
    = note: `-D clippy::block-in-if-condition-stmt` implied by `-D warnings`
@@ -19,9 +19,9 @@ error: in an 'if' condition, avoid complex blocks or closures with blocks; inste
            } ... 
 
 error: omit braces around single expression condition
-  --> $DIR/block_in_if_condition.rs:46:8
+  --> $DIR/block_in_if_condition.rs:37:8
    |
-46 |     if { true } {
+LL |     if { true } {
    |        ^^^^^^^^
    |
    = note: `-D clippy::block-in-if-condition-expr` implied by `-D warnings`
@@ -31,29 +31,29 @@ error: omit braces around single expression condition
            } ... 
 
 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:66:17
+  --> $DIR/block_in_if_condition.rs:58:17
    |
-66 |               |x| {
+LL |               |x| {
    |  _________________^
-67 | |                 let target = 3;
-68 | |                 x == target
-69 | |             },
+LL | |                 let target = 3;
+LL | |                 x == target
+LL | |             },
    | |_____________^
 
 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:75:13
+  --> $DIR/block_in_if_condition.rs:67:13
    |
-75 |           |x| {
+LL |           |x| {
    |  _____________^
-76 | |             let target = 3;
-77 | |             x == target
-78 | |         },
+LL | |             let target = 3;
+LL | |             x == target
+LL | |         },
    | |_________^
 
 error: this boolean expression can be simplified
-  --> $DIR/block_in_if_condition.rs:85:8
+  --> $DIR/block_in_if_condition.rs:77:8
    |
-85 |     if true && x == 3 {
+LL |     if true && x == 3 {
    |        ^^^^^^^^^^^^^^ help: try: `x == 3`
    |
    = note: `-D clippy::nonminimal-bool` implied by `-D warnings`