2021-02-26 08:49:18 -06:00
|
|
|
error: `Iterator::step_by(0)` will panic at runtime
|
2023-06-06 15:56:57 -05:00
|
|
|
--> $DIR/iterator_step_by_zero.rs:4:13
|
2019-12-18 10:59:43 -06:00
|
|
|
|
|
|
|
|
LL | let _ = vec!["A", "B", "B"].iter().step_by(0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::iterator-step-by-zero` implied by `-D warnings`
|
|
|
|
|
2021-02-26 08:49:18 -06:00
|
|
|
error: `Iterator::step_by(0)` will panic at runtime
|
2023-06-06 15:56:57 -05:00
|
|
|
--> $DIR/iterator_step_by_zero.rs:5:13
|
2019-12-18 10:59:43 -06:00
|
|
|
|
|
|
|
|
LL | let _ = "XXX".chars().step_by(0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2021-02-26 08:49:18 -06:00
|
|
|
error: `Iterator::step_by(0)` will panic at runtime
|
2023-06-06 15:56:57 -05:00
|
|
|
--> $DIR/iterator_step_by_zero.rs:6:13
|
2019-12-18 10:59:43 -06:00
|
|
|
|
|
|
|
|
LL | let _ = (0..1).step_by(0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
2021-02-26 08:49:18 -06:00
|
|
|
error: `Iterator::step_by(0)` will panic at runtime
|
2023-06-06 15:56:57 -05:00
|
|
|
--> $DIR/iterator_step_by_zero.rs:15:13
|
2019-12-18 10:59:43 -06:00
|
|
|
|
|
|
|
|
LL | let _ = (1..).step_by(0);
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
2021-02-26 08:49:18 -06:00
|
|
|
error: `Iterator::step_by(0)` will panic at runtime
|
2023-06-06 15:56:57 -05:00
|
|
|
--> $DIR/iterator_step_by_zero.rs:16:13
|
2019-12-18 10:59:43 -06:00
|
|
|
|
|
|
|
|
LL | let _ = (1..=2).step_by(0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2021-02-26 08:49:18 -06:00
|
|
|
error: `Iterator::step_by(0)` will panic at runtime
|
2023-06-06 15:56:57 -05:00
|
|
|
--> $DIR/iterator_step_by_zero.rs:19:13
|
2019-12-18 10:59:43 -06:00
|
|
|
|
|
|
|
|
LL | let _ = x.step_by(0);
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
2021-02-26 08:49:18 -06:00
|
|
|
error: `Iterator::step_by(0)` will panic at runtime
|
2023-06-06 15:56:57 -05:00
|
|
|
--> $DIR/iterator_step_by_zero.rs:23:13
|
2019-12-18 10:59:43 -06:00
|
|
|
|
|
|
|
|
LL | let _ = v1.iter().step_by(2 / 3);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
|