]> git.lizzy.rs Git - rust.git/commitdiff
opt into box_patterns in the reference doc that uses them.
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Wed, 11 Feb 2015 10:44:33 +0000 (11:44 +0100)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Wed, 11 Feb 2015 10:47:14 +0000 (11:47 +0100)
src/doc/reference.md

index d50c0d6582b30f5ce5e235dd0e64ae20dbd2e9b7..9c51f6bad6feea3e1caefbf8bd2135a0ec629399 100644 (file)
@@ -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>) }