about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2017-04-20 14:06:18 -0700
committerJosh Stone <jistone@redhat.com>2017-04-20 21:16:31 -0700
commitcc605c895e3ac3d19b70da58a683a65200c491fe (patch)
treeb6e88e55aa139f489bb8c1c9816f84392266efe3
parentf0c5e8b8fc6d3631de39cfc250868da993ff4086 (diff)
downloadrust-cc605c895e3ac3d19b70da58a683a65200c491fe.tar.gz
rust-cc605c895e3ac3d19b70da58a683a65200c491fe.zip
Remove {Cell,RefCell}::as_unsafe_cell
[unstable, deprecated since 1.12.0]
-rw-r--r--src/doc/unstable-book/src/SUMMARY.md1
-rw-r--r--src/doc/unstable-book/src/library-features/as-unsafe-cell.md7
-rw-r--r--src/libcore/cell.rs43
3 files changed, 0 insertions, 51 deletions
diff --git a/src/doc/unstable-book/src/SUMMARY.md b/src/doc/unstable-book/src/SUMMARY.md
index 0362ed6ba9d..2a932e342f6 100644
--- a/src/doc/unstable-book/src/SUMMARY.md
+++ b/src/doc/unstable-book/src/SUMMARY.md
@@ -101,7 +101,6 @@
     - [alloc_system](library-features/alloc-system.md)
     - [alloc](library-features/alloc.md)
     - [as_c_str](library-features/as-c-str.md)
-    - [as_unsafe_cell](library-features/as-unsafe-cell.md)
     - [ascii_ctype](library-features/ascii-ctype.md)
     - [binary_heap_peek_mut_pop](library-features/binary-heap-peek-mut-pop.md)
     - [borrow_state](library-features/borrow-state.md)
diff --git a/src/doc/unstable-book/src/library-features/as-unsafe-cell.md b/src/doc/unstable-book/src/library-features/as-unsafe-cell.md
deleted file mode 100644
index 79d7a7cad0b..00000000000
--- a/src/doc/unstable-book/src/library-features/as-unsafe-cell.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# `as_unsafe_cell`
-
-The tracking issue for this feature is: [#27708]
-
-[#27708]: https://github.com/rust-lang/rust/issues/27708
-
-------------------------
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs
index 0186d972782..a5dda5625bd 100644
--- a/src/libcore/cell.rs
+++ b/src/libcore/cell.rs
@@ -310,26 +310,6 @@ impl<T> Cell<T> {
         }
     }
 
-    /// Returns a reference to the underlying `UnsafeCell`.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// #![feature(as_unsafe_cell)]
-    ///
-    /// use std::cell::Cell;
-    ///
-    /// let c = Cell::new(5);
-    ///
-    /// let uc = c.as_unsafe_cell();
-    /// ```
-    #[inline]
-    #[unstable(feature = "as_unsafe_cell", issue = "27708")]
-    #[rustc_deprecated(since = "1.12.0", reason = "renamed to as_ptr")]
-    pub fn as_unsafe_cell(&self) -> &UnsafeCell<T> {
-        &self.value
-    }
-
     /// Returns a raw pointer to the underlying data in this cell.
     ///
     /// # Examples
@@ -769,29 +749,6 @@ impl<T: ?Sized> RefCell<T> {
         }
     }
 
-    /// Returns a reference to the underlying `UnsafeCell`.
-    ///
-    /// This can be used to circumvent `RefCell`'s safety checks.
-    ///
-    /// This function is `unsafe` because `UnsafeCell`'s field is public.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// #![feature(as_unsafe_cell)]
-    ///
-    /// use std::cell::RefCell;
-    ///
-    /// let c = RefCell::new(5);
-    /// let c = unsafe { c.as_unsafe_cell() };
-    /// ```
-    #[inline]
-    #[unstable(feature = "as_unsafe_cell", issue = "27708")]
-    #[rustc_deprecated(since = "1.12.0", reason = "renamed to as_ptr")]
-    pub unsafe fn as_unsafe_cell(&self) -> &UnsafeCell<T> {
-        &self.value
-    }
-
     /// Returns a raw pointer to the underlying data in this cell.
     ///
     /// # Examples