Skip to content

Commit

Permalink
Stabilize mutex_unpoison feature
Browse files Browse the repository at this point in the history
Closes #96469

@rustbot +T-libs-api
  • Loading branch information
tmccombs committed Jan 10, 2024
1 parent e927184 commit 1ed855d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions library/std/src/sync/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,6 @@ impl<T: ?Sized> Mutex<T> {
/// # Examples
///
/// ```
/// #![feature(mutex_unpoison)]
///
/// use std::sync::{Arc, Mutex};
/// use std::thread;
///
Expand All @@ -406,7 +404,7 @@ impl<T: ?Sized> Mutex<T> {
/// assert_eq!(*x, 1);
/// ```
#[inline]
#[unstable(feature = "mutex_unpoison", issue = "96469")]
#[stable(feature = "mutex_unpoison", since = "CURRENT_RUSTC_VERSION")]
pub fn clear_poison(&self) {
self.poison.clear();
}
Expand Down
4 changes: 1 addition & 3 deletions library/std/src/sync/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,6 @@ impl<T: ?Sized> RwLock<T> {
/// # Examples
///
/// ```
/// #![feature(mutex_unpoison)]
///
/// use std::sync::{Arc, RwLock};
/// use std::thread;
///
Expand All @@ -410,7 +408,7 @@ impl<T: ?Sized> RwLock<T> {
/// assert_eq!(*guard, 1);
/// ```
#[inline]
#[unstable(feature = "mutex_unpoison", issue = "96469")]
#[stable(feature = "mutex_unpoison", since = "CURRENT_RUSTC_VERSION")]
pub fn clear_poison(&self) {
self.poison.clear();
}
Expand Down

0 comments on commit 1ed855d

Please sign in to comment.