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.
This commit is contained in:
parent
5915763106
commit
cc63d4c61b
6 changed files with 39 additions and 28 deletions
|
|
@ -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_,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue