diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:44 +0000 |
commit | c23a457e72abe608715ac76f076f47dc42af07a5 (patch) | |
tree | 2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /src/tools/clippy/tests/ui/never_loop.stderr | |
parent | Releasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip |
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/never_loop.stderr')
-rw-r--r-- | src/tools/clippy/tests/ui/never_loop.stderr | 83 |
1 files changed, 52 insertions, 31 deletions
diff --git a/src/tools/clippy/tests/ui/never_loop.stderr b/src/tools/clippy/tests/ui/never_loop.stderr index 0446c09cd..3982f36ce 100644 --- a/src/tools/clippy/tests/ui/never_loop.stderr +++ b/src/tools/clippy/tests/ui/never_loop.stderr @@ -2,9 +2,9 @@ error: this loop never actually loops --> $DIR/never_loop.rs:12:5 | LL | / loop { +LL | | +LL | | LL | | // clippy::never_loop -LL | | x += 1; -LL | | if x == 1 { ... | LL | | break; LL | | } @@ -13,9 +13,10 @@ LL | | } = note: `#[deny(clippy::never_loop)]` on by default error: this loop never actually loops - --> $DIR/never_loop.rs:34:5 + --> $DIR/never_loop.rs:36:5 | LL | / loop { +LL | | LL | | // never loops LL | | x += 1; LL | | break; @@ -23,55 +24,57 @@ LL | | } | |_____^ error: this loop never actually loops - --> $DIR/never_loop.rs:54:5 + --> $DIR/never_loop.rs:57:5 | LL | / loop { +LL | | LL | | // never loops LL | | while i == 0 { -LL | | // never loops ... | LL | | return; LL | | } | |_____^ error: this loop never actually loops - --> $DIR/never_loop.rs:56:9 + --> $DIR/never_loop.rs:60:9 | LL | / while i == 0 { +LL | | LL | | // never loops LL | | break; LL | | } | |_________^ error: this loop never actually loops - --> $DIR/never_loop.rs:68:9 + --> $DIR/never_loop.rs:73:9 | LL | / loop { +LL | | LL | | // never loops LL | | if x == 5 { -LL | | break; -LL | | } +... | LL | | continue 'outer; LL | | } | |_________^ error: this loop never actually loops - --> $DIR/never_loop.rs:104:5 + --> $DIR/never_loop.rs:110:5 | LL | / while let Some(y) = x { +LL | | LL | | // never loops LL | | return; LL | | } | |_____^ error: this loop never actually loops - --> $DIR/never_loop.rs:111:5 + --> $DIR/never_loop.rs:118:5 | LL | / for x in 0..10 { +LL | | LL | | // never loops LL | | match x { -LL | | 1 => break, -LL | | _ => return, +... | LL | | } LL | | } | |_____^ @@ -82,62 +85,65 @@ LL | if let Some(x) = (0..10).next() { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: this loop never actually loops - --> $DIR/never_loop.rs:159:5 + --> $DIR/never_loop.rs:167:5 | LL | / 'outer: while a { +LL | | LL | | // never loops LL | | while a { -LL | | if a { ... | LL | | break 'outer; LL | | } | |_____^ error: this loop never actually loops - --> $DIR/never_loop.rs:174:9 + --> $DIR/never_loop.rs:183:9 | LL | / while false { +LL | | LL | | break 'label; LL | | } | |_________^ error: this loop never actually loops - --> $DIR/never_loop.rs:225:13 + --> $DIR/never_loop.rs:235:13 | LL | let _ = loop { | _____________^ +LL | | LL | | let Some(x) = x else { LL | | return; -LL | | }; -LL | | +... | LL | | break x; LL | | }; | |_____^ error: this loop never actually loops - --> $DIR/never_loop.rs:246:5 + --> $DIR/never_loop.rs:257:5 | LL | / 'a: loop { +LL | | LL | | 'b: { LL | | break 'b 'c: { -LL | | break 'a; -LL | | }; +... | LL | | } LL | | } | |_____^ error: sub-expression diverges - --> $DIR/never_loop.rs:249:17 + --> $DIR/never_loop.rs:261:17 | LL | break 'a; | ^^^^^^^^ | = note: `-D clippy::diverging-sub-expression` implied by `-D warnings` + = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]` error: this loop never actually loops - --> $DIR/never_loop.rs:280:13 + --> $DIR/never_loop.rs:294:13 | LL | / for _ in 0..20 { +LL | | LL | | break 'block; LL | | } | |_____________^ @@ -148,16 +154,31 @@ LL | if let Some(_) = (0..20).next() { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: this loop never actually loops - --> $DIR/never_loop.rs:324:5 + --> $DIR/never_loop.rs:378:13 + | +LL | / 'c: loop { +LL | | +LL | | if b { break 'c } else { break 'b } +LL | | } + | |_____________^ + +error: this loop never actually loops + --> $DIR/never_loop.rs:389:5 | LL | / loop { -LL | | 'label: { -LL | | let x = true; -LL | | // Lints because we cannot prove it's always `true` -... | -LL | | } +LL | | +LL | | panic!("oh no"); +LL | | } + | |_____^ + +error: this loop never actually loops + --> $DIR/never_loop.rs:393:5 + | +LL | / loop { +LL | | +LL | | unimplemented!("not yet"); LL | | } | |_____^ -error: aborting due to 14 previous errors +error: aborting due to 16 previous errors |