3 // ignore-emscripten no threads support
9 struct Foo(Cell<isize>);
11 impl fmt::Debug for Foo {
12 fn fmt(&self, _fmt: &mut fmt::Formatter) -> fmt::Result {
13 let Foo(ref f) = *self;
14 assert_eq!(f.get(), 0);
21 thread::spawn(move || {
22 let mut f = Foo(Cell::new(0));
24 let Foo(ref mut f) = f;
25 assert_eq!(f.get(), 1);