[rust-dev] Heads up: syntax change with nullary tags in patterns

Tim Chevalier catamorphism at gmail.com
Thu Jan 19 01:11:22 PST 2012


As of 5b028f527f2c487a5f4196fdf3cfc7a2acef74ff the syntax of a pattern
consisting of a nullary tag has changed to omit the trailing '.' That
is: now we write

alt x { some(_) {} none {} }

instead of

alt x { some(_) {} none. {} }

To make this change possible, the typechecker now forbids local
variable names that shadow the name of a tag that's in scope.

Cheers,
Tim

-- 
Tim Chevalier * http://catamorphism.org/ * Often in error, never in doubt
“I cannot hide my anger to spare you guilt, nor hurt feelings, nor
answering anger; for to do so insults and trivializes all our efforts.
Guilt is not a response to anger; it is a response to one’s own
actions or lack of action.” -- Audre Lorde


More information about the Rust-dev mailing list