-
Couldn't load subscription status.
- Fork 13.9k
Closed
Labels
A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`
Description
Like we do for lifetimes, suggest the appropriate place for type arguments written after associated an type.
trait Trait<T> { type Item; } pub fn test<W, I: Trait<Item=(), W> >() {} fn main() { } we currently emit
error: type parameters must be declared prior to associated type bindings --> $DIR/issue-32214.rs:5:34 | LL | pub fn test<W, I: Trait<Item=(), W> >() {} | ^ Metadata
Metadata
Assignees
Labels
A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`