Add #![feature] attributes to doctests

This commit is contained in:
Brian Anderson
2015-03-13 15:28:35 -07:00
parent df290f127e
commit e9019101a8
107 changed files with 649 additions and 22 deletions

View File

@@ -61,6 +61,7 @@ use thread;
/// # Examples
///
/// ```should_fail
/// # #![feature(old_io)]
/// use std::old_io::*;
///
/// let mut child = match Command::new("/bin/cat").arg("file.txt").spawn() {
@@ -164,6 +165,7 @@ pub type EnvMap = HashMap<EnvKey, CString>;
/// to be changed (for example, by adding arguments) prior to spawning:
///
/// ```
/// # #![feature(old_io)]
/// use std::old_io::*;
///
/// let mut process = match Command::new("sh").arg("-c").arg("echo hello").spawn() {
@@ -365,6 +367,7 @@ impl Command {
/// # Examples
///
/// ```
/// # #![feature(old_io, core)]
/// use std::old_io::Command;
///
/// let output = match Command::new("cat").arg("foot.txt").output() {
@@ -386,6 +389,7 @@ impl Command {
/// # Examples
///
/// ```
/// # #![feature(old_io)]
/// use std::old_io::Command;
///
/// let status = match Command::new("ls").status() {
@@ -660,6 +664,7 @@ impl Process {
/// # Examples
///
/// ```no_run
/// # #![feature(old_io, io)]
/// use std::old_io::{Command, IoResult};
/// use std::old_io::process::ProcessExit;
///