We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 014c6f2 commit 5571dd0Copy full SHA for 5571dd0
compiler/rustc_data_structures/src/aligned.rs
@@ -4,6 +4,8 @@ use std::ptr::Alignment;
4
///
5
/// This is equivalent to [`mem::align_of`], but also works for some unsized
6
/// types (e.g. slices or rustc's `List`s).
7
+///
8
+/// [`mem::align_of`]: std::mem::align_of
9
pub const fn align_of<T: ?Sized + Aligned>() -> Alignment {
10
T::ALIGN
11
}
@@ -16,7 +18,7 @@ pub const fn align_of<T: ?Sized + Aligned>() -> Alignment {
16
18
/// is [`mem::align_of<Self>()`], for unsized types it depends on the type, for
17
19
/// example `[T]` has alignment of `T`.
20
-/// [`mem::align_of<Self>()`]: mem::align_of
21
+/// [`mem::align_of<Self>()`]: std::mem::align_of
22
pub unsafe trait Aligned {
23
/// Alignment of `Self`.
24
const ALIGN: Alignment;
0 commit comments