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