@@ -231,9 +231,8 @@ impl Layout {
231231 /// Returns an error if the combination of `self.size()` and the given
232232 /// `align` violates the conditions listed in [`Layout::from_size_align`].
233233 #[ stable( feature = "alloc_layout_manipulation" , since = "1.44.0" ) ]
234- #[ rustc_const_unstable( feature = "const_alloc_layout" , issue = "67521" ) ]
235234 #[ inline]
236- pub const fn align_to ( & self , align : usize ) -> Result < Self , LayoutError > {
235+ pub fn align_to ( & self , align : usize ) -> Result < Self , LayoutError > {
237236 Layout :: from_size_align ( self . size ( ) , cmp:: max ( self . align ( ) , align) )
238237 }
239238
@@ -315,9 +314,8 @@ impl Layout {
315314 ///
316315 /// On arithmetic overflow, returns `LayoutError`.
317316 #[ unstable( feature = "alloc_layout_extra" , issue = "55724" ) ]
318- #[ rustc_const_unstable( feature = "const_alloc_layout" , issue = "67521" ) ]
319317 #[ inline]
320- pub const fn repeat ( & self , n : usize ) -> Result < ( Self , usize ) , LayoutError > {
318+ pub fn repeat ( & self , n : usize ) -> Result < ( Self , usize ) , LayoutError > {
321319 // This cannot overflow. Quoting from the invariant of Layout:
322320 // > `size`, when rounded up to the nearest multiple of `align`,
323321 // > must not overflow isize (i.e., the rounded value must be
@@ -376,9 +374,8 @@ impl Layout {
376374 /// # assert_eq!(repr_c(&[u64, u32, u16, u32]), Ok((s, vec![0, 8, 12, 16])));
377375 /// ```
378376 #[ stable( feature = "alloc_layout_manipulation" , since = "1.44.0" ) ]
379- #[ rustc_const_unstable( feature = "const_alloc_layout" , issue = "67521" ) ]
380377 #[ inline]
381- pub const fn extend ( & self , next : Self ) -> Result < ( Self , usize ) , LayoutError > {
378+ pub fn extend ( & self , next : Self ) -> Result < ( Self , usize ) , LayoutError > {
382379 let new_align = cmp:: max ( self . align , next. align ) ;
383380 let pad = self . padding_needed_for ( next. align ( ) ) ;
384381
@@ -403,9 +400,8 @@ impl Layout {
403400 ///
404401 /// On arithmetic overflow, returns `LayoutError`.
405402 #[ unstable( feature = "alloc_layout_extra" , issue = "55724" ) ]
406- #[ rustc_const_unstable( feature = "const_alloc_layout" , issue = "67521" ) ]
407403 #[ inline]
408- pub const fn repeat_packed ( & self , n : usize ) -> Result < Self , LayoutError > {
404+ pub fn repeat_packed ( & self , n : usize ) -> Result < Self , LayoutError > {
409405 let size = self . size ( ) . checked_mul ( n) . ok_or ( LayoutError ) ?;
410406 // The safe constructor is called here to enforce the isize size limit.
411407 Layout :: from_size_alignment ( size, self . align )
@@ -418,9 +414,8 @@ impl Layout {
418414 ///
419415 /// On arithmetic overflow, returns `LayoutError`.
420416 #[ unstable( feature = "alloc_layout_extra" , issue = "55724" ) ]
421- #[ rustc_const_unstable( feature = "const_alloc_layout" , issue = "67521" ) ]
422417 #[ inline]
423- pub const fn extend_packed ( & self , next : Self ) -> Result < Self , LayoutError > {
418+ pub fn extend_packed ( & self , next : Self ) -> Result < Self , LayoutError > {
424419 let new_size = self . size ( ) . checked_add ( next. size ( ) ) . ok_or ( LayoutError ) ?;
425420 // The safe constructor is called here to enforce the isize size limit.
426421 Layout :: from_size_alignment ( new_size, self . align )
0 commit comments