@@ -84,7 +84,7 @@ use crate::ptr;
8484/// [`NonNull::dangling()`]: ptr::NonNull::dangling
8585#[ inline]
8686#[ stable( feature = "rust1" , since = "1.0.0" ) ]
87- #[ rustc_const_unstable ( feature = "const_slice_from_raw_parts" , issue = "67456 ") ]
87+ #[ rustc_const_stable ( since = "1.61.0 " ) ]
8888pub const unsafe fn from_raw_parts < ' a , T > ( data : * const T , len : usize ) -> & ' a [ T ] {
8989 debug_check_data_len ( data, len) ;
9090
@@ -133,8 +133,7 @@ pub const unsafe fn from_raw_parts_mut<'a, T>(data: *mut T, len: usize) -> &'a m
133133
134134// In debug builds checks that `data` pointer is aligned and non-null and that slice with given `len` would cover less than half the address space
135135#[ cfg( debug_assertions) ]
136- #[ unstable( feature = "const_slice_from_raw_parts" , issue = "67456" ) ]
137- #[ rustc_const_unstable( feature = "const_slice_from_raw_parts" , issue = "67456" ) ]
136+ #[ rustc_const_stable( since = "1.61.0" ) ]
138137const fn debug_check_data_len < T > ( data : * const T , len : usize ) {
139138 fn rt_check < T > ( data : * const T ) {
140139 use crate :: intrinsics:: is_aligned_and_not_null;
@@ -147,7 +146,7 @@ const fn debug_check_data_len<T>(data: *const T, len: usize) {
147146 // SAFETY:
148147 //
149148 // `rt_check` is just a debug assert to hint users that they are causing UB,
150- // it is not required for safety (the safety must be guatanteed by
149+ // it is not required for safety (the safety must be guaranteed by
151150 // the `from_raw_parts[_mut]` caller).
152151 //
153152 // As per our safety precondition, we may assume that assertion above never fails.
0 commit comments