about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-10-17 13:11:07 +0200
committerGitHub <noreply@github.com>2022-10-17 13:11:07 +0200
commit0c2017ff54a888735cb9b8837ce22b959c323772 (patch)
treeada71d187c909b9be15e353caa58cd432b13c1d0
parent81ea72b38e0749b5c462840cac7989078a4648a8 (diff)
parent63a7fdf61b593e2287780afb917d7e6910685804 (diff)
downloadrust-0c2017ff54a888735cb9b8837ce22b959c323772.tar.gz
rust-0c2017ff54a888735cb9b8837ce22b959c323772.zip
Rollup merge of #103136 - tmccombs:alignment-doc-fixes, r=Dylan-DPC
Fix types in documentation for `Alignment::as_usize` and `Alignmnet::as_nonzero`
-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 56c5e6cb724..846efbc4ebf 100644
--- a/library/core/src/ptr/alignment.rs
+++ b/library/core/src/ptr/alignment.rs
@@ -83,7 +83,7 @@ impl Alignment {
         unsafe { mem::transmute::<usize, Alignment>(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 {