about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2022-05-05 21:47:13 +0200
committerMara Bos <m-ou.se@m-ou.se>2022-05-05 21:47:13 +0200
commit21c5f780f464b27802d0ee0f86c95eb29881096b (patch)
tree7a6302d1535caec0e7f146c430509d1e864622f0
parent9299e6915d0dec6282dd4a45a4551d94b9ad9790 (diff)
downloadrust-21c5f780f464b27802d0ee0f86c95eb29881096b.tar.gz
rust-21c5f780f464b27802d0ee0f86c95eb29881096b.zip
Remove condvar::two_mutexes test.
We don't guarantee this panics. On most platforms it doesn't anymore.
-rw-r--r--library/std/src/sync/condvar/tests.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/library/std/src/sync/condvar/tests.rs b/library/std/src/sync/condvar/tests.rs
index f7a00676daa..24f467f0b03 100644
--- a/library/std/src/sync/condvar/tests.rs
+++ b/library/std/src/sync/condvar/tests.rs
@@ -188,24 +188,3 @@ fn wait_timeout_wake() {
         break;
     }
 }
-
-#[test]
-#[should_panic]
-#[cfg(all(unix, not(target_os = "linux"), not(target_os = "android")))]
-fn two_mutexes() {
-    let m = Arc::new(Mutex::new(()));
-    let m2 = m.clone();
-    let c = Arc::new(Condvar::new());
-    let c2 = c.clone();
-
-    let mut g = m.lock().unwrap();
-    let _t = thread::spawn(move || {
-        let _g = m2.lock().unwrap();
-        c2.notify_one();
-    });
-    g = c.wait(g).unwrap();
-    drop(g);
-
-    let m = Mutex::new(());
-    let _ = c.wait(m.lock().unwrap()).unwrap();
-}