Skip to content

Commit 63a7fdf

Browse files
committed
Fix types in documentation for Alignment::as_usize and Alignmnet::as_nonzero
1 parent 1536ab1 commit 63a7fdf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: library/core/src/ptr/alignment.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ impl Alignment {
8383
unsafe { mem::transmute::<usize, Alignment>(align) }
8484
}
8585

86-
/// Returns the alignment as a [`NonZeroUsize`]
86+
/// Returns the alignment as a [`usize`]
8787
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
8888
#[rustc_const_unstable(feature = "ptr_alignment_type", issue = "102070")]
8989
#[inline]
9090
pub const fn as_usize(self) -> usize {
9191
self.0 as usize
9292
}
9393

94-
/// Returns the alignment as a [`usize`]
94+
/// Returns the alignment as a [`NonZeroUsize`]
9595
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
9696
#[inline]
9797
pub const fn as_nonzero(self) -> NonZeroUsize {

0 commit comments

Comments
 (0)