diff --git a/src/doc/guide.md b/src/doc/guide.md index 387841ab3fcef..a889e4233b7ce 100644 --- a/src/doc/guide.md +++ b/src/doc/guide.md @@ -1066,6 +1066,7 @@ feature of Rust, and are used throughout the standard library. Enums look like this: ``` +#[deriving(Eq, PartialEq)] enum Ordering { Less, Equal, @@ -1073,6 +1074,9 @@ enum Ordering { } ``` +We will talk about `#[deriving(Eq, PartialEq)]` later, for now we can read +it as "allow us to use `==` for comparisons." + This is an enum that is provided by the Rust standard library. An `Ordering` can only be _one_ of `Less`, `Equal`, or `Greater` at any given time. Here's an example: