Skip to content

Commit

Permalink
Fix incorrect usages of rustc_const_stable attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobz committed Mar 15, 2022
1 parent 35446b6 commit f5975e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/core/src/ptr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ pub const fn null_mut<T>() -> *mut T {
/// ```
#[inline]
#[stable(feature = "slice_from_raw_parts", since = "1.42.0")]
#[rustc_const_stable(since = "1.61.0")]
#[rustc_const_stable(feature = "const_slice_from_raw_parts", since = "1.61.0")]
pub const fn slice_from_raw_parts<T>(data: *const T, len: usize) -> *const [T] {
from_raw_parts(data.cast(), len)
}
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/slice/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ use crate::ptr;
/// [`NonNull::dangling()`]: ptr::NonNull::dangling
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(since = "1.61.0")]
#[rustc_const_stable(feature = "const_slice_from_raw_parts", since = "1.61.0")]
pub const unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T] {
debug_check_data_len(data, len);

Expand Down

0 comments on commit f5975e5

Please sign in to comment.