Skip to content

associated type normalization syntax in surface rust differs from real rust #80

@nikomatsakis

Description

@nikomatsakis

The rust layer permits things like

where
    [(< T as Iterator[] > :: Item[] == u32)]

but this is not really what we support in regular Rust (T: Iterator<Item = u32>). There's been talk of adding == syntax to regular Rust (see rust-lang/rust#20041) but it's not supported now. Meanwhile, the syntax we do support is more general, since one can do things like T: Foo<Bar = u32, Baz = i32>.

Also, in regular Rust, we lower T: Foo<Bar = u32> to both T: Foo and <T as Foo>::Bar = u32.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions