Add #![feature] attributes to doctests
This commit is contained in:
@@ -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;
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user