about summary refs log tree commit diff
path: root/src/libcore/slice
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-05-23 00:26:17 +0800
committerGitHub <noreply@github.com>2018-05-23 00:26:17 +0800
commit98e801ac0be56d20dfdecb235cf912c58f9a9531 (patch)
treef5974a1802a4b376b195d029bb67d8b07466bfd7 /src/libcore/slice
parent5b67b13d1e3eb657e94bcf974579c576bbbab873 (diff)
parent26d62f55a40db77c6bca85ad56a44aee898096a5 (diff)
downloadrust-98e801ac0be56d20dfdecb235cf912c58f9a9531.tar.gz
rust-98e801ac0be56d20dfdecb235cf912c58f9a9531.zip
Rollup merge of #50945 - stjepang:stabilize-from-ref, r=SimonSapin
Stabilize feature from_ref

Function `from_ref_mut` is now renamed to `from_mut`, as discussed in #45703.

Closes #45703.

r? @SimonSapin
Diffstat (limited to 'src/libcore/slice')
-rw-r--r--src/libcore/slice/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs
index b453edcb4e1..ab986e4c86d 100644
--- a/src/libcore/slice/mod.rs
+++ b/src/libcore/slice/mod.rs
@@ -3884,7 +3884,7 @@ pub unsafe fn from_raw_parts_mut<'a, T>(data: *mut T, len: usize) -> &'a mut [T]
 }
 
 /// Converts a reference to T into a slice of length 1 (without copying).
-#[unstable(feature = "from_ref", issue = "45703")]
+#[stable(feature = "from_ref", since = "1.28.0")]
 pub fn from_ref<T>(s: &T) -> &[T] {
     unsafe {
         from_raw_parts(s, 1)
@@ -3892,8 +3892,8 @@ pub fn from_ref<T>(s: &T) -> &[T] {
 }
 
 /// Converts a reference to T into a slice of length 1 (without copying).
-#[unstable(feature = "from_ref", issue = "45703")]
-pub fn from_ref_mut<T>(s: &mut T) -> &mut [T] {
+#[stable(feature = "from_ref", since = "1.28.0")]
+pub fn from_mut<T>(s: &mut T) -> &mut [T] {
     unsafe {
         from_raw_parts_mut(s, 1)
     }