Skip to content

Commit 41d203e

Browse files
authored
Rollup merge of rust-lang#97308 - JohnTitor:stabilize-cell-filter-map, r=Mark-Simulacrum
Stabilize `cell_filter_map` FCP has been completed: rust-lang#81061 (comment) Closes rust-lang#81061
2 parents 27aa5f6 + dc50b97 commit 41d203e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

core/src/cell.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -1390,16 +1390,14 @@ impl<'b, T: ?Sized> Ref<'b, T> {
13901390
/// # Examples
13911391
///
13921392
/// ```
1393-
/// #![feature(cell_filter_map)]
1394-
///
13951393
/// use std::cell::{RefCell, Ref};
13961394
///
13971395
/// let c = RefCell::new(vec![1, 2, 3]);
13981396
/// let b1: Ref<Vec<u32>> = c.borrow();
13991397
/// let b2: Result<Ref<u32>, _> = Ref::filter_map(b1, |v| v.get(1));
14001398
/// assert_eq!(*b2.unwrap(), 2);
14011399
/// ```
1402-
#[unstable(feature = "cell_filter_map", reason = "recently added", issue = "81061")]
1400+
#[stable(feature = "cell_filter_map", since = "1.63.0")]
14031401
#[inline]
14041402
pub fn filter_map<U: ?Sized, F>(orig: Ref<'b, T>, f: F) -> Result<Ref<'b, U>, Self>
14051403
where
@@ -1538,8 +1536,6 @@ impl<'b, T: ?Sized> RefMut<'b, T> {
15381536
/// # Examples
15391537
///
15401538
/// ```
1541-
/// #![feature(cell_filter_map)]
1542-
///
15431539
/// use std::cell::{RefCell, RefMut};
15441540
///
15451541
/// let c = RefCell::new(vec![1, 2, 3]);
@@ -1555,7 +1551,7 @@ impl<'b, T: ?Sized> RefMut<'b, T> {
15551551
///
15561552
/// assert_eq!(*c.borrow(), vec![1, 4, 3]);
15571553
/// ```
1558-
#[unstable(feature = "cell_filter_map", reason = "recently added", issue = "81061")]
1554+
#[stable(feature = "cell_filter_map", since = "1.63.0")]
15591555
#[inline]
15601556
pub fn filter_map<U: ?Sized, F>(mut orig: RefMut<'b, T>, f: F) -> Result<RefMut<'b, U>, Self>
15611557
where

0 commit comments

Comments
 (0)