diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-02-11 11:44:33 +0100 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-02-11 11:47:14 +0100 |
| commit | ff56e376f99359742afaa68c23ffadc88e14edb0 (patch) | |
| tree | c548aa7eb75baef40bb04db3e24dbbe37e8882b5 /src/doc/reference.md | |
| parent | edabfe2912380955cc01d100dcca20e6c197da99 (diff) | |
| download | rust-ff56e376f99359742afaa68c23ffadc88e14edb0.tar.gz rust-ff56e376f99359742afaa68c23ffadc88e14edb0.zip | |
opt into box_patterns in the reference doc that uses them.
Diffstat (limited to 'src/doc/reference.md')
| -rw-r--r-- | src/doc/reference.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md index d50c0d6582b..9c51f6bad6f 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -3196,6 +3196,7 @@ stands for a *single* data field, whereas a wildcard `..` stands for *all* the fields of a particular variant. For example: ``` +#![feature(box_patterns)] #![feature(box_syntax)] enum List<X> { Nil, Cons(X, Box<List<X>>) } @@ -3259,6 +3260,7 @@ the inside of the match. An example of a `match` expression: ``` +#![feature(box_patterns)] #![feature(box_syntax)] # fn process_pair(a: i32, b: i32) { } # fn process_ten() { } @@ -3294,6 +3296,7 @@ Subpatterns can also be bound to variables by the use of the syntax `variable @ subpattern`. For example: ``` +#![feature(box_patterns)] #![feature(box_syntax)] enum List { Nil, Cons(uint, Box<List>) } |
