Skip to content

Commit 9a830a0

Browse files
committed
remove Mutex::unlock
1 parent 6db7e05 commit 9a830a0

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

std/src/sync/mutex.rs

-20
Original file line numberDiff line numberDiff line change
@@ -369,26 +369,6 @@ impl<T: ?Sized> Mutex<T> {
369369
}
370370
}
371371

372-
/// Immediately drops the guard, and consequently unlocks the mutex.
373-
///
374-
/// This function is equivalent to calling [`drop`] on the guard but is more self-documenting.
375-
/// Alternately, the guard will be automatically dropped when it goes out of scope.
376-
///
377-
/// ```
378-
/// #![feature(mutex_unlock)]
379-
///
380-
/// use std::sync::Mutex;
381-
/// let mutex = Mutex::new(0);
382-
///
383-
/// let mut guard = mutex.lock().unwrap();
384-
/// *guard += 20;
385-
/// Mutex::unlock(guard);
386-
/// ```
387-
#[unstable(feature = "mutex_unlock", issue = "81872")]
388-
pub fn unlock(guard: MutexGuard<'_, T>) {
389-
drop(guard);
390-
}
391-
392372
/// Determines whether the mutex is poisoned.
393373
///
394374
/// If another thread is active, the mutex can still become poisoned at any

0 commit comments

Comments
 (0)