I'd like to implement this soon. Should non-exhaustive alts be errors
or warnings? I guess, if we are to have warnings at all, these are
fine as warnings.

To be able to control these warnings, I'd like to add support for
forms like these:

// I know this is non-exhaustive, fail on non-match
alt fail (foo) {
   1 {...}
   2 {...}
}

// I know this is non-exhaustive, fall-through without failing on non-match
alt cont (foo) {
   1 {...}
   2 {...}
}

I think this is more elegant and explicit than requiring people to say
'_ {}' or '_ {fail;}' again and again.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to