6
Stabilize `unreachable_unchecked` as `const fn` by jhpratt · Pull Request #89509...
source link: https://github.com/rust-lang/rust/pull/89509
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
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)
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK