-
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
Stabilize unreachable_unchecked
as const fn
#89509
Stabilize unreachable_unchecked
as const fn
#89509
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
@bors r+ |
📌 Commit 11140ff has been approved by |
@bors r- |
@rfcbot merge |
Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Yeah, this intrinsic is basically the simplest kind of UB we have, so with const_panic stable I see no reason not to stabilize this as well. |
@rfcbot fcp reviewed :) |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
@bors r+ |
📌 Commit 11140ff has been approved by |
…_unchecked, r=oli-obk Stabilize `unreachable_unchecked` as `const fn` Closes rust-lang#53188 This PR stabilizes `core::hint::unreachable_unchecked` as `const fn`. MIRI is able to detect when this method is called. Stabilization was delayed until `const_panic` was stabilized so as to avoid users calling this method in its place (thus resulting in runtime UB). With rust-lang#89508, that is no longer an issue. `@rustbot` label +A-const-eval +A-const-fn +T-lang +S-blocked (not sure why it's T-lang, but that's what the tracking issue is)
@bors rollup |
…_unchecked, r=oli-obk Stabilize `unreachable_unchecked` as `const fn` Closes rust-lang#53188 This PR stabilizes `core::hint::unreachable_unchecked` as `const fn`. MIRI is able to detect when this method is called. Stabilization was delayed until `const_panic` was stabilized so as to avoid users calling this method in its place (thus resulting in runtime UB). With rust-lang#89508, that is no longer an issue. `@rustbot` label +A-const-eval +A-const-fn +T-lang +S-blocked (not sure why it's T-lang, but that's what the tracking issue is)
…_unchecked, r=oli-obk Stabilize `unreachable_unchecked` as `const fn` Closes rust-lang#53188 This PR stabilizes `core::hint::unreachable_unchecked` as `const fn`. MIRI is able to detect when this method is called. Stabilization was delayed until `const_panic` was stabilized so as to avoid users calling this method in its place (thus resulting in runtime UB). With rust-lang#89508, that is no longer an issue. ``@rustbot`` label +A-const-eval +A-const-fn +T-lang +S-blocked (not sure why it's T-lang, but that's what the tracking issue is)
…_unchecked, r=oli-obk Stabilize `unreachable_unchecked` as `const fn` Closes rust-lang#53188 This PR stabilizes `core::hint::unreachable_unchecked` as `const fn`. MIRI is able to detect when this method is called. Stabilization was delayed until `const_panic` was stabilized so as to avoid users calling this method in its place (thus resulting in runtime UB). With rust-lang#89508, that is no longer an issue. ```@rustbot``` label +A-const-eval +A-const-fn +T-lang +S-blocked (not sure why it's T-lang, but that's what the tracking issue is)
…askrgr Rollup of 10 pull requests Successful merges: - rust-lang#89509 (Stabilize `unreachable_unchecked` as `const fn`) - rust-lang#89898 (Remove alloc::prelude) - rust-lang#89902 (Restrict the aarch64 outline atomics test to Linux) - rust-lang#89906 (Moved format-version constant to rustdoc-json-types) - rust-lang#89912 (emitter: current substitution can be multi-line) - rust-lang#89914 (Emit impl difference error for GenericBoundFailure too) - rust-lang#89915 (Some outlives cleanup) - rust-lang#89918 (Add some GATs related regression tests) - rust-lang#89921 ([fuchsia] Update process info struct) - rust-lang#89925 (updating docs to mention usage of AtomicBool) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Closes #53188
This PR stabilizes
core::hint::unreachable_unchecked
asconst fn
. MIRI is able to detect when this method is called. Stabilization was delayed untilconst_panic
was stabilized so as to avoid users calling this method in its place (thus resulting in runtime UB). With #89508, that is no longer an issue.@rustbot label +A-const-eval +A-const-fn +T-lang +S-blocked
(not sure why it's T-lang, but that's what the tracking issue is)