@@ -188,26 +188,6 @@ pub fn forget<T>(t: T) {
188188/// ```
189189#[ inline]
190190#[ stable( feature = "rust1" , since = "1.0.0" ) ]
191- #[ cfg( stage0) ]
192- pub fn size_of < T > ( ) -> usize {
193- unsafe { intrinsics:: size_of :: < T > ( ) }
194- }
195-
196- /// Returns the size of a type in bytes.
197- ///
198- /// More specifically, this is the offset in bytes between successive
199- /// items of the same type, including alignment padding.
200- ///
201- /// # Examples
202- ///
203- /// ```
204- /// use std::mem;
205- ///
206- /// assert_eq!(4, mem::size_of::<i32>());
207- /// ```
208- #[ inline]
209- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
210- #[ cfg( not( stage0) ) ]
211191pub const fn size_of < T > ( ) -> usize {
212192 unsafe { intrinsics:: size_of :: < T > ( ) }
213193}
@@ -299,29 +279,6 @@ pub fn min_align_of_val<T: ?Sized>(val: &T) -> usize {
299279/// ```
300280#[ inline]
301281#[ stable( feature = "rust1" , since = "1.0.0" ) ]
302- #[ cfg( stage0) ]
303- pub fn align_of < T > ( ) -> usize {
304- unsafe { intrinsics:: min_align_of :: < T > ( ) }
305- }
306-
307- /// Returns the [ABI]-required minimum alignment of a type.
308- ///
309- /// Every reference to a value of the type `T` must be a multiple of this number.
310- ///
311- /// This is the alignment used for struct fields. It may be smaller than the preferred alignment.
312- ///
313- /// [ABI]: https://en.wikipedia.org/wiki/Application_binary_interface
314- ///
315- /// # Examples
316- ///
317- /// ```
318- /// use std::mem;
319- ///
320- /// assert_eq!(4, mem::align_of::<i32>());
321- /// ```
322- #[ inline]
323- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
324- #[ cfg( not( stage0) ) ]
325282pub const fn align_of < T > ( ) -> usize {
326283 unsafe { intrinsics:: min_align_of :: < T > ( ) }
327284}
0 commit comments