Skip to content

Commit d1e3739

Browse files
committed
Make note that Ordering is builtin.
This way people won't try to copy/paste it in.
1 parent 655600b commit d1e3739

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/doc/guide.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,20 +1073,19 @@ destructuring `let`.
10731073
## Enums
10741074

10751075
Finally, Rust has a "sum type", an **enum**. Enums are an incredibly useful
1076-
feature of Rust, and are used throughout the standard library. Enums look
1077-
like this:
1076+
feature of Rust, and are used throughout the standard library. This is an enum
1077+
that is provided by the Rust standard library:
10781078

1079-
```
1079+
```{rust}
10801080
enum Ordering {
10811081
Less,
10821082
Equal,
10831083
Greater,
10841084
}
10851085
```
10861086

1087-
This is an enum that is provided by the Rust standard library. An `Ordering`
1088-
can only be _one_ of `Less`, `Equal`, or `Greater` at any given time. Here's
1089-
an example:
1087+
An `Ordering` can only be _one_ of `Less`, `Equal`, or `Greater` at any given
1088+
time. Here's an example:
10901089

10911090
```rust
10921091
fn cmp(a: int, b: int) -> Ordering {

0 commit comments

Comments
 (0)