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