Skip to content

Commit 3c26ff4

Browse files
authored
Rollup merge of rust-lang#38505 - estebank:why-lines, r=frewsxcv
Docs: Explain why/when `.lines()` returns an error Fix rust-lang#37744.
2 parents 0f0e74e + 24334a0 commit 3c26ff4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/libstd/io/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,6 +1425,12 @@ pub trait BufRead: Read {
14251425
/// println!("{}", line.unwrap());
14261426
/// }
14271427
/// ```
1428+
///
1429+
/// # Errors
1430+
///
1431+
/// Each line of the iterator has the same error semantics as [`BufRead::read_line()`].
1432+
///
1433+
/// [`BufRead::read_line()`]: trait.BufRead.html#method.read_line
14281434
#[stable(feature = "rust1", since = "1.0.0")]
14291435
fn lines(self) -> Lines<Self> where Self: Sized {
14301436
Lines { buf: self }

0 commit comments

Comments
 (0)