Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple #[unstable] features for library item #134319

Closed
Noratrieb opened this issue Dec 14, 2024 · 4 comments
Closed

Support multiple #[unstable] features for library item #134319

Noratrieb opened this issue Dec 14, 2024 · 4 comments
Labels
A-stability Area: `#[stable]`, `#[unstable]` etc. C-feature-request Category: A feature request, i.e: not implemented / a PR. F-staged_api `#![feature(staged_api)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Noratrieb
Copy link
Member

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).

@Noratrieb Noratrieb added A-stability Area: `#[stable]`, `#[unstable]` etc. C-feature-request Category: A feature request, i.e: not implemented / a PR. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 14, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 14, 2024
@fmease fmease added F-staged_api `#![feature(staged_api)]` and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Dec 14, 2024
@fmease
Copy link
Member

fmease commented Dec 14, 2024

Dupe of #94770?

@Noratrieb
Copy link
Member Author

yes. i tried searching for it but was unable to find anything (even my most precise keywords yielded dozens of results)

@fmease
Copy link
Member

fmease commented Dec 15, 2024

I found it via in:title unstable attribute which narrowed it down to just 4 open issues (I faintly remembered there being a similar GH issue). in:title often comes in clutch :^)

@Noratrieb
Copy link
Member Author

ohhhhhhhhhh, I was not aware of that search modifier. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-stability Area: `#[stable]`, `#[unstable]` etc. C-feature-request Category: A feature request, i.e: not implemented / a PR. F-staged_api `#![feature(staged_api)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants