6

Stabilize `unreachable_unchecked` as `const fn` by jhpratt · Pull Request #89509...

 2 years ago
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.

Copy link

Contributor

jhpratt commented 17 days ago

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)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK