2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: `&Enumerate<std::slice::Iter<'_, {integer}>>` is not an iterator
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/suggest-remove-refs-1.rs:6:19
|
2018-03-12 21:40:55 -05:00
|
|
|
|
|
2020-07-02 00:32:12 -05:00
|
|
|
LL | for (i, _) in &v.iter().enumerate() {
|
2023-01-01 20:43:47 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ `&Enumerate<std::slice::Iter<'_, {integer}>>` is not an iterator
|
2018-03-12 21:40:55 -05:00
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= help: the trait `Iterator` is not implemented for `&Enumerate<std::slice::Iter<'_, {integer}>>`
|
2022-08-15 15:31:37 -05:00
|
|
|
= note: required for `&Enumerate<std::slice::Iter<'_, {integer}>>` to implement `IntoIterator`
|
2023-01-01 20:43:47 -06:00
|
|
|
help: consider removing the leading `&`-reference
|
|
|
|
|
|
|
|
|
LL - for (i, _) in &v.iter().enumerate() {
|
|
|
|
LL + for (i, _) in v.iter().enumerate() {
|
|
|
|
|
|
2018-03-12 21:40:55 -05:00
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2018-03-12 21:40:55 -05:00
|
|
|
|
2018-03-14 10:49:06 -05:00
|
|
|
For more information about this error, try `rustc --explain E0277`.
|