miniblog.

← Back to all posts
TIL Rust has an ambiguity `if Foo {}` -- is `Foo` a value of type bool, or a struct? Rust solves this by defining a grammar production 'any expression except struct literals' and using it in this position.