use std::sync::Mutex; enum Foo { X(Mutex>) } //~^ ERROR recursive type `Foo` has infinite size impl Foo { fn bar(self) {} } fn main() {}