-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed as duplicate of#94770
Labels
A-stabilityArea: `#[stable]`, `#[unstable]` etc.Area: `#[stable]`, `#[unstable]` etc.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.F-staged_api`#![feature(staged_api)]``#![feature(staged_api)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Sometimes a library item is unstable for multiple reasons, for example implementing an unstable trait for an unstable type (in this case it matters less because of impl stability rules being a bit special but it happens in other cases too).
desired example:
#[unstable(feature = "unique_rc_arc", issue = "112566")]
#[unstable(feature = "pin_coerce_unsized_trait", issue = "123430")]
unsafe impl<T: ?Sized, A: Allocator> PinCoerceUnsized for UniqueRc<T, A> {}
This way, when one feature is stabilized, the other unstable attribute is still present, ensuring that it's still unstable (the stable attribute shouldn't be added in that case of course).
User code would then also have to enable all the feature gates to use it (of course for trait impls that doesn't apply again).
Metadata
Metadata
Assignees
Labels
A-stabilityArea: `#[stable]`, `#[unstable]` etc.Area: `#[stable]`, `#[unstable]` etc.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.F-staged_api`#![feature(staged_api)]``#![feature(staged_api)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.