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; } }
23 let x: &[_] = &[Foo, Foo];
28 let _ = thread::spawn(move|| foo()).join();
29 unsafe { assert_eq!(DTOR_COUNT, 2); }