about summary refs log tree commit diff
path: root/src/libstd/io
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2016-12-20 17:09:36 -0800
committerEsteban Küber <esteban@kuber.com.ar>2016-12-20 17:09:36 -0800
commit24334a03a3e3e6137b0810ebc14ac37e37a53349 (patch)
tree0d87b44220ef46a653b97f2a0a1e7150021aa39b /src/libstd/io
parent94ae2a2e6791e0c4ab6fba836b2b09a07f2d3c8a (diff)
downloadrust-24334a03a3e3e6137b0810ebc14ac37e37a53349.tar.gz
rust-24334a03a3e3e6137b0810ebc14ac37e37a53349.zip
Docs: Explain why/when `.lines()` returns an error
Diffstat (limited to 'src/libstd/io')
-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 b07da0dc268..6ba614fa2e3 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 }