]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #25348 - geofft:trpl-fix-enums, r=steveklabnik
authorSteve Klabnik <steve@steveklabnik.com>
Wed, 13 May 2015 04:52:49 +0000 (00:52 -0400)
committerSteve Klabnik <steve@steveklabnik.com>
Wed, 13 May 2015 04:52:49 +0000 (00:52 -0400)
commitdd11c7f047220585e1b790e6da3b2534d137b4e4
treeac90cb8261ac37254f6aa8a897d8ff4643174356
parente8c69e54061a6bfc964c588adebaf90a6b983581
parentf59f41e04c044f322285f80d17916bd207d8ed04
Rollup merge of #25348 - geofft:trpl-fix-enums, r=steveklabnik

The enums chapter at the moment is ... weird. The examples aren't about enums, they're about structs, and most of the chapter talks about how enums don't support comparison operators by default (which is also true of other compound data types.) I think there was a story here once, but some coherency got lost in refactoring.

There are two preliminary patches here, one to combine the struct and tuple-struct chapters, and one to document unit-like structs, because enum syntax is easier to explain once you have those three. The final patch moves the enum chapter after the struct chapter, and rewrites most of it to talk about enums usefully (including covering matches on enums).

r? @steveklabnik
src/doc/trpl/SUMMARY.md