about summary refs log tree commit diff
path: root/library/std/src/sync
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-01 17:51:30 +0100
committerGitHub <noreply@github.com>2024-03-01 17:51:30 +0100
commit90ca049320b4bdff08e97a70ac978f1ad126780e (patch)
tree98941b6175389c512ac8370f2c66534d4e262120 /library/std/src/sync
parent58825b4ea9354ab4e78ae96a1b0942d33c9db4ab (diff)
parenta9907b1fdf2887a9839d81e70c7d98d69265fde0 (diff)
downloadrust-90ca049320b4bdff08e97a70ac978f1ad126780e.tar.gz
rust-90ca049320b4bdff08e97a70ac978f1ad126780e.zip
Rollup merge of #121736 - HTGAzureX1212:HTGAzureX1212/remove-mutex-unlock, r=jhpratt
Remove `Mutex::unlock` Function

As of the completion of the FCP in https://github.com/rust-lang/rust/issues/81872#issuecomment-1474104525, it has come to the conclusion to be closed.

This PR removes the function entirely in light of the above.

Closes #81872.
Diffstat (limited to 'library/std/src/sync')
-rw-r--r--library/std/src/sync/mutex.rs20
1 files changed, 0 insertions, 20 deletions
diff --git a/library/std/src/sync/mutex.rs b/library/std/src/sync/mutex.rs
index fa91f9d907a..65ff10e02d4 100644
--- a/library/std/src/sync/mutex.rs
+++ b/library/std/src/sync/mutex.rs
@@ -369,26 +369,6 @@ impl<T: ?Sized> Mutex<T> {
         }
     }
 
-    /// Immediately drops the guard, and consequently unlocks the mutex.
-    ///
-    /// This function is equivalent to calling [`drop`] on the guard but is more self-documenting.
-    /// Alternately, the guard will be automatically dropped when it goes out of scope.
-    ///
-    /// ```
-    /// #![feature(mutex_unlock)]
-    ///
-    /// use std::sync::Mutex;
-    /// let mutex = Mutex::new(0);
-    ///
-    /// let mut guard = mutex.lock().unwrap();
-    /// *guard += 20;
-    /// Mutex::unlock(guard);
-    /// ```
-    #[unstable(feature = "mutex_unlock", issue = "81872")]
-    pub fn unlock(guard: MutexGuard<'_, T>) {
-        drop(guard);
-    }
-
     /// Determines whether the mutex is poisoned.
     ///
     /// If another thread is active, the mutex can still become poisoned at any