]> git.lizzy.rs Git - rust.git/commitdiff
I think we have to strengthen Mutex::init UB
authorRalf Jung <post@ralfj.de>
Mon, 6 Aug 2018 11:39:47 +0000 (13:39 +0200)
committerRalf Jung <post@ralfj.de>
Mon, 6 Aug 2018 11:39:47 +0000 (13:39 +0200)
src/libstd/sys_common/mutex.rs

index 77a33e4c6be86ef551e9075a7978a6c75424bd47..a4efe4d128e6954f9ac5ea2327fa1cbe2d4e01fa 100644 (file)
@@ -32,7 +32,7 @@ pub const fn new() -> Mutex { Mutex(imp::Mutex::new()) }
     /// Prepare the mutex for use.
     ///
     /// This should be called once the mutex is at a stable memory address.
-    /// It must not be called concurrently with any other operation.
+    /// Behavior is undefined unless this is called before any other operation.
     #[inline]
     pub unsafe fn init(&mut self) { self.0.init() }