@@ -314,8 +314,7 @@ impl<T> MaybeUninit<T> {
314
314
/// let data = read(&mut buf);
315
315
/// ```
316
316
#[ 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" ) ]
319
318
#[ inline( always) ]
320
319
pub const fn uninit_array < const LEN : usize > ( ) -> [ Self ; LEN ] {
321
320
// SAFETY: An uninitialized `[MaybeUninit<_>; LEN]` is valid.
@@ -505,7 +504,7 @@ impl<T> MaybeUninit<T> {
505
504
/// // `x` had not been initialized yet, so this last line caused undefined behavior. ⚠️
506
505
/// ```
507
506
#[ 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" ) ]
509
508
#[ inline( always) ]
510
509
#[ rustc_diagnostic_item = "assume_init" ]
511
510
pub const unsafe fn assume_init ( self ) -> T {
@@ -813,7 +812,7 @@ impl<T> MaybeUninit<T> {
813
812
///
814
813
/// [`assume_init_ref`]: MaybeUninit::assume_init_ref
815
814
#[ 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" ) ]
817
816
#[ inline( always) ]
818
817
pub const unsafe fn slice_assume_init_ref ( slice : & [ Self ] ) -> & [ T ] {
819
818
// SAFETY: casting slice to a `*const [T]` is safe since the caller guarantees that
@@ -835,7 +834,7 @@ impl<T> MaybeUninit<T> {
835
834
///
836
835
/// [`assume_init_mut`]: MaybeUninit::assume_init_mut
837
836
#[ 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" ) ]
839
838
#[ inline( always) ]
840
839
pub const unsafe fn slice_assume_init_mut ( slice : & mut [ Self ] ) -> & mut [ T ] {
841
840
// SAFETY: similar to safety notes for `slice_get_ref`, but we have a
@@ -845,17 +844,15 @@ impl<T> MaybeUninit<T> {
845
844
846
845
/// Gets a pointer to the first element of the array.
847
846
#[ unstable( feature = "maybe_uninit_slice" , issue = "63569" ) ]
848
- #[ rustc_const_unstable( feature = "const_maybe_assume_init" , issue = "none" ) ]
849
847
#[ 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 {
851
849
this. as_ptr ( ) as * const T
852
850
}
853
851
854
852
/// Gets a mutable pointer to the first element of the array.
855
853
#[ unstable( feature = "maybe_uninit_slice" , issue = "63569" ) ]
856
- #[ rustc_const_unstable( feature = "const_maybe_assume_init" , issue = "none" ) ]
857
854
#[ 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 {
859
856
this. as_mut_ptr ( ) as * mut T
860
857
}
861
858
}
0 commit comments