Closed
Description
The following code works on stable 1.15.1 but not on current nightly compilers (Play editor):
enum X<T> {
A(T), B
}
fn f(x: u32) -> X<()> {
match x {
_ => return X::A(()),
}
X::B
}
fn main() {
f(0);
}
I encountered this using Result
but realised a templated enum is sufficient. I can't replicate when replacing the match
with an if
.