3 ms·
It's a request for the following to be valid enum X { A, B, } fn foo() -> X::A { X::A } which helps a lot when composi
by estebank 4y ago
It's a request for the following to be valid
enum X {
A,
B,
}
fn foo() -> X::A {
X::A
}
which helps a lot when composing state machines. In the meantime, you can indeed do what you propose:
enum X {
A(Foo),
B(Bar),
}
struct Foo;
struct Bar;
fn foo() -> Foo {
Foo
}