Skip to content

Commit afdc133

Browse files
authored
Unrolled build for rust-lang#121736
Rollup merge of rust-lang#121736 - HTGAzureX1212:HTGAzureX1212/remove-mutex-unlock, r=jhpratt Remove `Mutex::unlock` Function As of the completion of the FCP in rust-lang#81872 (comment), it has come to the conclusion to be closed. This PR removes the function entirely in light of the above. Closes rust-lang#81872.
2 parents 17edace + a9907b1 commit afdc133

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

Diff for: library/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)