From 24334a03a3e3e6137b0810ebc14ac37e37a53349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Tue, 20 Dec 2016 17:09:36 -0800 Subject: [PATCH] Docs: Explain why/when `.lines()` returns an error --- src/libstd/io/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index b07da0dc268c4..6ba614fa2e3a3 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 }