about summary refs log tree commit diff
path: root/library/core/src/ptr/alignment.rs
diff options
context:
space:
mode:
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..ad22ee5a027 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::<usize>::new_unchecked(self.as_usize()) }
     }
 
     /// Returns the base-2 logarithm of the alignment.