trait x { fn use_x(&self); } struct y(()); impl x for y { fn use_x(&self) { struct foo { //~ ERROR quux i: () } fn new_foo(i: ()) -> foo { foo { i: i } } } }