Skip to content

Commit c0b3038

Browse files
brsonManishearth
authored andcommitted
Add #![feature] attributes to doctests
1 parent 7d5996c commit c0b3038

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

reference.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,8 +816,7 @@ may optionally begin with any number of `attributes` that apply to the
816816
containing module. Attributes on the anonymous crate module define important
817817
metadata that influences the behavior of the compiler.
818818

819-
```{.rust}
820-
# #![allow(unused_attribute)]
819+
```no_run
821820
// Crate name
822821
#![crate_name = "projx"]
823822
@@ -1020,6 +1019,7 @@ Use declarations support a number of convenient shortcuts:
10201019
An example of `use` declarations:
10211020

10221021
```
1022+
# #![feature(core)]
10231023
use std::iter::range_step;
10241024
use std::option::Option::{Some, None};
10251025
use std::collections::hash_map::{self, HashMap};
@@ -1080,6 +1080,7 @@ declarations.
10801080
An example of what will and will not work for `use` items:
10811081

10821082
```
1083+
# #![feature(core)]
10831084
# #![allow(unused_imports)]
10841085
use foo::core::iter; // good: foo is at the root of the crate
10851086
use foo::baz::foobaz; // good: foo is at the root of the crate
@@ -1781,6 +1782,7 @@ functions, with the exception that they may not have a body and are instead
17811782
terminated by a semicolon.
17821783

17831784
```
1785+
# #![feature(libc)]
17841786
extern crate libc;
17851787
use libc::{c_char, FILE};
17861788

0 commit comments

Comments
 (0)