File tree Expand file tree Collapse file tree 4 files changed +4
-6
lines changed Expand file tree Collapse file tree 4 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,8 @@ pub const fn from_ref<T>(s: &T) -> &[T; 1] {
146146
147147/// Converts a mutable reference to `T` into a mutable reference to an array of length 1 (without copying).
148148#[ stable( feature = "array_from_ref" , since = "1.53.0" ) ]
149- #[ rustc_const_unstable( feature = "const_array_from_ref" , issue = "90206" ) ]
149+ #[ rustc_const_stable( feature = "const_array_from_ref" , since = "CURRENT_RUSTC_VERSION" ) ]
150+ #[ cfg_attr( bootstrap, rustc_allow_const_fn_unstable( const_mut_refs) ) ]
150151pub const fn from_mut < T > ( s : & mut T ) -> & mut [ T ; 1 ] {
151152 // SAFETY: Converting `&mut T` to `&mut [T; 1]` is sound.
152153 unsafe { & mut * ( s as * mut T ) . cast :: < [ T ; 1 ] > ( ) }
Original file line number Diff line number Diff line change 114114#![ feature( const_align_offset) ]
115115#![ feature( const_alloc_layout) ]
116116#![ feature( const_arguments_as_str) ]
117- #![ feature( const_array_from_ref) ]
118117#![ feature( const_array_into_iter_constructors) ]
119118#![ feature( const_bigint_helper_methods) ]
120119#![ feature( const_black_box) ]
145144#![ feature( const_replace) ]
146145#![ feature( const_size_of_val) ]
147146#![ feature( const_size_of_val_raw) ]
148- #![ feature( const_slice_from_ref) ]
149147#![ feature( const_strict_overflow_ops) ]
150148#![ feature( const_swap) ]
151149#![ feature( const_try) ]
Original file line number Diff line number Diff line change @@ -204,7 +204,8 @@ pub const fn from_ref<T>(s: &T) -> &[T] {
204204
205205/// Converts a reference to T into a slice of length 1 (without copying).
206206#[ stable( feature = "from_ref" , since = "1.28.0" ) ]
207- #[ rustc_const_unstable( feature = "const_slice_from_ref" , issue = "90206" ) ]
207+ #[ rustc_const_stable( feature = "const_slice_from_ref" , since = "CURRENT_RUSTC_VERSION" ) ]
208+ #[ cfg_attr( bootstrap, rustc_allow_const_fn_unstable( const_mut_refs) ) ]
208209#[ must_use]
209210pub const fn from_mut < T > ( s : & mut T ) -> & mut [ T ] {
210211 array:: from_mut ( s)
Original file line number Diff line number Diff line change 1616#![ feature( clone_to_uninit) ]
1717#![ feature( const_align_of_val_raw) ]
1818#![ feature( const_align_offset) ]
19- #![ feature( const_array_from_ref) ]
2019#![ feature( const_black_box) ]
2120#![ feature( const_hash) ]
2221#![ feature( const_heap) ]
3130#![ feature( const_pointer_is_aligned) ]
3231#![ feature( const_ptr_write) ]
3332#![ feature( const_result) ]
34- #![ feature( const_slice_from_ref) ]
3533#![ feature( const_three_way_compare) ]
3634#![ feature( const_trait_impl) ]
3735#![ feature( core_intrinsics) ]
You can’t perform that action at this time.
0 commit comments