@@ -314,8 +314,7 @@ impl<T> MaybeUninit<T> {
314314 /// let data = read(&mut buf);
315315 /// ```
316316 #[ unstable( feature = "maybe_uninit_uninit_array" , issue = "none" ) ]
317- #[ rustc_const_unstable( feature = "const_maybe_assume_init" , issue = "none" ) ]
318- #[ rustc_allow_const_fn_unstable( const_maybe_assume_init) ]
317+ #[ rustc_const_unstable( feature = "maybe_uninit_uninit_array" , issue = "none" ) ]
319318 #[ inline( always) ]
320319 pub const fn uninit_array < const LEN : usize > ( ) -> [ Self ; LEN ] {
321320 // SAFETY: An uninitialized `[MaybeUninit<_>; LEN]` is valid.
@@ -505,7 +504,7 @@ impl<T> MaybeUninit<T> {
505504 /// // `x` had not been initialized yet, so this last line caused undefined behavior. ⚠️
506505 /// ```
507506 #[ stable( feature = "maybe_uninit" , since = "1.36.0" ) ]
508- #[ rustc_const_unstable( feature = "const_maybe_assume_init " , issue = "none" ) ]
507+ #[ rustc_const_unstable( feature = "const_maybe_uninit_assume_init " , issue = "none" ) ]
509508 #[ inline( always) ]
510509 #[ rustc_diagnostic_item = "assume_init" ]
511510 pub const unsafe fn assume_init ( self ) -> T {
@@ -813,7 +812,7 @@ impl<T> MaybeUninit<T> {
813812 ///
814813 /// [`assume_init_ref`]: MaybeUninit::assume_init_ref
815814 #[ unstable( feature = "maybe_uninit_slice" , issue = "63569" ) ]
816- #[ rustc_const_unstable( feature = "const_maybe_assume_init " , issue = "none" ) ]
815+ #[ rustc_const_unstable( feature = "const_maybe_uninit_assume_init " , issue = "none" ) ]
817816 #[ inline( always) ]
818817 pub const unsafe fn slice_assume_init_ref ( slice : & [ Self ] ) -> & [ T ] {
819818 // SAFETY: casting slice to a `*const [T]` is safe since the caller guarantees that
@@ -835,7 +834,7 @@ impl<T> MaybeUninit<T> {
835834 ///
836835 /// [`assume_init_mut`]: MaybeUninit::assume_init_mut
837836 #[ unstable( feature = "maybe_uninit_slice" , issue = "63569" ) ]
838- #[ rustc_const_unstable( feature = "const_maybe_assume_init " , issue = "none" ) ]
837+ #[ rustc_const_unstable( feature = "const_maybe_uninit_assume_init " , issue = "none" ) ]
839838 #[ inline( always) ]
840839 pub const unsafe fn slice_assume_init_mut ( slice : & mut [ Self ] ) -> & mut [ T ] {
841840 // SAFETY: similar to safety notes for `slice_get_ref`, but we have a
@@ -845,17 +844,15 @@ impl<T> MaybeUninit<T> {
845844
846845 /// Gets a pointer to the first element of the array.
847846 #[ unstable( feature = "maybe_uninit_slice" , issue = "63569" ) ]
848- #[ rustc_const_unstable( feature = "const_maybe_assume_init" , issue = "none" ) ]
849847 #[ inline( always) ]
850- pub const fn slice_as_ptr ( this : & [ MaybeUninit < T > ] ) -> * const T {
848+ pub fn slice_as_ptr ( this : & [ MaybeUninit < T > ] ) -> * const T {
851849 this. as_ptr ( ) as * const T
852850 }
853851
854852 /// Gets a mutable pointer to the first element of the array.
855853 #[ unstable( feature = "maybe_uninit_slice" , issue = "63569" ) ]
856- #[ rustc_const_unstable( feature = "const_maybe_assume_init" , issue = "none" ) ]
857854 #[ inline( always) ]
858- pub const fn slice_as_mut_ptr ( this : & mut [ MaybeUninit < T > ] ) -> * mut T {
855+ pub fn slice_as_mut_ptr ( this : & mut [ MaybeUninit < T > ] ) -> * mut T {
859856 this. as_mut_ptr ( ) as * mut T
860857 }
861858}
0 commit comments