X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibstd%2Fthread%2Flocal.rs;h=b73c5856b8805bdd91cee0c7a9363734694ac081;hb=f229422cc1a0d46d15a7f953f59d8e057ae03865;hp=7ad6b124e3a384c1f57543d2230e4b0f513421de;hpb=2c8bbf50db0ef90a33f986ba8fc2e1fe129197ff;p=rust.git diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs index 7ad6b124e3a..b73c5856b88 100644 --- a/src/libstd/thread/local.rs +++ b/src/libstd/thread/local.rs @@ -530,7 +530,7 @@ fn drop(&mut self) { thread::spawn(|| { assert!(FOO.try_with(|_| ()).is_ok()); - }).join().ok().unwrap(); + }).join().ok().expect("thread panicked"); } #[test] @@ -584,7 +584,7 @@ fn drop(&mut self) { thread::spawn(move|| { drop(S1); - }).join().ok().unwrap(); + }).join().ok().expect("thread panicked"); } #[test] @@ -600,7 +600,7 @@ fn drop(&mut self) { thread::spawn(move|| unsafe { K1.with(|s| *s.get() = Some(S1)); - }).join().ok().unwrap(); + }).join().ok().expect("thread panicked"); } // Note that this test will deadlock if TLS destructors aren't run (this