Closed
Description
If you accidentally write a bound like:
pub struct Foo<T, I: Iterator<T>> { /* ... */ }
The error message is:
err.rs:3:22: 3:33 error: wrong number of type arguments: expected 0, found 1
err.rs:3 pub struct Foo<T, I: Iterator<T>> { x: I }
^~~~~~~~~~~
The compiler could be more helpful in these cases where a trait takes 0 arguments but has an associated type and suggest something like: Iterator has an associated type. Did you mean: I: Iterator<Item=T>?
.