about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2016-12-24 14:29:26 -0500
committerGitHub <noreply@github.com>2016-12-24 14:29:26 -0500
commit3c26ff450c914ab18e69b59777084eb101c65019 (patch)
treee65b6d123805ca0651ad739d842c7597e183880b /src/libstd
parent0f0e74e0ec207f18e1cff6b5fa85d7ca3c19d82a (diff)
parent24334a03a3e3e6137b0810ebc14ac37e37a53349 (diff)
downloadrust-3c26ff450c914ab18e69b59777084eb101c65019.tar.gz
rust-3c26ff450c914ab18e69b59777084eb101c65019.zip
Rollup merge of #38505 - estebank:why-lines, r=frewsxcv
Docs: Explain why/when `.lines()` returns an error

Fix #37744.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index 143a85ae321..5450a10c9bd 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -1425,6 +1425,12 @@ pub trait BufRead: Read {
     ///     println!("{}", line.unwrap());
     /// }
     /// ```
+    ///
+    /// # Errors
+    ///
+    /// Each line of the iterator has the same error semantics as [`BufRead::read_line()`].
+    ///
+    /// [`BufRead::read_line()`]: trait.BufRead.html#method.read_line
     #[stable(feature = "rust1", since = "1.0.0")]
     fn lines(self) -> Lines<Self> where Self: Sized {
         Lines { buf: self }