summary refs log tree commit diff
path: root/library/std/src/sys/windows
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-09-04 22:53:58 +0000
committerbors <bors@rust-lang.org>2022-09-04 22:53:58 +0000
commite7cdd4c0909b62f2ee0368fd10e6e244f2af44b4 (patch)
tree33b83e9624645f05a3b64c1c333ba65697d82a1e /library/std/src/sys/windows
parent289279de116707f28cf9c18e4bbb8c6ec84ad75b (diff)
parent8c37fdf2d702ff1fc805f1bbc5de634e1101a4da (diff)
downloadrust-e7cdd4c0909b62f2ee0368fd10e6e244f2af44b4.tar.gz
rust-e7cdd4c0909b62f2ee0368fd10e6e244f2af44b4.zip
Auto merge of #100576 - joboet:movable_const_remutex, r=Mark-Simulacrum
Make `ReentrantMutex` movable and `const`

As `MovableMutex` is now `const`, it can be used to simplify the implementation and interface of the internal reentrant mutex type. Consequently, the standard error stream does not need to be wrapped in `OnceLock` and `OnceLock::get_or_init_pin()` can be removed.
Diffstat (limited to 'library/std/src/sys/windows')
-rw-r--r--library/std/src/sys/windows/locks/mutex.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/library/std/src/sys/windows/locks/mutex.rs b/library/std/src/sys/windows/locks/mutex.rs
index f91e8f9f59a..91207f5f466 100644
--- a/library/std/src/sys/windows/locks/mutex.rs
+++ b/library/std/src/sys/windows/locks/mutex.rs
@@ -37,8 +37,6 @@ impl Mutex {
     pub const fn new() -> Mutex {
         Mutex { srwlock: UnsafeCell::new(c::SRWLOCK_INIT) }
     }
-    #[inline]
-    pub unsafe fn init(&mut self) {}
 
     #[inline]
     pub unsafe fn lock(&self) {