# `type_alias_impl_trait` triage
* Tracking issue: [#63063](https://github.com/rust-lang/rust/issues/63063)
## Design questions
- Do we want defining uses to be extended to associated types? re. [#57961]
- Also, structs re. [#66980]
- `const` items? re. [#77898]
- Should privacy lints get triggered? re. [#63169]
- Should they be allowed in associated type defaults? re. [#71083]
## Blocking issues
- [#53092] - FullfillmentError ICE with const fn and existential type
- [#53398] - existential types cannot be defined in terms of themselves at all
- [#55997] - Cycle detected when processing existential type
- [#63205] - Investigate diagnostics regarding type alias `impl Trait`
- Amazing diagnostics alone are probably not blocking, but we at least should make sure we don't suggest completely wrong things
- [#64445] - Unification fails when type alias impl trait is used in non-return position
- This highlights the need to think about defining uses.
- [#66426] - Impossible to return unboxed closure from some functions.
- Errors on master are weird - but slightly improved. Not sure if we should be getting errors
- [#66723] - Improve "defining opaque type use does not fully define opaque type" error message
- Diagnostics here are important
- [#66980] - Impl trait in type aliases: defining use via struct
- Defining uses in structs? But also mismatched types.
- [#69785] - ICE in collect_and_partition_mono_items
- Didn't confirm this still happens, but looks bad
- [#71153] - Weird "cycle detected" error around type_alias_impl_trait and auto traits.
- Duplicate of [#55997], but small test
- [#72793] - ICE (OutputTypeParameterMismatch) with type_alias_impl_trait
- [#73481] - Multiple defining uses of type alias impl trait in single function are not handled
- [#74280] - ICE(broken MIR and no errors despite delay_span_bug) when existential type alias is used as closure return value causing type error
- [#74282] - ICE(expected defining type in borrowck) when existential type causes type error
- [#77179] - ICE when trying to infer parameter in impl Trait type alias
- [#77898] - const initializer is not considered a "defining use" for type_alias_impl_trait
- Should `const` items be defining uses?
- [#77987] - type_alias_impl_trait ICE: Non-defining use of DefId
- [#77989] - Type mismatch when using constant with type_alias_impl_trait
- [#78450] - type_alias_impl_trait delay_span_bug when type parameter is associated type with non-static lifetime
## Probably not blocking
- [#57961] - Defining scope of `existential type` defined by associated type
- An "extension" to defining uses that's not function returns; we can probably stabilize without this and add later
- [#63169] - impl trait in type aliases does not trigger "private type in public interface" errors
- Should privacy lints get triggered?
- Can we stabilize first and implement this later?
- [#63355] - ICE with type_alias_impl_trait: errors selecting obligation during MIR typeck
- No longer ICEs, but there is an error that looks like it's an associated type normalization issue. Not sure here.
- [#71083] - Interactions in `type_alias_impl_trait` and `associated_type_defaults`
- How should associated type defaults interact?
## Not blocking
- [#63204] - Investigate whether `Ty` and `OpaqueTy` can be merged
- Probably shouldn't even have `type_alias_impl_trait` label
## Closable?
- [#58662] - existential Generator + lifetime type errors unless impl trait wrapper is used
- Fixed on master, needs test
- [#65384] - impl-trait type alias is usable in impl blocks
- Fixed on master, needs test
- [#69137] - The "type_alias_impl_trait" feature has problems handling lifetime parameters.
- Error on master correctly directs on what to do; needs test
- [#69323] - Support for partial existentials in TAIT
- Fixed on master, needs test
## Untriaged issues
[#53092]: https://github.com/rust-lang/rust/issues/53092
[#53398]: https://github.com/rust-lang/rust/issues/53398
[#55997]: https://github.com/rust-lang/rust/issues/55997
[#57961]: https://github.com/rust-lang/rust/issues/57961
[#58662]: https://github.com/rust-lang/rust/issues/58662
[#63063]: https://github.com/rust-lang/rust/issues/63063
[#63169]: https://github.com/rust-lang/rust/issues/63169
[#63204]: https://github.com/rust-lang/rust/issues/63204
[#63205]: https://github.com/rust-lang/rust/issues/63205
[#63355]: https://github.com/rust-lang/rust/issues/63355
[#64445]: https://github.com/rust-lang/rust/issues/64445
[#65384]: https://github.com/rust-lang/rust/issues/65384
[#66426]: https://github.com/rust-lang/rust/issues/66426
[#66723]: https://github.com/rust-lang/rust/issues/66723
[#66980]: https://github.com/rust-lang/rust/issues/66980
[#69137]: https://github.com/rust-lang/rust/issues/69137
[#69323]: https://github.com/rust-lang/rust/issues/69323
[#69785]: https://github.com/rust-lang/rust/issues/69785
[#71083]: https://github.com/rust-lang/rust/issues/71083
[#71153]: https://github.com/rust-lang/rust/issues/71153
[#72793]: https://github.com/rust-lang/rust/issues/72793
[#73481]: https://github.com/rust-lang/rust/issues/73481
[#74280]: https://github.com/rust-lang/rust/issues/74280
[#74282]: https://github.com/rust-lang/rust/issues/74282
[#77179]: https://github.com/rust-lang/rust/issues/77179
[#77898]: https://github.com/rust-lang/rust/issues/77898
[#77987]: https://github.com/rust-lang/rust/issues/77987
[#77989]: https://github.com/rust-lang/rust/issues/77989
[#78450]: https://github.com/rust-lang/rust/issues/78450