From 63a7fdf61b593e2287780afb917d7e6910685804 Mon Sep 17 00:00:00 2001 From: Thayne McCombs Date: Sun, 16 Oct 2022 23:44:06 -0600 Subject: [PATCH] Fix types in documentation for Alignment::as_usize and Alignmnet::as_nonzero --- library/core/src/ptr/alignment.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/core/src/ptr/alignment.rs b/library/core/src/ptr/alignment.rs index 56c5e6cb72462..846efbc4ebf6c 100644 --- a/library/core/src/ptr/alignment.rs +++ b/library/core/src/ptr/alignment.rs @@ -83,7 +83,7 @@ impl Alignment { unsafe { mem::transmute::(align) } } - /// Returns the alignment as a [`NonZeroUsize`] + /// Returns the alignment as a [`usize`] #[unstable(feature = "ptr_alignment_type", issue = "102070")] #[rustc_const_unstable(feature = "ptr_alignment_type", issue = "102070")] #[inline] @@ -91,7 +91,7 @@ impl Alignment { self.0 as usize } - /// Returns the alignment as a [`usize`] + /// Returns the alignment as a [`NonZeroUsize`] #[unstable(feature = "ptr_alignment_type", issue = "102070")] #[inline] pub const fn as_nonzero(self) -> NonZeroUsize {