On Tue, Jul 26, 2011 at 1:32 AM, Marijn Haverbeke <[email protected]> wrote:
>
> 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.
Could there be any confusion with parenthesis free notation? I
haven't been paying attention to the recent syntax changes, but I
thought you could write:
alt foo {
1 {...}
2 {...}
}
With this change, would you be allowed to write this?
alt fail foo {
1 {...}
2 {...}
}
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev