about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-09-30 11:08:58 -0700
committerGitHub <noreply@github.com>2016-09-30 11:08:58 -0700
commit50932b5f4e3a5f1b6c955100da5b30d77bcd29d3 (patch)
treedbce305f5d8ea4c390a3aa27831a7756e6b22981 /src/libstd
parent954873055a998a06841ac19b39b1fe18a6641731 (diff)
parentaf1df9880f603320bde62c8786f2208d659ce8ae (diff)
downloadrust-50932b5f4e3a5f1b6c955100da5b30d77bcd29d3.tar.gz
rust-50932b5f4e3a5f1b6c955100da5b30d77bcd29d3.zip
Auto merge of #36864 - steveklabnik:rollup, r=steveklabnik
Rollup of 13 pull requests

- Successful merges: #36529, #36535, #36576, #36623, #36711, #36750, #36810, #36829, #36833, #36841, #36842, #36851, #36860
- Failed merges:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io/mod.rs10
-rw-r--r--src/libstd/process.rs20
-rw-r--r--src/libstd/thread/mod.rs2
-rw-r--r--src/libstd/time/mod.rs2
4 files changed, 24 insertions, 10 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index 0de02cbf19c..e308a2d8e03 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -1264,15 +1264,13 @@ pub trait BufRead: Read {
     #[stable(feature = "rust1", since = "1.0.0")]
     fn consume(&mut self, amt: usize);
 
-    /// Read all bytes into `buf` until the delimiter `byte` is reached.
+    /// Read all bytes into `buf` until the delimiter `byte` or EOF is reached.
     ///
     /// This function will read bytes from the underlying stream until the
     /// delimiter or EOF is found. Once found, all bytes up to, and including,
     /// the delimiter (if found) will be appended to `buf`.
     ///
-    /// If this reader is currently at EOF then this function will not modify
-    /// `buf` and will return `Ok(n)` where `n` is the number of bytes which
-    /// were read.
+    /// If successful, this function will return the total number of bytes read.
     ///
     /// # Errors
     ///
@@ -1315,9 +1313,7 @@ pub trait BufRead: Read {
     /// up to, and including, the delimiter (if found) will be appended to
     /// `buf`.
     ///
-    /// If this reader is currently at EOF then this function will not modify
-    /// `buf` and will return `Ok(n)` where `n` is the number of bytes which
-    /// were read.
+    /// If successful, this function will return the total number of bytes read.
     ///
     /// # Errors
     ///
diff --git a/src/libstd/process.rs b/src/libstd/process.rs
index f0c44430700..674b0009537 100644
--- a/src/libstd/process.rs
+++ b/src/libstd/process.rs
@@ -8,7 +8,25 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-//! Working with processes.
+//! A module for working with processes.
+//!
+//! # Examples
+//!
+//! Basic usage where we try to execute the `cat` shell command:
+//!
+//! ```should_panic
+//! use std::process::Command;
+//!
+//! let mut child = Command::new("/bin/cat")
+//!                         .arg("file.txt")
+//!                         .spawn()
+//!                         .expect("failed to execute child");
+//!
+//! let ecode = child.wait()
+//!                  .expect("failed to wait on child");
+//!
+//! assert!(ecode.success());
+//! ```
 
 #![stable(feature = "process", since = "1.0.0")]
 
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index d8e021bb04f..a634c8f77a4 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -151,7 +151,7 @@
 //!
 //! [`Cell`]: ../cell/struct.Cell.html
 //! [`RefCell`]: ../cell/struct.RefCell.html
-//! [`thread_local!`]: ../macro.thread_local!.html
+//! [`thread_local!`]: ../macro.thread_local.html
 //! [`with`]: struct.LocalKey.html#method.with
 
 #![stable(feature = "rust1", since = "1.0.0")]
diff --git a/src/libstd/time/mod.rs b/src/libstd/time/mod.rs
index 154f603c84f..6854f1e14fa 100644
--- a/src/libstd/time/mod.rs
+++ b/src/libstd/time/mod.rs
@@ -118,7 +118,7 @@ pub struct Instant(time::Instant);
 pub struct SystemTime(time::SystemTime);
 
 /// An error returned from the `duration_since` method on `SystemTime`,
-/// used to learn about why how far in the opposite direction a timestamp lies.
+/// used to learn how far in the opposite direction a system time lies.
 #[derive(Clone, Debug)]
 #[stable(feature = "time2", since = "1.8.0")]
 pub struct SystemTimeError(Duration);