Skip to content

Commit

Permalink
Deprecate std::cell::RefCell::borrow_state
Browse files Browse the repository at this point in the history
  • Loading branch information
aturon committed Dec 15, 2016
1 parent b288270 commit dc2d505
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libcore/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ pub struct RefCell<T: ?Sized> {
/// An enumeration of values returned from the `state` method on a `RefCell<T>`.
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
#[unstable(feature = "borrow_state", issue = "27733")]
#[rustc_deprecated(since = "1.15.0", reason = "use `try_borrow` instead")]
pub enum BorrowState {
/// The cell is currently being read, there is at least one active `borrow`.
Reading,
Expand Down Expand Up @@ -511,6 +512,7 @@ impl<T: ?Sized> RefCell<T> {
/// }
/// ```
#[unstable(feature = "borrow_state", issue = "27733")]
#[rustc_deprecated(since = "1.15.0", reason = "use `try_borrow` instead")]
#[inline]
pub fn borrow_state(&self) -> BorrowState {
match self.borrow.get() {
Expand Down

0 comments on commit dc2d505

Please sign in to comment.