Skip to content

Commit afac3ec

Browse files
committed
Move stability attributes per feedback
1 parent c6cfa3c commit afac3ec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libcore/cell.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ impl<T: Copy> From<T> for Cell<T> {
343343
}
344344
}
345345

346-
#[unstable(feature = "move_cell", issue = "39264")]
347346
impl<T> Cell<T> {
348347
/// Creates a new `Cell` containing the given value.
349348
///
@@ -393,6 +392,7 @@ impl<T> Cell<T> {
393392
///
394393
/// assert_eq!(5, old);
395394
/// ```
395+
#[unstable(feature = "move_cell", issue = "39264")]
396396
pub fn replace(&self, val: T) -> T {
397397
mem::replace(unsafe { &mut *self.value.get() }, val)
398398
}
@@ -410,12 +410,12 @@ impl<T> Cell<T> {
410410
///
411411
/// assert_eq!(five, 5);
412412
/// ```
413+
#[unstable(feature = "move_cell", issue = "39264")]
413414
pub fn into_inner(self) -> T {
414415
unsafe { self.value.into_inner() }
415416
}
416417
}
417418

418-
#[unstable(feature = "move_cell", issue = "39264")]
419419
impl<T: Default> Cell<T> {
420420
/// Takes the value of the cell, leaving `Default::default()` in its place.
421421
///
@@ -431,6 +431,7 @@ impl<T: Default> Cell<T> {
431431
/// assert_eq!(five, 5);
432432
/// assert_eq!(c.into_inner(), 0);
433433
/// ```
434+
#[unstable(feature = "move_cell", issue = "39264")]
434435
pub fn take(&self) -> T {
435436
self.replace(Default::default())
436437
}

0 commit comments

Comments
 (0)