-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
const fn stability checking: also check declared language features #129659
Conversation
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
The only reason I could think of is that we might allow oli is on leave, so maybe we can get more eyes on this from someone else who is familiar with stability checking |
That would equally apply to regular stability, not just const stability, right? |
The status quo is that the example in #129656 suggests to enable the |
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.
I can't make any statements about the current or expected behavior around (const) stability without putting more thought and time into it than I am currently able to
@@ -0,0 +1,19 @@ | |||
//! Ensure that we can use a language feature with a `const fn` and things behave as expected. |
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.
Explain what "expected" means in detail.
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.
Well, it should work like all feature gates work -- if you enable the feature gate it is actually considered enabled...
33076f5
to
c298417
Compare
To me this looks like a fairly simple oversight -- the code does |
Let's add that as a test. If this isn't rejected, we should open an issue to track fixing it for both
Well, that requires someone who enables the |
I didn't say that this fix is more urgent than a regular PR. It's just a normal bugfix. :)
This is completely orthogonal to the issue this PR is concerned with. Please don't ask the PR to be extended in scope to fix unrelated issues. This PR is about making I created an issue to track the concern around already-stable lang features: #129814. |
Maybe I should be the person opening that issue.. I shouldn't be asking for more work when it isn't necessary. Sorry if that nudge was annoying! On another look, I think there is no deep reason - probably an oversight as you said, so let's merge it. @bors r+ rollup |
The actual reason that this used |
…iaskrgr Rollup of 12 pull requests Successful merges: - rust-lang#129659 (const fn stability checking: also check declared language features) - rust-lang#129711 (Expand NLL MIR dumps) - rust-lang#129730 (f32 docs: define 'arithmetic' operations) - rust-lang#129733 (Subtree update of `rust-analyzer`) - rust-lang#129749 (llvm-wrapper: adapt for LLVM API changes) - rust-lang#129757 (Add a test for trait solver overflow in MIR inliner cycle detection) - rust-lang#129760 (Make the "detect-old-time" UI test more representative) - rust-lang#129767 (Remove `#[macro_use] extern crate tracing`, round 4) - rust-lang#129774 (Remove `#[macro_use] extern crate tracing` from rustdoc and rustfmt) - rust-lang#129785 (Miri subtree update) - rust-lang#129791 (mark joboet as on vacation) - rust-lang#129812 (interpret, codegen: tweak some comments and checks regarding Box with custom allocator) Failed merges: - rust-lang#129777 (Add `unreachable_pub`, round 4) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 12 pull requests Successful merges: - rust-lang#129659 (const fn stability checking: also check declared language features) - rust-lang#129711 (Expand NLL MIR dumps) - rust-lang#129730 (f32 docs: define 'arithmetic' operations) - rust-lang#129733 (Subtree update of `rust-analyzer`) - rust-lang#129749 (llvm-wrapper: adapt for LLVM API changes) - rust-lang#129757 (Add a test for trait solver overflow in MIR inliner cycle detection) - rust-lang#129760 (Make the "detect-old-time" UI test more representative) - rust-lang#129767 (Remove `#[macro_use] extern crate tracing`, round 4) - rust-lang#129774 (Remove `#[macro_use] extern crate tracing` from rustdoc and rustfmt) - rust-lang#129785 (Miri subtree update) - rust-lang#129791 (mark joboet as on vacation) - rust-lang#129812 (interpret, codegen: tweak some comments and checks regarding Box with custom allocator) Failed merges: - rust-lang#129777 (Add `unreachable_pub`, round 4) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#129659 - RalfJung:const-fn-lang-feat, r=fee1-dead const fn stability checking: also check declared language features Fixes rust-lang#129656 `@oli-obk` I assume it is just an oversight that this didn't use `features().declared()`? Or is there a deep reason that this must only check `declared_lib_features`?
Fixes #129656
@oli-obk I assume it is just an oversight that this didn't use
features().declared()
? Or is there a deep reason that this must only checkdeclared_lib_features
?