mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Rollup merge of #59280 - joshlf:sandbox/joshlf/stabilize-refcell-map-split, r=cramertj,Centril
Stabilize refcell_map_split feature Closes #51476.
This commit is contained in:
+2
-4
@@ -1186,7 +1186,6 @@ pub fn map<U: ?Sized, F>(orig: Ref<'b, T>, f: F) -> Ref<'b, U>
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(refcell_map_split)]
|
||||
/// use std::cell::{Ref, RefCell};
|
||||
///
|
||||
/// let cell = RefCell::new([1, 2, 3, 4]);
|
||||
@@ -1195,7 +1194,7 @@ pub fn map<U: ?Sized, F>(orig: Ref<'b, T>, f: F) -> Ref<'b, U>
|
||||
/// assert_eq!(*begin, [1, 2]);
|
||||
/// assert_eq!(*end, [3, 4]);
|
||||
/// ```
|
||||
#[unstable(feature = "refcell_map_split", issue = "51476")]
|
||||
#[stable(feature = "refcell_map_split", since = "1.35.0")]
|
||||
#[inline]
|
||||
pub fn map_split<U: ?Sized, V: ?Sized, F>(orig: Ref<'b, T>, f: F) -> (Ref<'b, U>, Ref<'b, V>)
|
||||
where F: FnOnce(&T) -> (&U, &V)
|
||||
@@ -1268,7 +1267,6 @@ pub fn map<U: ?Sized, F>(orig: RefMut<'b, T>, f: F) -> RefMut<'b, U>
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(refcell_map_split)]
|
||||
/// use std::cell::{RefCell, RefMut};
|
||||
///
|
||||
/// let cell = RefCell::new([1, 2, 3, 4]);
|
||||
@@ -1279,7 +1277,7 @@ pub fn map<U: ?Sized, F>(orig: RefMut<'b, T>, f: F) -> RefMut<'b, U>
|
||||
/// begin.copy_from_slice(&[4, 3]);
|
||||
/// end.copy_from_slice(&[2, 1]);
|
||||
/// ```
|
||||
#[unstable(feature = "refcell_map_split", issue = "51476")]
|
||||
#[stable(feature = "refcell_map_split", since = "1.35.0")]
|
||||
#[inline]
|
||||
pub fn map_split<U: ?Sized, V: ?Sized, F>(
|
||||
orig: RefMut<'b, T>, f: F
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#![feature(pattern)]
|
||||
#![feature(range_is_empty)]
|
||||
#![feature(raw)]
|
||||
#![feature(refcell_map_split)]
|
||||
#![feature(refcell_replace_swap)]
|
||||
#![feature(slice_patterns)]
|
||||
#![feature(sort_internals)]
|
||||
|
||||
Reference in New Issue
Block a user