Skip to content

Commit f5975e5

Browse files
committed
Fix incorrect usages of rustc_const_stable attribute.
1 parent 35446b6 commit f5975e5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/core/src/ptr/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ pub const fn null_mut<T>() -> *mut T {
255255
/// ```
256256
#[inline]
257257
#[stable(feature = "slice_from_raw_parts", since = "1.42.0")]
258-
#[rustc_const_stable(since = "1.61.0")]
258+
#[rustc_const_stable(feature = "const_slice_from_raw_parts", since = "1.61.0")]
259259
pub const fn slice_from_raw_parts<T>(data: *const T, len: usize) -> *const [T] {
260260
from_raw_parts(data.cast(), len)
261261
}

library/core/src/slice/raw.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -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_stable(since = "1.61.0")]
87+
#[rustc_const_stable(feature = "const_slice_from_raw_parts", since = "1.61.0")]
8888
pub const unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T] {
8989
debug_check_data_len(data, len);
9090

0 commit comments

Comments
 (0)