Impl trait in type aliases: defining use via struct #66980
Labels
F-type_alias_impl_trait
`#[feature(type_alias_impl_trait)]`
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
Sub-issue of #63063
It should be possible for the defining implementation of Type-Alias-Impl-Trait (aka TAIT) to be a struct usage:
First issue: currently, non-defining uses of TAIT in the defining scope are not allowed; see this comment.
Second issue: defining usage via a struct field.
Related cases:
type B = (A, ());
whereA
is TAIT (also applies to array types)enum
usages usually (when N>1) do not involve all variants and often do not involve all type-components, so extension toenum
would only be possible in very limited circumstances: already supported for Option but not other enumsThe text was updated successfully, but these errors were encountered: