Skip to content

Commit 1cc88be

Browse files
committed
De-stabilize core::slice::{from_ref, from_ref_mut}.
1 parent 8431811 commit 1cc88be

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/liballoc/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
#![feature(dropck_eyepatch)]
9494
#![feature(exact_size_is_empty)]
9595
#![feature(fmt_internals)]
96+
#![feature(from_ref)]
9697
#![feature(fundamental)]
9798
#![feature(fused)]
9899
#![feature(generic_param_attrs)]

src/liballoc/slice.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub use core::slice::{SplitN, RSplitN, SplitNMut, RSplitNMut};
119119
pub use core::slice::{RSplit, RSplitMut};
120120
#[stable(feature = "rust1", since = "1.0.0")]
121121
pub use core::slice::{from_raw_parts, from_raw_parts_mut};
122-
#[stable(feature = "from_ref", since = "1.22.0")]
122+
#[unstable(feature = "from_ref", issue = "45703")]
123123
pub use core::slice::{from_ref, from_ref_mut};
124124
#[unstable(feature = "slice_get_slice", issue = "35729")]
125125
pub use core::slice::SliceIndex;

src/libcore/slice/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2451,15 +2451,15 @@ pub unsafe fn from_raw_parts_mut<'a, T>(p: *mut T, len: usize) -> &'a mut [T] {
24512451
}
24522452

24532453
/// Converts a reference to T into a slice of length 1 (without copying).
2454-
#[stable(feature = "from_ref", since = "1.22.0")]
2454+
#[unstable(feature = "from_ref", issue = "45703")]
24552455
pub fn from_ref<T>(s: &T) -> &[T] {
24562456
unsafe {
24572457
from_raw_parts(s, 1)
24582458
}
24592459
}
24602460

24612461
/// Converts a reference to T into a slice of length 1 (without copying).
2462-
#[stable(feature = "from_ref", since = "1.22.0")]
2462+
#[unstable(feature = "from_ref", issue = "45703")]
24632463
pub fn from_ref_mut<T>(s: &mut T) -> &mut [T] {
24642464
unsafe {
24652465
from_raw_parts_mut(s, 1)

0 commit comments

Comments
 (0)