Skip to content

<T as Trait>::X::Y fails to parse #22139

Closed
@huonw

Description

@huonw
trait Foo {
    type X;
}
trait Bar {
    type Y;
}

fn foo<T>(_: <T as Foo>::X::Y) 
    where T: Foo,
          T::X: Bar,
{}
<anon>:8:27: 8:29 error: expected one of `+` or `,`, found `::`
<anon>:8 fn foo<T>(_: <T as Foo>::X::Y) 
                                   ^~

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-associated-itemsArea: Associated items (types, constants & functions)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions