From cc63d4c61bb83fcbcef5ccfffcd9b26b1bf2d20a Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 5 Jun 2014 23:01:01 -0700 Subject: doc: Turn off special features for rustdoc tests These were only used for the markdown tests, and there's no reason they should be distinct from the other tests. --- src/doc/rust.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/doc/rust.md') diff --git a/src/doc/rust.md b/src/doc/rust.md index 06c9da2fe0e..619e24af360 100644 --- a/src/doc/rust.md +++ b/src/doc/rust.md @@ -1260,6 +1260,8 @@ a = Cat; Enumeration constructors can have either named or unnamed fields: ~~~~ +# #![feature(struct_variant)] +# fn main() { enum Animal { Dog (String, f64), Cat { name: String, weight: f64 } @@ -1267,6 +1269,7 @@ enum Animal { let mut a: Animal = Dog("Cocoa".to_string(), 37.2); a = Cat { name: "Spotty".to_string(), weight: 2.7 }; +# } ~~~~ In this example, `Cat` is a _struct-like enum variant_, -- cgit 1.4.1-3-g733a5