Closed
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
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
Rollup merge of rust-lang#57886 - davidtwco:issue-57385, r=estebank
davidtwco commentedon Mar 30, 2019
Re-opening as this was regressed by #58191 (11874a0).
estebank commentedon Apr 1, 2019
Why wasn't that regression caught by our tests?
davidtwco commentedon Apr 1, 2019
The test was also updated. Presumably it wasn't noticed and the test got
--bless
'd.IFcoltransG commentedon Jan 21, 2024
The above code now generates a suggestion.
I assume this issue can be closed.