NonZero::from_mut_unchecked is library UB
This commit is contained in:
parent
27cf4bb985
commit
af49c4df0a
1 changed files with 1 additions and 1 deletions
|
|
@ -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,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue