Rollup merge of #131503 - theemathas:stdin_read_line_docs, r=Mark-Sim… · qinheping/verify-rust-std@113c6c0 (original) (raw)

Original file line number Diff line number Diff line change
@@ -370,7 +370,12 @@ impl Stdin {
370 370 /// Locks this handle and reads a line of input, appending it to the specified buffer.
371 371 ///
372 372 /// For detailed semantics of this method, see the documentation on
373 - /// [`BufRead::read_line`].
373 + /// [`BufRead::read_line`]. In particular:
374 + /// * Previous content of the buffer will be preserved. To avoid appending
375 + /// to the buffer, you need to [`clear`] it first.
376 + /// * The trailing newline character, if any, is included in the buffer.
377 + ///
378 + /// [`clear`]: String::clear
374 379 ///
375 380 /// # Examples
376 381 ///