Skip to content

Commit

Permalink
NonZero::from_mut_unchecked is library UB
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Mar 9, 2024
1 parent 27cf4bb commit af49c4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/num/nonzero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ where
// SAFETY: The caller guarantees that `n` references a value that is non-zero, so this is unreachable.
unsafe {
intrinsics::assert_unsafe_precondition!(
check_language_ub,
check_library_ub,
"NonZero::from_mut_unchecked requires the argument to dereference as non-zero",
() => false,
);
Expand Down

0 comments on commit af49c4d

Please sign in to comment.