enum X { A, B, } fn foo() -> X::A { X::A }
enum X { A(Foo), B(Bar), } struct Foo; struct Bar; fn foo() -> Foo { Foo }