]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/needless_continue.stderr
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / needless_continue.stderr
index 50be062a67bf0d08c0170e12818abc193afa147d..60c853c18ad3cbcda89fbb7521ea3d68a6455e15 100644 (file)
@@ -1,24 +1,20 @@
 error: This else block is redundant.
 
-  --> $DIR/needless_continue.rs:26:16
+  --> $DIR/needless_continue.rs:36:16
    |
-26 |           } else {
+LL |           } else {
    |  ________________^
-27 | |             continue;
-28 | |         }
+LL | |             continue;
+LL | |         }
    | |_________^
    |
-note: lint level defined here
-  --> $DIR/needless_continue.rs:12:8
-   |
-12 | #[deny(needless_continue)]
-   |        ^^^^^^^^^^^^^^^^^
+   = note: `-D clippy::needless-continue` implied by `-D warnings`
    = help: Consider dropping the else clause and merging the code that follows (in the loop) with the if block, like so:
            if i % 2 == 0 && i % 3 == 0 {
            println!("{}", i);
-           println!("{}", i+1);
+           println!("{}", i + 1);
            if i % 5 == 0 {
-               println!("{}", i+2);
+               println!("{}", i + 2);
            }
            let i = 0;
            println!("bar {} ", i);
@@ -41,14 +37,14 @@ note: lint level defined here
 
 error: There is no need for an explicit `else` block for this `if` expression
 
-  --> $DIR/needless_continue.rs:41:9
+  --> $DIR/needless_continue.rs:51:9
    |
-41 | /         if (zero!(i % 2) || nonzero!(i % 5)) && i % 3 != 0 {
-42 | |             continue;
-43 | |         } else {
-44 | |             println!("Blabber");
-45 | |             println!("Jabber");
-46 | |         }
+LL | /         if (zero!(i % 2) || nonzero!(i % 5)) && i % 3 != 0 {
+LL | |             continue;
+LL | |         } else {
+LL | |             println!("Blabber");
+LL | |             println!("Jabber");
+LL | |         }
    | |_________^
    |
    = help: Consider dropping the else clause, and moving out the code in the else block, like so: