@@ -164,7 +164,7 @@ use option::Option;
164
164
use option:: Option :: { None , Some } ;
165
165
166
166
/// A mutable memory location that admits only `Copy` data.
167
- #[ unstable = "likely to be renamed; otherwise stable" ]
167
+ #[ stable]
168
168
pub struct Cell < T > {
169
169
value : UnsafeCell < T > ,
170
170
noshare : marker:: NoSync ,
@@ -231,7 +231,7 @@ impl<T:PartialEq + Copy> PartialEq for Cell<T> {
231
231
}
232
232
233
233
/// A mutable memory location with dynamically checked borrow rules
234
- #[ unstable = "likely to be renamed; otherwise stable" ]
234
+ #[ stable]
235
235
pub struct RefCell < T > {
236
236
value : UnsafeCell < T > ,
237
237
borrow : Cell < BorrowFlag > ,
@@ -256,7 +256,7 @@ impl<T> RefCell<T> {
256
256
}
257
257
258
258
/// Consumes the `RefCell`, returning the wrapped value.
259
- #[ unstable = "recently renamed per RFC 430" ]
259
+ #[ stable ]
260
260
pub fn into_inner ( self ) -> T {
261
261
// Since this function takes `self` (the `RefCell`) by value, the
262
262
// compiler statically verifies that it is not currently borrowed.
@@ -275,7 +275,7 @@ impl<T> RefCell<T> {
275
275
/// immutable borrows can be taken out at the same time.
276
276
///
277
277
/// Returns `None` if the value is currently mutably borrowed.
278
- #[ unstable = "may be renamed, depending on global conventions " ]
278
+ #[ unstable = "may be renamed or removed " ]
279
279
pub fn try_borrow < ' a > ( & ' a self ) -> Option < Ref < ' a , T > > {
280
280
match BorrowRef :: new ( & self . borrow ) {
281
281
Some ( b) => Some ( Ref { _value : unsafe { & * self . value . get ( ) } , _borrow : b } ) ,
@@ -291,7 +291,7 @@ impl<T> RefCell<T> {
291
291
/// # Panics
292
292
///
293
293
/// Panics if the value is currently mutably borrowed.
294
- #[ unstable ]
294
+ #[ stable ]
295
295
pub fn borrow < ' a > ( & ' a self ) -> Ref < ' a , T > {
296
296
match self . try_borrow ( ) {
297
297
Some ( ptr) => ptr,
@@ -305,7 +305,7 @@ impl<T> RefCell<T> {
305
305
/// cannot be borrowed while this borrow is active.
306
306
///
307
307
/// Returns `None` if the value is currently borrowed.
308
- #[ unstable = "may be renamed, depending on global conventions " ]
308
+ #[ unstable = "may be renamed or removed " ]
309
309
pub fn try_borrow_mut < ' a > ( & ' a self ) -> Option < RefMut < ' a , T > > {
310
310
match BorrowRefMut :: new ( & self . borrow ) {
311
311
Some ( b) => Some ( RefMut { _value : unsafe { & mut * self . value . get ( ) } , _borrow : b } ) ,
@@ -321,7 +321,7 @@ impl<T> RefCell<T> {
321
321
/// # Panics
322
322
///
323
323
/// Panics if the value is currently borrowed.
324
- #[ unstable ]
324
+ #[ stable ]
325
325
pub fn borrow_mut < ' a > ( & ' a self ) -> RefMut < ' a , T > {
326
326
match self . try_borrow_mut ( ) {
327
327
Some ( ptr) => ptr,
@@ -400,7 +400,7 @@ impl<'b> Clone for BorrowRef<'b> {
400
400
}
401
401
402
402
/// Wraps a borrowed reference to a value in a `RefCell` box.
403
- #[ unstable ]
403
+ #[ stable ]
404
404
pub struct Ref < ' b , T : ' b > {
405
405
// FIXME #12808: strange name to try to avoid interfering with
406
406
// field accesses of the contained type via Deref
@@ -456,7 +456,7 @@ impl<'b> BorrowRefMut<'b> {
456
456
}
457
457
458
458
/// Wraps a mutable borrowed reference to a value in a `RefCell` box.
459
- #[ unstable ]
459
+ #[ stable ]
460
460
pub struct RefMut < ' b , T : ' b > {
461
461
// FIXME #12808: strange name to try to avoid interfering with
462
462
// field accesses of the contained type via Deref
@@ -517,7 +517,7 @@ impl<'b, T> DerefMut<T> for RefMut<'b, T> {
517
517
/// is not recommended to access its fields directly, `get` should be used
518
518
/// instead.
519
519
#[ lang="unsafe" ]
520
- #[ unstable = "this type may be renamed in the future" ]
520
+ #[ stable ]
521
521
pub struct UnsafeCell < T > {
522
522
/// Wrapped value
523
523
///
@@ -539,22 +539,16 @@ impl<T> UnsafeCell<T> {
539
539
}
540
540
541
541
/// Gets a mutable pointer to the wrapped value.
542
- ///
543
- /// This function is unsafe as the pointer returned is an unsafe pointer and
544
- /// no guarantees are made about the aliasing of the pointers being handed
545
- /// out in this or other tasks.
546
542
#[ inline]
547
- #[ unstable = "conventions around acquiring an inner reference are still \
548
- under development"]
549
- pub unsafe fn get ( & self ) -> * mut T { & self . value as * const T as * mut T }
543
+ #[ stable]
544
+ pub fn get ( & self ) -> * mut T { & self . value as * const T as * mut T }
550
545
551
546
/// Unwraps the value
552
547
///
553
548
/// This function is unsafe because there is no guarantee that this or other
554
549
/// tasks are currently inspecting the inner value.
555
550
#[ inline]
556
- #[ unstable = "conventions around the name `unwrap` are still under \
557
- development"]
551
+ #[ stable]
558
552
pub unsafe fn into_inner ( self ) -> T { self . value }
559
553
560
554
/// Deprecated, use into_inner() instead
0 commit comments