-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Don't make rustc_insignificant_dtor
feature gate
#86446
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
I don't think a test is necessary here, but it seems like it would be good to implement an assert that checks that all of the features listed as incomplete are also active? The runtime overhead is likely minimal; moving it to compile-time seems a little painful so I wouldn't bother if it's not trivial. We could make it part of the tidy feature checks, perhaps... |
Actually, I think a good way of doing this might be to add an incomplete attribute (doesn't really matter how) to the declare_features! macro -- that could then generate the active incomplete features into the const array already present. I'm not sure how easy that'll be to pull off in the macro rules though; maybe adding another boolean field to the Feature struct is a good way to do it. |
This isn't a feature gate, it's an attribute that is feature gated behind the `rustc_attrs` attribute. Closes rust-lang#85680.
This prevents mistakes where the feature is in the list of incomplete features but not actually a feature by making the incompleteness a part of the declaration.
1c38b26
to
11ebd80
Compare
@Mark-Simulacrum I've updated the syntax of the macro so that it's used like this: // normal features (unchanged)
(active, abi_ptx, "1.15.0", Some(38788), None),
// new syntax for incomplete features
(incomplete, repr128, "1.16.0", Some(56071), None), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with last comment fixed
@bors r+ rollup=never |
📌 Commit 7a51cf1 has been approved by |
☀️ Test successful - checks-actions |
This was changed in rust-lang/rust#86446 so that incompleteness is included in the delcaration.
* Document how to mark features as incomplete This was changed in rust-lang/rust#86446 so that incompleteness is included in the delcaration. * Footerify link
This isn't a feature gate, it's an attribute that is feature gated behind the
rustc_attrs
attribute. Closes #85680.