22 lines
393 B
Rust
22 lines
393 B
Rust
// Every variant must be covered; the diagnostic names the missing ones.
|
|
// expect: reject E7004
|
|
// phase: 6
|
|
// spec: docs/spec/15-source-language.md
|
|
module demo.partial
|
|
|
|
enum State {
|
|
Ready,
|
|
Busy(u64),
|
|
Done,
|
|
}
|
|
|
|
fn main() -> u64
|
|
effects []
|
|
{
|
|
let s = State::Busy(3);
|
|
return match s { // diagnostic here: match
|
|
State::Ready => 0,
|
|
State::Busy(n) => n,
|
|
};
|
|
}
|