Rollup merge of #103136 - tmccombs:alignment-doc-fixes, r=Dylan-DPC

Fix types in documentation for `Alignment::as_usize` and `Alignmnet::as_nonzero`
This commit is contained in:
Matthias Krüger 2022-10-17 13:11:07 +02:00 committed by GitHub
commit 0c2017ff54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {