From 24334a03a3e3e6137b0810ebc14ac37e37a53349 Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Tue, 20 Dec 2016 17:09:36 -0800 Subject: Docs: Explain why/when `.lines()` returns an error --- src/libstd/io/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libstd') 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 where Self: Sized { Lines { buf: self } -- cgit 1.4.1-3-g733a5