1
Fork 0

Move /src/test to /tests

This commit is contained in:
Albert Larsan 2023-01-05 09:13:28 +01:00
parent ca855e6e42
commit cf2dff2b1e
No known key found for this signature in database
GPG key ID: 92709B88BB8F13EA
27592 changed files with 0 additions and 0 deletions

View file

@ -1,24 +0,0 @@
// run-pass
// needs-unwind
// ignore-emscripten no threads support
// Make sure the destructor is run for unit-like structs.
use std::thread;
struct Foo;
impl Drop for Foo {
fn drop(&mut self) {
panic!("This panic should happen.");
}
}
pub fn main() {
let x = thread::spawn(move|| {
let _b = Foo;
}).join();
let s = x.unwrap_err().downcast::<&'static str>().unwrap();
assert_eq!(&**s, "This panic should happen.");
}