@@ -343,7 +343,6 @@ impl<T: Copy> From<T> for Cell<T> {
343
343
}
344
344
}
345
345
346
- #[ unstable( feature = "move_cell" , issue = "39264" ) ]
347
346
impl < T > Cell < T > {
348
347
/// Creates a new `Cell` containing the given value.
349
348
///
@@ -393,6 +392,7 @@ impl<T> Cell<T> {
393
392
///
394
393
/// assert_eq!(5, old);
395
394
/// ```
395
+ #[ unstable( feature = "move_cell" , issue = "39264" ) ]
396
396
pub fn replace ( & self , val : T ) -> T {
397
397
mem:: replace ( unsafe { & mut * self . value . get ( ) } , val)
398
398
}
@@ -410,12 +410,12 @@ impl<T> Cell<T> {
410
410
///
411
411
/// assert_eq!(five, 5);
412
412
/// ```
413
+ #[ unstable( feature = "move_cell" , issue = "39264" ) ]
413
414
pub fn into_inner ( self ) -> T {
414
415
unsafe { self . value . into_inner ( ) }
415
416
}
416
417
}
417
418
418
- #[ unstable( feature = "move_cell" , issue = "39264" ) ]
419
419
impl < T : Default > Cell < T > {
420
420
/// Takes the value of the cell, leaving `Default::default()` in its place.
421
421
///
@@ -431,6 +431,7 @@ impl<T: Default> Cell<T> {
431
431
/// assert_eq!(five, 5);
432
432
/// assert_eq!(c.into_inner(), 0);
433
433
/// ```
434
+ #[ unstable( feature = "move_cell" , issue = "39264" ) ]
434
435
pub fn take ( & self ) -> T {
435
436
self . replace ( Default :: default ( ) )
436
437
}
0 commit comments