External Publication
Visit Post

Q: Why do match expression need parenthesis for ops to the right but not left?

Rust Internals [Unofficial] April 2, 2026
Source

Also, "lack of ;" would be an arbitrary-length lookahead and ambiguity; we don't rely on that either. The closing brace can be the end of the expression (match doesn't require a semicolon when used as a statement), and *num_apples could be the start of a new expression (dereferencing a pointer).

Discussion in the ATmosphere

Loading comments...