2023-01-01 20:43:47 -06:00
|
|
|
error[E0277]: `&&std::slice::Iter<'_, {integer}>` is not an iterator
|
|
|
|
--> $DIR/suggest-remove-refs-4.rs:4:15
|
|
|
|
|
|
|
|
|
LL | for _i in &foo {}
|
|
|
|
| ^^^^ `&&std::slice::Iter<'_, {integer}>` is not an iterator
|
|
|
|
|
|
2024-10-24 16:14:17 -05:00
|
|
|
= help: the trait `Iterator` is not implemented for `&&std::slice::Iter<'_, {integer}>`
|
2023-01-01 20:43:47 -06:00
|
|
|
= note: required for `&&std::slice::Iter<'_, {integer}>` to implement `IntoIterator`
|
|
|
|
help: consider removing 2 leading `&`-references
|
|
|
|
|
|
|
|
|
LL ~ let foo = [1,2,3].iter();
|
|
|
|
LL ~ for _i in foo {}
|
|
|
|
|
|
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2023-01-01 20:43:47 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|