@@ -229,7 +229,7 @@ impl<T:Copy> Cell<T> {
229229 /// let uc = unsafe { c.as_unsafe_cell() };
230230 /// ```
231231 #[ inline]
232- #[ unstable( feature = "core " ) ]
232+ #[ unstable( feature = "as_unsafe_cell " ) ]
233233 pub unsafe fn as_unsafe_cell < ' a > ( & ' a self ) -> & ' a UnsafeCell < T > {
234234 & self . value
235235 }
@@ -277,7 +277,7 @@ pub struct RefCell<T: ?Sized> {
277277
278278/// An enumeration of values returned from the `state` method on a `RefCell<T>`.
279279#[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
280- #[ unstable( feature = "std_misc " ) ]
280+ #[ unstable( feature = "borrow_state " ) ]
281281pub enum BorrowState {
282282 /// The cell is currently being read, there is at least one active `borrow`.
283283 Reading ,
@@ -339,7 +339,7 @@ impl<T: ?Sized> RefCell<T> {
339339 ///
340340 /// The returned value can be dispatched on to determine if a call to
341341 /// `borrow` or `borrow_mut` would succeed.
342- #[ unstable( feature = "std_misc " ) ]
342+ #[ unstable( feature = "borrow_state " ) ]
343343 #[ inline]
344344 pub fn borrow_state ( & self ) -> BorrowState {
345345 match self . borrow . get ( ) {
@@ -448,7 +448,7 @@ impl<T: ?Sized> RefCell<T> {
448448 ///
449449 /// This function is `unsafe` because `UnsafeCell`'s field is public.
450450 #[ inline]
451- #[ unstable( feature = "core " ) ]
451+ #[ unstable( feature = "as_unsafe_cell " ) ]
452452 pub unsafe fn as_unsafe_cell < ' a > ( & ' a self ) -> & ' a UnsafeCell < T > {
453453 & self . value
454454 }
@@ -564,9 +564,10 @@ impl<'b, T: ?Sized> Ref<'b, T> {
564564 ///
565565 /// The `RefCell` is already immutably borrowed, so this cannot fail.
566566 ///
567- /// This is an associated function that needs to be used as `Ref::clone(...)`.
568- /// A `Clone` implementation or a method would interfere with the widespread
569- /// use of `r.borrow().clone()` to clone the contents of a `RefCell`.
567+ /// This is an associated function that needs to be used as
568+ /// `Ref::clone(...)`. A `Clone` implementation or a method would interfere
569+ /// with the widespread use of `r.borrow().clone()` to clone the contents of
570+ /// a `RefCell`.
570571 #[ unstable( feature = "cell_extras" ,
571572 reason = "likely to be moved to a method, pending language changes" ) ]
572573 #[ inline]
@@ -582,8 +583,8 @@ impl<'b, T: ?Sized> Ref<'b, T> {
582583 /// The `RefCell` is already immutably borrowed, so this cannot fail.
583584 ///
584585 /// This is an associated function that needs to be used as `Ref::map(...)`.
585- /// A method would interfere with methods of the same name on the contents of a `RefCell`
586- /// used through `Deref`.
586+ /// A method would interfere with methods of the same name on the contents
587+ /// of a `RefCell` used through `Deref`.
587588 ///
588589 /// # Example
589590 ///
@@ -607,13 +608,14 @@ impl<'b, T: ?Sized> Ref<'b, T> {
607608 }
608609 }
609610
610- /// Make a new `Ref` for a optional component of the borrowed data, e.g. an enum variant.
611+ /// Make a new `Ref` for a optional component of the borrowed data, e.g. an
612+ /// enum variant.
611613 ///
612614 /// The `RefCell` is already immutably borrowed, so this cannot fail.
613615 ///
614- /// This is an associated function that needs to be used as `Ref::filter_map(...)`.
615- /// A method would interfere with methods of the same name on the contents of a `RefCell`
616- /// used through `Deref`.
616+ /// This is an associated function that needs to be used as
617+ /// `Ref::filter_map(...)`. A method would interfere with methods of the
618+ /// same name on the contents of a `RefCell` used through `Deref`.
617619 ///
618620 /// # Example
619621 ///
@@ -639,13 +641,14 @@ impl<'b, T: ?Sized> Ref<'b, T> {
639641}
640642
641643impl < ' b , T : ?Sized > RefMut < ' b , T > {
642- /// Make a new `RefMut` for a component of the borrowed data, e.g. an enum variant.
644+ /// Make a new `RefMut` for a component of the borrowed data, e.g. an enum
645+ /// variant.
643646 ///
644647 /// The `RefCell` is already mutably borrowed, so this cannot fail.
645648 ///
646- /// This is an associated function that needs to be used as `RefMut::map(...)`.
647- /// A method would interfere with methods of the same name on the contents of a `RefCell`
648- /// used through `Deref`.
649+ /// This is an associated function that needs to be used as
650+ /// `RefMut::map(...)`. A method would interfere with methods of the same
651+ /// name on the contents of a `RefCell` used through `Deref`.
649652 ///
650653 /// # Example
651654 ///
@@ -673,13 +676,14 @@ impl<'b, T: ?Sized> RefMut<'b, T> {
673676 }
674677 }
675678
676- /// Make a new `RefMut` for a optional component of the borrowed data, e.g. an enum variant.
679+ /// Make a new `RefMut` for a optional component of the borrowed data, e.g.
680+ /// an enum variant.
677681 ///
678682 /// The `RefCell` is already mutably borrowed, so this cannot fail.
679683 ///
680- /// This is an associated function that needs to be used as `RefMut::filter_map(...)`.
681- /// A method would interfere with methods of the same name on the contents of a `RefCell`
682- /// used through `Deref`.
684+ /// This is an associated function that needs to be used as
685+ /// `RefMut::filter_map(...)`. A method would interfere with methods of the
686+ /// same name on the contents of a `RefCell` used through `Deref`.
683687 ///
684688 /// # Example
685689 ///
@@ -690,7 +694,9 @@ impl<'b, T: ?Sized> RefMut<'b, T> {
690694 /// let c = RefCell::new(Ok(5));
691695 /// {
692696 /// let b1: RefMut<Result<u32, ()>> = c.borrow_mut();
693- /// let mut b2: RefMut<u32> = RefMut::filter_map(b1, |o| o.as_mut().ok()).unwrap();
697+ /// let mut b2: RefMut<u32> = RefMut::filter_map(b1, |o| {
698+ /// o.as_mut().ok()
699+ /// }).unwrap();
694700 /// assert_eq!(*b2, 5);
695701 /// *b2 = 42;
696702 /// }
0 commit comments