/// [alignment]: ./fn.align_of.html
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg(not(stage0))]
pub const fn size_of<T>() -> usize {
intrinsics::size_of::<T>()
}
-#[inline]
-#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg(stage0)]
-/// Ceci n'est pas la documentation
-pub const fn size_of<T>() -> usize {
- unsafe { intrinsics::size_of::<T>() }
-}
-
/// Returns the size of the pointed-to value in bytes.
///
/// This is usually the same as `size_of::<T>()`. However, when `T` *has* no
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_deprecated(reason = "use `align_of` instead", since = "1.2.0")]
-#[cfg(not(stage0))]
pub fn min_align_of<T>() -> usize {
intrinsics::min_align_of::<T>()
}
-#[inline]
-#[stable(feature = "rust1", since = "1.0.0")]
-#[rustc_deprecated(reason = "use `align_of` instead", since = "1.2.0")]
-#[cfg(stage0)]
-/// Ceci n'est pas la documentation
-pub fn min_align_of<T>() -> usize {
- unsafe { intrinsics::min_align_of::<T>() }
-}
-
/// Returns the [ABI]-required minimum alignment of the type of the value that `val` points to.
///
/// Every reference to a value of the type `T` must be a multiple of this number.
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg(not(stage0))]
pub const fn align_of<T>() -> usize {
intrinsics::min_align_of::<T>()
}
-#[inline]
-#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg(stage0)]
-/// Ceci n'est pas la documentation
-pub const fn align_of<T>() -> usize {
- unsafe { intrinsics::min_align_of::<T>() }
-}
-
/// Returns the [ABI]-required minimum alignment of the type of the value that `val` points to.
///
/// Every reference to a value of the type `T` must be a multiple of this number.