Skip to content

Generic Associated Types fail to parse when used in constraints #9602

@Dessix

Description

@Dessix

Rust Playground of code which fails to parse in Rust-Analyzer; specifically, see line 24:
Inner: for<'a> Foo<Bar<'a> = &'a str>

GAT specifications in constraints cause the parser to abort; RA expected COMMA and does not appear to be usable with GAT constraint specifications in any expressible form.

The sort of constraint that fails, and what RA displays, despite the code being legal and compiling successfully:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserparser issuesA-tytype system / type inference / traits / method resolutionS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions