@@ -37,7 +37,7 @@ impl Alignment {
3737 ///
3838 /// ```
3939 /// #![feature(ptr_alignment_type)]
40- /// use std::ptr ::Alignment;
40+ /// use std::mem ::Alignment;
4141 ///
4242 /// assert_eq!(Alignment::MIN.as_usize(), 1);
4343 /// ```
@@ -65,7 +65,7 @@ impl Alignment {
6565 ///
6666 /// ```
6767 /// #![feature(ptr_alignment_type)]
68- /// use std::ptr ::Alignment;
68+ /// use std::mem ::Alignment;
6969 ///
7070 /// assert_eq!(Alignment::of_val(&5i32).as_usize(), 4);
7171 /// ```
@@ -112,14 +112,13 @@ impl Alignment {
112112 ///
113113 /// ```
114114 /// #![feature(ptr_alignment_type)]
115- /// use std::ptr ::Alignment;
115+ /// use std::mem ::Alignment;
116116 ///
117117 /// assert_eq!(unsafe { Alignment::of_val_raw(&5i32) }.as_usize(), 4);
118118 /// ```
119119 #[ inline]
120120 #[ must_use]
121121 #[ unstable( feature = "ptr_alignment_type" , issue = "102070" ) ]
122- // #[unstable(feature = "layout_for_ptr", issue = "69835")]
123122 pub const unsafe fn of_val_raw < T : MetaSized > ( val : * const T ) -> Self {
124123 // SAFETY: precondition propagated to the caller
125124 let align = unsafe { mem:: align_of_val_raw ( val) } ;
@@ -214,9 +213,10 @@ impl Alignment {
214213 /// # Examples
215214 ///
216215 /// ```
217- /// #![feature(ptr_alignment_type)]
218216 /// #![feature(ptr_mask)]
219- /// use std::ptr::{Alignment, NonNull};
217+ /// #![feature(ptr_alignment_type)]
218+ /// use std::mem::Alignment;
219+ /// use std::ptr::NonNull;
220220 ///
221221 /// #[repr(align(1))] struct Align1(u8);
222222 /// #[repr(align(2))] struct Align2(u16);
@@ -294,7 +294,7 @@ impl const From<Alignment> for usize {
294294impl cmp:: Ord for Alignment {
295295 #[ inline]
296296 fn cmp ( & self , other : & Self ) -> cmp:: Ordering {
297- self . as_nonzero ( ) . get ( ) . cmp ( & other. as_nonzero ( ) . get ( ) )
297+ self . as_nonzero ( ) . cmp ( & other. as_nonzero ( ) )
298298 }
299299}
300300
0 commit comments