3 // ignore-emscripten no threads support
5 // Test that if a slicing expr[..] fails, the correct cleanups happen.
12 static mut DTOR_COUNT: isize = 0;
15 fn drop(&mut self) { unsafe { DTOR_COUNT += 1; } }
19 let x: &[_] = &[Foo, Foo];
24 let _ = thread::spawn(move|| foo()).join();
25 unsafe { assert_eq!(DTOR_COUNT, 2); }