]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/mem.rs
Auto merge of #54596 - mjbshaw:drop, r=RalfJung
[rust.git] / src / libcore / mem.rs
index dd3775bff5edd643c9953c39d6fbc9c14bd72f5f..f537add999a0397e30b8ad33c0cb04bfd1eb9a95 100644 (file)
@@ -285,19 +285,10 @@ pub fn forget<T>(t: T) {
 /// [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
@@ -343,20 +334,10 @@ pub fn size_of_val<T: ?Sized>(val: &T) -> usize {
 #[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.
@@ -395,19 +376,10 @@ pub fn min_align_of_val<T: ?Sized>(val: &T) -> usize {
 /// ```
 #[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.