about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2024-03-09 12:26:48 -0500
committerBen Kimock <kimockb@gmail.com>2024-03-09 12:27:11 -0500
commitaf49c4df0a666f3ed0cefaae63851667dde9647d (patch)
tree445d9e777a23f9ee19af0f54d8313c8f994cc66a
parent27cf4bb98516c801c8b24d80cd78cd5eee8edaff (diff)
downloadrust-af49c4df0a666f3ed0cefaae63851667dde9647d.tar.gz
rust-af49c4df0a666f3ed0cefaae63851667dde9647d.zip
NonZero::from_mut_unchecked is library UB
-rw-r--r--library/core/src/num/nonzero.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs
index 012f224a4a2..6cbcac20ea1 100644
--- a/library/core/src/num/nonzero.rs
+++ b/library/core/src/num/nonzero.rs
@@ -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,
                     );