Rollup merge of #97308 - JohnTitor:stabilize-cell-filter-map, r=Mark-Simulacrum
Stabilize `cell_filter_map` FCP has been completed: https://github.com/rust-lang/rust/issues/81061#issuecomment-1081806326 Closes #81061
This commit is contained in:
commit
af15e45e28
1 changed files with 2 additions and 6 deletions
|
@ -1390,8 +1390,6 @@ impl<'b, T: ?Sized> Ref<'b, T> {
|
|||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(cell_filter_map)]
|
||||
///
|
||||
/// use std::cell::{RefCell, Ref};
|
||||
///
|
||||
/// let c = RefCell::new(vec![1, 2, 3]);
|
||||
|
@ -1399,7 +1397,7 @@ impl<'b, T: ?Sized> Ref<'b, T> {
|
|||
/// let b2: Result<Ref<u32>, _> = Ref::filter_map(b1, |v| v.get(1));
|
||||
/// assert_eq!(*b2.unwrap(), 2);
|
||||
/// ```
|
||||
#[unstable(feature = "cell_filter_map", reason = "recently added", issue = "81061")]
|
||||
#[stable(feature = "cell_filter_map", since = "1.63.0")]
|
||||
#[inline]
|
||||
pub fn filter_map<U: ?Sized, F>(orig: Ref<'b, T>, f: F) -> Result<Ref<'b, U>, Self>
|
||||
where
|
||||
|
@ -1538,8 +1536,6 @@ impl<'b, T: ?Sized> RefMut<'b, T> {
|
|||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(cell_filter_map)]
|
||||
///
|
||||
/// use std::cell::{RefCell, RefMut};
|
||||
///
|
||||
/// let c = RefCell::new(vec![1, 2, 3]);
|
||||
|
@ -1555,7 +1551,7 @@ impl<'b, T: ?Sized> RefMut<'b, T> {
|
|||
///
|
||||
/// assert_eq!(*c.borrow(), vec![1, 4, 3]);
|
||||
/// ```
|
||||
#[unstable(feature = "cell_filter_map", reason = "recently added", issue = "81061")]
|
||||
#[stable(feature = "cell_filter_map", since = "1.63.0")]
|
||||
#[inline]
|
||||
pub fn filter_map<U: ?Sized, F>(mut orig: RefMut<'b, T>, f: F) -> Result<RefMut<'b, U>, Self>
|
||||
where
|
||||
|
|
Loading…
Add table
Reference in a new issue