Skip to content

Commit abf47c9

Browse files
samueltardieugitbot
authored and
gitbot
committed
Add diagnostic item for std::io::BufRead
This will be used in Clippy to detect unbuffered calls to `Read::bytes()`.
1 parent d90fdfb commit abf47c9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

std/src/io/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2249,6 +2249,7 @@ fn skip_until<R: BufRead + ?Sized>(r: &mut R, delim: u8) -> Result<usize> {
22492249
/// }
22502250
/// ```
22512251
#[stable(feature = "rust1", since = "1.0.0")]
2252+
#[cfg_attr(not(test), rustc_diagnostic_item = "IoBufRead")]
22522253
pub trait BufRead: Read {
22532254
/// Returns the contents of the internal buffer, filling it with more data
22542255
/// from the inner reader if it is empty.

0 commit comments

Comments
 (0)