mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
fix broken intradoclinks
This commit is contained in:
parent
014c6f208e
commit
5571dd061d
@ -4,6 +4,8 @@ use std::ptr::Alignment;
|
|||||||
///
|
///
|
||||||
/// This is equivalent to [`mem::align_of`], but also works for some unsized
|
/// This is equivalent to [`mem::align_of`], but also works for some unsized
|
||||||
/// types (e.g. slices or rustc's `List`s).
|
/// types (e.g. slices or rustc's `List`s).
|
||||||
|
///
|
||||||
|
/// [`mem::align_of`]: std::mem::align_of
|
||||||
pub const fn align_of<T: ?Sized + Aligned>() -> Alignment {
|
pub const fn align_of<T: ?Sized + Aligned>() -> Alignment {
|
||||||
T::ALIGN
|
T::ALIGN
|
||||||
}
|
}
|
||||||
@ -16,7 +18,7 @@ pub const fn align_of<T: ?Sized + Aligned>() -> Alignment {
|
|||||||
/// is [`mem::align_of<Self>()`], for unsized types it depends on the type, for
|
/// is [`mem::align_of<Self>()`], for unsized types it depends on the type, for
|
||||||
/// example `[T]` has alignment of `T`.
|
/// example `[T]` has alignment of `T`.
|
||||||
///
|
///
|
||||||
/// [`mem::align_of<Self>()`]: mem::align_of
|
/// [`mem::align_of<Self>()`]: std::mem::align_of
|
||||||
pub unsafe trait Aligned {
|
pub unsafe trait Aligned {
|
||||||
/// Alignment of `Self`.
|
/// Alignment of `Self`.
|
||||||
const ALIGN: Alignment;
|
const ALIGN: Alignment;
|
||||||
|
Loading…
Reference in New Issue
Block a user