summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/infinite_iter.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /src/tools/clippy/tests/ui/infinite_iter.stderr
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-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/infinite_iter.stderr')
-rw-r--r--src/tools/clippy/tests/ui/infinite_iter.stderr58
1 files changed, 30 insertions, 28 deletions
diff --git a/src/tools/clippy/tests/ui/infinite_iter.stderr b/src/tools/clippy/tests/ui/infinite_iter.stderr
index b911163f7..d0d0f0db4 100644
--- a/src/tools/clippy/tests/ui/infinite_iter.stderr
+++ b/src/tools/clippy/tests/ui/infinite_iter.stderr
@@ -1,7 +1,7 @@
error: infinite iteration detected
--> $DIR/infinite_iter.rs:11:5
|
-LL | repeat(0_u8).collect::<Vec<_>>(); // infinite iter
+LL | repeat(0_u8).collect::<Vec<_>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
@@ -11,96 +11,98 @@ LL | #[deny(clippy::infinite_iter)]
| ^^^^^^^^^^^^^^^^^^^^^
error: infinite iteration detected
- --> $DIR/infinite_iter.rs:12:5
+ --> $DIR/infinite_iter.rs:14:5
|
-LL | (0..8_u32).take_while(square_is_lower_64).cycle().count(); // infinite iter
+LL | (0..8_u32).take_while(square_is_lower_64).cycle().count();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: infinite iteration detected
- --> $DIR/infinite_iter.rs:13:5
+ --> $DIR/infinite_iter.rs:17:5
|
-LL | (0..8_u64).chain(0..).max(); // infinite iter
+LL | (0..8_u64).chain(0..).max();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: infinite iteration detected
- --> $DIR/infinite_iter.rs:18:5
+ --> $DIR/infinite_iter.rs:25:5
|
LL | / (0..8_u32)
+LL | |
LL | | .rev()
LL | | .cycle()
LL | | .map(|x| x + 1_u32)
-LL | | .for_each(|x| println!("{}", x)); // infinite iter
+LL | | .for_each(|x| println!("{}", x));
| |________________________________________^
error: infinite iteration detected
- --> $DIR/infinite_iter.rs:24:5
+ --> $DIR/infinite_iter.rs:34:5
|
-LL | (0_usize..).flat_map(|x| 0..x).product::<usize>(); // infinite iter
+LL | (0_usize..).flat_map(|x| 0..x).product::<usize>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: infinite iteration detected
- --> $DIR/infinite_iter.rs:25:5
+ --> $DIR/infinite_iter.rs:37:5
|
-LL | (0_u64..).filter(|x| x % 2 == 0).last(); // infinite iter
+LL | (0_u64..).filter(|x| x % 2 == 0).last();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: possible infinite iteration detected
- --> $DIR/infinite_iter.rs:32:5
+ --> $DIR/infinite_iter.rs:48:5
|
-LL | (0..).zip((0..).take_while(square_is_lower_64)).count(); // maybe infinite iter
+LL | (0..).zip((0..).take_while(square_is_lower_64)).count();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
- --> $DIR/infinite_iter.rs:30:8
+ --> $DIR/infinite_iter.rs:45:8
|
LL | #[deny(clippy::maybe_infinite_iter)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: possible infinite iteration detected
- --> $DIR/infinite_iter.rs:33:5
+ --> $DIR/infinite_iter.rs:51:5
|
-LL | repeat(42).take_while(|x| *x == 42).chain(0..42).max(); // maybe infinite iter
+LL | repeat(42).take_while(|x| *x == 42).chain(0..42).max();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: possible infinite iteration detected
- --> $DIR/infinite_iter.rs:34:5
+ --> $DIR/infinite_iter.rs:54:5
|
LL | / (1..)
+LL | |
LL | | .scan(0, |state, x| {
LL | | *state += x;
LL | | Some(*state)
LL | | })
-LL | | .min(); // maybe infinite iter
+LL | | .min();
| |______________^
error: possible infinite iteration detected
- --> $DIR/infinite_iter.rs:40:5
+ --> $DIR/infinite_iter.rs:62:5
|
-LL | (0..).find(|x| *x == 24); // maybe infinite iter
+LL | (0..).find(|x| *x == 24);
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: possible infinite iteration detected
- --> $DIR/infinite_iter.rs:41:5
+ --> $DIR/infinite_iter.rs:65:5
|
-LL | (0..).position(|x| x == 24); // maybe infinite iter
+LL | (0..).position(|x| x == 24);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: possible infinite iteration detected
- --> $DIR/infinite_iter.rs:42:5
+ --> $DIR/infinite_iter.rs:68:5
|
-LL | (0..).any(|x| x == 24); // maybe infinite iter
+LL | (0..).any(|x| x == 24);
| ^^^^^^^^^^^^^^^^^^^^^^
error: possible infinite iteration detected
- --> $DIR/infinite_iter.rs:43:5
+ --> $DIR/infinite_iter.rs:71:5
|
-LL | (0..).all(|x| x == 24); // maybe infinite iter
+LL | (0..).all(|x| x == 24);
| ^^^^^^^^^^^^^^^^^^^^^^
error: infinite iteration detected
- --> $DIR/infinite_iter.rs:65:31
+ --> $DIR/infinite_iter.rs:97:31
|
-LL | let _: HashSet<i32> = (0..).collect(); // Infinite iter
+LL | let _: HashSet<i32> = (0..).collect();
| ^^^^^^^^^^^^^^^
|
= note: `#[deny(clippy::infinite_iter)]` on by default