Stabilize unreachable_unchecked
as const fn
by jhpratt · Pull Request #89509 · rust-lang/rust (original) (raw)
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Closes #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 #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)
rustbot added A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
Status: Blocked on something else such as an RFC or other implementation work.
Relevant to the language team, which will review and decide on the PR/issue.
labels
(rust-highfive has picked a reviewer for you, use r? to override)
📌 Commit 11140ff has been approved by joshtriplett
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Status: Blocked on something else such as an RFC or other implementation work.
labels
bors added S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
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.
joshtriplett added the relnotes
Marks issues that should be documented in the release notes of the next release.
label
I'd like to see @RalfJung or @oli-obk weigh in, or perhaps a brief stabilization report. I'm not really particularly familiar with this intrinsic, I have to admit.
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.
🔔 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.
📌 Commit 11140ff has been approved by oli-obk
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
JohnTitor added a commit to JohnTitor/rust that referenced this pull request
…_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)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
…_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)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
…_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)
jackh726 added a commit to jackh726/rust that referenced this pull request
…_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 added a commit to rust-lang-ci/rust that referenced this pull request
jhpratt deleted the stabilize-const_unreachable_unchecked branch
ojeda mentioned this pull request
95 tasks
Labels
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
This issue / PR is in PFCP or FCP with a disposition to merge it.
The final comment period is finished for this PR / Issue.
Marks issues that should be documented in the release notes of the next release.
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the language team, which will review and decide on the PR/issue.