Implement associated existential types by oli-obk · Pull Request #52650 · rust-lang/rust (original) (raw)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see it as particularly inconsistent — depends on your POV, I suppose. It seems to me that the various "sugared forms" (e.g., impl Trait) don't desugar directly to an existential type "sibling item", because they have different sets of defining uses... in the case of a function, only the fn return type in question. In the case of an impl, we get to decide?

For that matter, I do wonder if we would rather have the syntax here be type Item = impl Foo.

(cc @cramertj on this particular question)