Skip to content

Commit 3a0226d

Browse files
m-ou-seRalfJung
andcommitted
Improve comments about const panic handling
Co-authored-by: Ralf Jung <[email protected]>
1 parent b205ee4 commit 3a0226d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/panicking.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ pub const fn const_panic_fmt(fmt: fmt::Arguments<'_>) -> ! {
100100
if let Some(msg) = fmt.as_str() {
101101
panic_str(msg);
102102
} else {
103-
// SAFETY: This is only evaluated at compile time, which handles this
104-
// fine (in case it turns out this branch turns out to be reachable
103+
// SAFETY: This is only evaluated at compile time, which reliably
104+
// handles this UB (in case this branch turns out to be reachable
105105
// somehow).
106106
unsafe { crate::hint::unreachable_unchecked() };
107107
}

0 commit comments

Comments
 (0)