mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-16 22:16:53 +00:00
Rollup merge of #136945 - samueltardieu:push-rsqlyknnvyqm, r=fmease
Add diagnostic item for `std::io::BufRead` This will be used in Clippy to detect unbuffered calls to `Read::bytes()`.
This commit is contained in:
commit
9a26bb1892
@ -250,6 +250,7 @@ symbols! {
|
||||
Into,
|
||||
IntoFuture,
|
||||
IntoIterator,
|
||||
IoBufRead,
|
||||
IoLines,
|
||||
IoRead,
|
||||
IoSeek,
|
||||
|
@ -2249,6 +2249,7 @@ fn skip_until<R: BufRead + ?Sized>(r: &mut R, delim: u8) -> Result<usize> {
|
||||
/// }
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[cfg_attr(not(test), rustc_diagnostic_item = "IoBufRead")]
|
||||
pub trait BufRead: Read {
|
||||
/// Returns the contents of the internal buffer, filling it with more data
|
||||
/// from the inner reader if it is empty.
|
||||
|
Loading…
Reference in New Issue
Block a user