File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
compiler/rustc_data_structures/src Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ use std::ptr::Alignment;
44///
55/// This is equivalent to [`mem::align_of`], but also works for some unsized
66/// types (e.g. slices or rustc's `List`s).
7+ ///
8+ /// [`mem::align_of`]: std::mem::align_of
79pub const fn align_of < T : ?Sized + Aligned > ( ) -> Alignment {
810 T :: ALIGN
911}
@@ -16,7 +18,7 @@ pub const fn align_of<T: ?Sized + Aligned>() -> Alignment {
1618/// is [`mem::align_of<Self>()`], for unsized types it depends on the type, for
1719/// example `[T]` has alignment of `T`.
1820///
19- /// [`mem::align_of<Self>()`]: mem::align_of
21+ /// [`mem::align_of<Self>()`]: std:: mem::align_of
2022pub unsafe trait Aligned {
2123 /// Alignment of `Self`.
2224 const ALIGN : Alignment ;
You can’t perform that action at this time.
0 commit comments