Rollup merge of #69405 - NieDzejkob:docs-readline-appends, r=joshtriplett

docs: Stdin::read_line: mention the appending

The fact that `stdin().read_line()` is an [unpleasant](https://twitter.com/Michcioperz/status/1231646797661167617?s=20) [footgun](https://rustbattle.net/battle/straight-finch-8-e4f4). Let's make it clearer in the documentation.
This commit is contained in:
Pietro Albini 2020-02-24 11:15:36 +01:00 committed by GitHub
commit ba3fee6537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -302,7 +302,7 @@ impl Stdin {
StdinLock { inner: self.inner.lock().unwrap_or_else(|e| e.into_inner()) }
}
/// Locks this handle and reads a line of input into the specified buffer.
/// Locks this handle and reads a line of input, appending it to the specified buffer.
///
/// For detailed semantics of this method, see the documentation on
/// [`BufRead::read_line`].