-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking issue for RFC 2515, "Permit impl Trait in type aliases" #63063
Copy link
Copy link
Open
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-impl_trait_in_assoc_type`#![feature(impl_trait_in_assoc_type)]``#![feature(impl_trait_in_assoc_type)]`F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`S-tracking-blockedStatus: This tracking issue is blocked on another tracking issueStatus: This tracking issue is blocked on another tracking issueT-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.needs-fcpThis change is insta-stable, or significant enough to need a team FCP to proceed.This change is insta-stable, or significant enough to need a team FCP to proceed.
Metadata
Metadata
Assignees
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-impl_trait_in_assoc_type`#![feature(impl_trait_in_assoc_type)]``#![feature(impl_trait_in_assoc_type)]`F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`S-tracking-blockedStatus: This tracking issue is blocked on another tracking issueStatus: This tracking issue is blocked on another tracking issueT-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.needs-fcpThis change is insta-stable, or significant enough to need a team FCP to proceed.This change is insta-stable, or significant enough to need a team FCP to proceed.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
In Progress
Status
Accepted RFC
This is a tracking issue for the RFC "Permit impl Trait in type aliases" (rust-lang/rfcs#2515) which is implemented under the following
#![feature(..)]gates:type_alias_impl_traitimpl_trait_in_assoc_type: Split out a separate feature gate for impl trait in associated types #110237About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
-Znext-solverTracking Issue for-Znext-solver#107374Unresolved questions
Exactly what should count as "defining uses" for opaque types?
can we come up with consistent rules when cross-usage type inference can happen?
Default::default()to produce a value of. We combine all return sites though and compute a shared type across them, so we'll figure out aVec<&'static str>impl Foocan be used for associated types that expect a type that implementsBar, even ifFooandBarare entirely unrelated. The hidden type must satisfy both. See https://github.com/rust-lang/rust/pull/99860/files for examples.impl traits in consts through const fns are allowed but shouldn't be: impl traits in consts through const fns are allowed but shouldn't #87277
when a type alias refers to other type aliases, opaque types from them are collected by
#[define_opaque], too. See Add#[define_opaques]attribute and require it for all type-alias-impl-trait sites that register a hidden type #128440 for some examples (tests/ui/impl-trait/issue-108592.rs