rust-clippy/clippy_tests/examples/range.stderr

61 lines
1.5 KiB
Text
Raw Normal View History

2017-06-04 21:28:01 +00:00
error: use of deprecated item: replaced by `Iterator::step_by`
--> range.rs:14:12
2017-06-04 21:28:01 +00:00
|
14 | (0..1).step_by(0);
2017-06-04 21:28:01 +00:00
| ^^^^^^^
|
= note: `-D deprecated` implied by `-D warnings`
error: use of deprecated item: replaced by `Iterator::step_by`
--> range.rs:16:12
2017-06-04 21:28:01 +00:00
|
16 | (0..1).step_by(1);
2017-06-04 21:28:01 +00:00
| ^^^^^^^
|
= note: `-D deprecated` implied by `-D warnings`
error: use of deprecated item: replaced by `Iterator::step_by`
--> range.rs:18:11
2017-06-04 21:28:01 +00:00
|
18 | (1..).step_by(0);
2017-06-04 21:28:01 +00:00
| ^^^^^^^
|
= note: `-D deprecated` implied by `-D warnings`
error: use of deprecated item: replaced by `Iterator::step_by`
--> range.rs:19:13
2017-06-04 21:28:01 +00:00
|
19 | (1...2).step_by(0);
2017-06-04 21:28:01 +00:00
| ^^^^^^^
|
= note: `-D deprecated` implied by `-D warnings`
error: use of deprecated item: replaced by `Iterator::step_by`
--> range.rs:22:7
2017-06-04 21:28:01 +00:00
|
22 | x.step_by(0);
2017-06-04 21:28:01 +00:00
| ^^^^^^^
|
= note: `-D deprecated` implied by `-D warnings`
error: It is more idiomatic to use v1.iter().enumerate()
--> range.rs:30:14
|
30 | let _x = v1.iter().zip(0..v1.len());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D range-zip-with-len` implied by `-D warnings`
error: Iterator::step_by(0) will panic at runtime
--> range.rs:34:13
|
34 | let _ = v1.iter().step_by(2/3);
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D iterator-step-by-zero` implied by `-D warnings`
error: aborting due to previous error(s)
To learn more, run the command again with --verbose.