@@ -84,7 +84,7 @@ use crate::ptr;
84
84
/// [`NonNull::dangling()`]: ptr::NonNull::dangling
85
85
#[ inline]
86
86
#[ 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 " ) ]
88
88
pub const unsafe fn from_raw_parts < ' a , T > ( data : * const T , len : usize ) -> & ' a [ T ] {
89
89
debug_check_data_len ( data, len) ;
90
90
@@ -133,8 +133,7 @@ pub const unsafe fn from_raw_parts_mut<'a, T>(data: *mut T, len: usize) -> &'a m
133
133
134
134
// 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
135
135
#[ 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" ) ]
138
137
const fn debug_check_data_len < T > ( data : * const T , len : usize ) {
139
138
fn rt_check < T > ( data : * const T ) {
140
139
use crate :: intrinsics:: is_aligned_and_not_null;
@@ -147,7 +146,7 @@ const fn debug_check_data_len<T>(data: *const T, len: usize) {
147
146
// SAFETY:
148
147
//
149
148
// `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
151
150
// the `from_raw_parts[_mut]` caller).
152
151
//
153
152
// As per our safety precondition, we may assume that assertion above never fails.
0 commit comments