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:
Jacob Pratt 2025-02-12 20:10:03 -05:00 committed by GitHub
commit 9a26bb1892
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -250,6 +250,7 @@ symbols! {
Into,
IntoFuture,
IntoIterator,
IoBufRead,
IoLines,
IoRead,
IoSeek,

View File

@ -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.