diff options
| author | bors <bors@rust-lang.org> | 2016-06-02 05:28:46 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-06-02 05:28:46 -0700 |
| commit | b47a442f0b868b8501a894c3fdc05719eb337962 (patch) | |
| tree | 1d546c07d895dfcfabd5ac03d4d613f9f443c4be /src/libstd | |
| parent | 270bd7c89792d4f19432183c981418a27072f4c2 (diff) | |
| parent | 7399403f38410f82a2f26efdb594a7325b0da52c (diff) | |
| download | rust-b47a442f0b868b8501a894c3fdc05719eb337962.tar.gz rust-b47a442f0b868b8501a894c3fdc05719eb337962.zip | |
Auto merge of #34034 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 7 pull requests - Successful merges: #33993, #34013, #34014, #34015, #34019, #34021, #34033 - Failed merges:
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/fs.rs | 7 | ||||
| -rw-r--r-- | src/libstd/primitive_docs.rs | 2 | ||||
| -rw-r--r-- | src/libstd/process.rs | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 734f774043d..0180c3118a5 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -32,6 +32,8 @@ use time::SystemTime; /// it was opened with. Files also implement `Seek` to alter the logical cursor /// that the file contains internally. /// +/// Files are automatically closed when they go out of scope. +/// /// # Examples /// /// ```no_run @@ -1341,8 +1343,9 @@ pub fn remove_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> { /// if dir.is_dir() { /// for entry in try!(fs::read_dir(dir)) { /// let entry = try!(entry); -/// if try!(entry.file_type()).is_dir() { -/// try!(visit_dirs(&entry.path(), cb)); +/// let path = entry.path(); +/// if path.is_dir() { +/// try!(visit_dirs(&path, cb)); /// } else { /// cb(&entry); /// } diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs index e083605a2ac..11af768c5b9 100644 --- a/src/libstd/primitive_docs.rs +++ b/src/libstd/primitive_docs.rs @@ -28,7 +28,7 @@ /// ``` /// /// [`assert!`]: macro.assert!.html -/// [`if` conditionals]: ../book/if.html +/// [`if`]: ../book/if.html /// [`BitAnd`]: ops/trait.BitAnd.html /// [`BitOr`]: ops/trait.BitOr.html /// [`Not`]: ops/trait.Not.html diff --git a/src/libstd/process.rs b/src/libstd/process.rs index 1b6f6c3e875..3ce9bcc79f2 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -195,7 +195,7 @@ impl FromInner<AnonPipe> for ChildStderr { /// .arg("-c") /// .arg("echo hello") /// .output() -/// .expect("failed to execute proces"); +/// .expect("failed to execute process"); /// /// let hello = output.stdout; /// ``` |
