Files
rust/tests/ui/range.stderr
T
Esteban Küber 5fef4429d1 Make all multipart suggestions verbose
The ShowAlways style of suggestions is usually easier to understand than the inline style.
2026-02-18 18:33:35 +00:00

42 lines
1.1 KiB
Plaintext

error: using `.zip()` with a range and `.len()`
--> tests/ui/range.rs:6:14
|
LL | let _x = v1.iter().zip(0..v1.len());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the order of the element and the index will be swapped
= note: `-D clippy::range-zip-with-len` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::range_zip_with_len)]`
help: use
|
LL - let _x = v1.iter().zip(0..v1.len());
LL + let _x = v1.iter().enumerate();
|
error: using `.zip()` with a range and `.len()`
--> tests/ui/range.rs:10:19
|
LL | for (e, i) in v1.iter().zip(0..v1.len()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - for (e, i) in v1.iter().zip(0..v1.len()) {
LL + for (i, e) in v1.iter().enumerate() {
|
error: using `.zip()` with a range and `.len()`
--> tests/ui/range.rs:16:5
|
LL | v1.iter().zip(0..v1.len()).for_each(|(e, i)| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - v1.iter().zip(0..v1.len()).for_each(|(e, i)| {
LL + v1.iter().enumerate().for_each(|(i, e)| {
|
error: aborting due to 3 previous errors