Skip to content

Commit af49c4d

Browse files
committed
NonZero::from_mut_unchecked is library UB
1 parent 27cf4bb commit af49c4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/num/nonzero.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ where
368368
// SAFETY: The caller guarantees that `n` references a value that is non-zero, so this is unreachable.
369369
unsafe {
370370
intrinsics::assert_unsafe_precondition!(
371-
check_language_ub,
371+
check_library_ub,
372372
"NonZero::from_mut_unchecked requires the argument to dereference as non-zero",
373373
() => false,
374374
);

0 commit comments

Comments
 (0)