mozilla/rust — pull request #5187 by ben0x539 (2013-03-01 23:49:39+00:00)
Title: docs/rust.md: Mention unit-like structs along with other struct types

This adds a few words about unit-like struct types (`struct Foo;`) in the sections for `struct` items, structure expressions and structure types (and fixes an adjacent typo or two). The added text is at the same time triply redundant because of how the sections are split and rather brief because I don't think there's that much to say about field-less structs without digressing into `impl`s and generic functions and whatnot, but it's probably better than nothing for a start.

The added arm for the grammar of struct expressions is really awkward. It's just

| expr_path

which is clearly not unambiguously a struct expression, but it didn't feel right not to add anything to the grammar chunk (and I can't tell whether the arm for enum-like structs is somehow unambiguous with regular enum expressions, either). Is this okay?