2017-08-25 20:20:52 +00:00
|
|
|
error: infinite iteration detected
|
2020-04-03 01:46:01 +00:00
|
|
|
--> $DIR/infinite_iter.rs:9:5
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | repeat(0_u8).collect::<Vec<_>>(); // infinite iter
|
2017-08-25 20:20:52 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-01-31 19:21:10 +00:00
|
|
|
note: the lint level is defined here
|
2020-04-03 01:46:01 +00:00
|
|
|
--> $DIR/infinite_iter.rs:7:8
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | #[deny(clippy::infinite_iter)]
|
2018-08-01 14:30:44 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
|
|
error: infinite iteration detected
|
2020-04-03 01:46:01 +00:00
|
|
|
--> $DIR/infinite_iter.rs:10:5
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | (0..8_u32).take_while(square_is_lower_64).cycle().count(); // infinite iter
|
2017-08-25 20:20:52 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: infinite iteration detected
|
2020-04-03 01:46:01 +00:00
|
|
|
--> $DIR/infinite_iter.rs:11:5
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | (0..8_u64).chain(0..).max(); // infinite iter
|
2017-08-25 20:20:52 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: infinite iteration detected
|
2020-04-03 01:46:01 +00:00
|
|
|
--> $DIR/infinite_iter.rs:16:5
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | / (0..8_u32)
|
|
|
|
LL | | .rev()
|
|
|
|
LL | | .cycle()
|
|
|
|
LL | | .map(|x| x + 1_u32)
|
|
|
|
LL | | .for_each(|x| println!("{}", x)); // infinite iter
|
2018-12-10 05:27:19 +00:00
|
|
|
| |________________________________________^
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
|
|
error: infinite iteration detected
|
2020-04-03 01:46:01 +00:00
|
|
|
--> $DIR/infinite_iter.rs:22:5
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | (0_usize..).flat_map(|x| 0..x).product::<usize>(); // infinite iter
|
2017-08-25 20:20:52 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: infinite iteration detected
|
2020-04-03 01:46:01 +00:00
|
|
|
--> $DIR/infinite_iter.rs:23:5
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | (0_u64..).filter(|x| x % 2 == 0).last(); // infinite iter
|
2017-08-25 20:20:52 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: possible infinite iteration detected
|
2020-04-03 01:46:01 +00:00
|
|
|
--> $DIR/infinite_iter.rs:30:5
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | (0..).zip((0..).take_while(square_is_lower_64)).count(); // maybe infinite iter
|
2017-08-25 20:20:52 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-01-31 19:21:10 +00:00
|
|
|
note: the lint level is defined here
|
2020-04-03 01:46:01 +00:00
|
|
|
--> $DIR/infinite_iter.rs:28:8
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | #[deny(clippy::maybe_infinite_iter)]
|
2018-08-01 14:30:44 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
|
|
error: possible infinite iteration detected
|
2020-04-03 01:46:01 +00:00
|
|
|
--> $DIR/infinite_iter.rs:31:5
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | repeat(42).take_while(|x| *x == 42).chain(0..42).max(); // maybe infinite iter
|
2017-08-25 20:20:52 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: possible infinite iteration detected
|
2020-04-03 01:46:01 +00:00
|
|
|
--> $DIR/infinite_iter.rs:32:5
|
2018-12-10 05:27:19 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | / (1..)
|
|
|
|
LL | | .scan(0, |state, x| {
|
|
|
|
LL | | *state += x;
|
|
|
|
LL | | Some(*state)
|
|
|
|
LL | | })
|
|
|
|
LL | | .min(); // maybe infinite iter
|
2018-12-10 05:27:19 +00:00
|
|
|
| |______________^
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
|
|
error: possible infinite iteration detected
|
2020-04-03 01:46:01 +00:00
|
|
|
--> $DIR/infinite_iter.rs:38:5
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | (0..).find(|x| *x == 24); // maybe infinite iter
|
2017-08-25 20:20:52 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: possible infinite iteration detected
|
2020-04-03 01:46:01 +00:00
|
|
|
--> $DIR/infinite_iter.rs:39:5
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | (0..).position(|x| x == 24); // maybe infinite iter
|
2017-08-25 20:20:52 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: possible infinite iteration detected
|
2020-04-03 01:46:01 +00:00
|
|
|
--> $DIR/infinite_iter.rs:40:5
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | (0..).any(|x| x == 24); // maybe infinite iter
|
2017-08-25 20:20:52 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: possible infinite iteration detected
|
2020-04-03 01:46:01 +00:00
|
|
|
--> $DIR/infinite_iter.rs:41:5
|
2017-08-25 20:20:52 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | (0..).all(|x| x == 24); // maybe infinite iter
|
2017-08-25 20:20:52 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2018-12-31 11:06:08 +00:00
|
|
|
error: infinite iteration detected
|
2022-05-21 11:24:00 +00:00
|
|
|
--> $DIR/infinite_iter.rs:63:31
|
2018-12-31 11:06:08 +00:00
|
|
|
|
|
|
|
|
LL | let _: HashSet<i32> = (0..).collect(); // Infinite iter
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
2019-07-18 22:35:32 +00:00
|
|
|
= note: `#[deny(clippy::infinite_iter)]` on by default
|
2018-12-31 11:06:08 +00:00
|
|
|
|
2019-08-07 05:37:13 +00:00
|
|
|
error: aborting due to 14 previous errors
|
2018-01-16 16:06:27 +00:00
|
|
|
|