about summary refs log tree commit diff
path: root/src/doc/reference.md
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2015-03-13 15:28:35 -0700
committerBrian Anderson <banderson@mozilla.com>2015-03-23 14:40:26 -0700
commite9019101a82dd7f61dcdcd52bcc0123d5ed25d22 (patch)
tree6553b47da56745ce8cab9e17265bba143608aa97 /src/doc/reference.md
parentdf290f127e923e0aacfe8223dd77f0fa222f0bc8 (diff)
downloadrust-e9019101a82dd7f61dcdcd52bcc0123d5ed25d22.tar.gz
rust-e9019101a82dd7f61dcdcd52bcc0123d5ed25d22.zip
Add #![feature] attributes to doctests
Diffstat (limited to 'src/doc/reference.md')
-rw-r--r--src/doc/reference.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md
index 415ec4e4fbf..07df3bdad34 100644
--- a/src/doc/reference.md
+++ b/src/doc/reference.md
@@ -816,8 +816,7 @@ may optionally begin with any number of `attributes` that apply to the
 containing module. Attributes on the anonymous crate module define important
 metadata that influences the behavior of the compiler.
 
-```{.rust}
-# #![allow(unused_attribute)]
+```no_run
 // Crate name
 #![crate_name = "projx"]
 
@@ -1020,6 +1019,7 @@ Use declarations support a number of convenient shortcuts:
 An example of `use` declarations:
 
 ```
+# #![feature(core)]
 use std::iter::range_step;
 use std::option::Option::{Some, None};
 use std::collections::hash_map::{self, HashMap};
@@ -1080,6 +1080,7 @@ declarations.
 An example of what will and will not work for `use` items:
 
 ```
+# #![feature(core)]
 # #![allow(unused_imports)]
 use foo::core::iter;  // good: foo is at the root of the crate
 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
 terminated by a semicolon.
 
 ```
+# #![feature(libc)]
 extern crate libc;
 use libc::{c_char, FILE};