Closed
Description
Demo:
struct S<I: Iterator>(I);
struct T(S<u8>);
fn main() {}
This will cause the strange suggestion:
error[E0277]: the trait bound `u8: std::iter::Iterator` is not satisfied
--> src/main.rs:2:10
|
2 | struct T(S<u8>);
| ^^^^^^ `u8` is not an iterator; maybe try calling `.iter()` or a similar method
|
= help: the trait `std::iter::Iterator` is not implemented for `u8`
note: required by `S`
--> src/main.rs:1:1
|
1 | struct S<I: Iterator>(I);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
There is no place to "call .iter()
". That suggestion should be removed here.