about summary refs log tree commit diff
path: root/library/core/src/ptr/alignment.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-17 05:44:08 +0000
committerbors <bors@rust-lang.org>2024-02-17 05:44:08 +0000
commitbbfce9196f1c2fb224cbccd7474f8f8623eebbf9 (patch)
tree4bdb17aaad138aa83a9464e32a25528bd360f020 /library/core/src/ptr/alignment.rs
parentd2a4ef39ca8d83bbfc277b98133c11828dd5b16e (diff)
parentd523cab910d6b89b01dad9b283a67fb2256bc41e (diff)
Auto merge of #3303 - rust-lang:rustup-2024-02-17, r=saethlin
Automatic Rustup
Diffstat (limited to 'library/core/src/ptr/alignment.rs')
-rw-r--r--library/core/src/ptr/alignment.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/ptr/alignment.rs b/library/core/src/ptr/alignment.rs
index ce176e6fc18..d2422bb80ae 100644
--- a/library/core/src/ptr/alignment.rs
+++ b/library/core/src/ptr/alignment.rs
@@ -1,5 +1,5 @@
 use crate::convert::{TryFrom, TryInto};
-use crate::num::NonZeroUsize;
+use crate::num::{NonZero, NonZeroUsize};
 use crate::{cmp, fmt, hash, mem, num};
 
 /// A type storing a `usize` which is a power of two, and thus
@@ -100,7 +100,7 @@ impl Alignment {
     #[inline]
     pub const fn as_nonzero(self) -> NonZeroUsize {
         // SAFETY: All the discriminants are non-zero.
-        unsafe { NonZeroUsize::new_unchecked(self.as_usize()) }
+        unsafe { NonZero::new_unchecked(self.as_usize()) }
     }
 
     /// Returns the base-2 logarithm of the alignment.