Skip to content

Support the Trait<Output=Type> syntax #18432

Closed
@nikomatsakis

Description

@nikomatsakis

Today when we expand associated types we always expand to a fresh type parameter. Per the RFC we should support a syntax like:

Trait<Output=Type>

to permit a trait reference that specifies what to expand an associated type into. This is a subset of full == references.

Note that cyclic equality does not have to be supported (though it'd be nice if it at least produced a nice error message, not an ICE):

fn foo<T:Something<Out=U::Out>, U:Something<Out=T::Out>>() { ... }

Metadata

Metadata

Assignees

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