Skip to content

Commit dc2d505

Browse files
committed
Deprecate std::cell::RefCell::borrow_state
1 parent b288270 commit dc2d505

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libcore/cell.rs

+2
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ pub struct RefCell<T: ?Sized> {
393393
/// An enumeration of values returned from the `state` method on a `RefCell<T>`.
394394
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
395395
#[unstable(feature = "borrow_state", issue = "27733")]
396+
#[rustc_deprecated(since = "1.15.0", reason = "use `try_borrow` instead")]
396397
pub enum BorrowState {
397398
/// The cell is currently being read, there is at least one active `borrow`.
398399
Reading,
@@ -511,6 +512,7 @@ impl<T: ?Sized> RefCell<T> {
511512
/// }
512513
/// ```
513514
#[unstable(feature = "borrow_state", issue = "27733")]
515+
#[rustc_deprecated(since = "1.15.0", reason = "use `try_borrow` instead")]
514516
#[inline]
515517
pub fn borrow_state(&self) -> BorrowState {
516518
match self.borrow.get() {

0 commit comments

Comments
 (0)