-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Trait alias refs don't induce trait object lifetime defaults #140710
Copy link
Copy link
Open
Labels
A-dyn-traitArea: trait objects, vtable layoutArea: trait objects, vtable layoutA-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsC-bugCategory: This is a bug.Category: This is a bug.F-trait_alias`#![feature(trait_alias)]``#![feature(trait_alias)]`T-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.
Metadata
Metadata
Assignees
Labels
A-dyn-traitArea: trait objects, vtable layoutArea: trait objects, vtable layoutA-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsC-bugCategory: This is a bug.Category: This is a bug.F-trait_alias`#![feature(trait_alias)]``#![feature(trait_alias)]`T-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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Arguably, trait alias refs should bring along trait object lifetime defaults (I would say "just like trait refs" but those are currently unintentionally broken (or have been since their introduction) which would get fixed in #129543).
TL;DR: This code should compile and doesn't currently:
Trait object lifetime defaults aren't a hot topic esp. due to the existence of inferred outlives-bounds which don't participate in their resolution, so this is generally P-low but I'm not marking this issue as such as it should still block the stabilization of
trait_alias(or whatever features end up replacing it) since modifying the resolution of trait object lifetime default afterwards would be a breaking change.Temporarily blocking this on my PR #129543 which touches a lot of code in that area.