summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/suggest-remove-refs-1.stderr
blob: 523f78dffcc6791de0f05195a8d38c2065d8c9b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
error[E0277]: `&Enumerate<std::slice::Iter<'_, {integer}>>` is not an iterator
  --> $DIR/suggest-remove-refs-1.rs:6:19
   |
LL |     for (i, _) in &v.iter().enumerate() {
   |                   ^^^^^^^^^^^^^^^^^^^^^ `&Enumerate<std::slice::Iter<'_, {integer}>>` is not an iterator
   |
   = help: the trait `Iterator` is not implemented for `&Enumerate<std::slice::Iter<'_, {integer}>>`
   = note: required for `&Enumerate<std::slice::Iter<'_, {integer}>>` to implement `IntoIterator`
help: consider removing the leading `&`-reference
   |
LL -     for (i, _) in &v.iter().enumerate() {
LL +     for (i, _) in v.iter().enumerate() {
   |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.