about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-02-12 20:10:03 -0500
committerGitHub <noreply@github.com>2025-02-12 20:10:03 -0500
commit9a26bb1892c4b1408c9b052b502b44be8cf9ee29 (patch)
treeed930161dc269f2ff2fd32a56bf45ea211f12f90 /library/std/src
parent89e01355eb4d92197934f2acdbc2fcac3857c7a1 (diff)
parentf8930b44a582d93f083b9da3f61f8f8b989999f2 (diff)
downloadrust-9a26bb1892c4b1408c9b052b502b44be8cf9ee29.tar.gz
rust-9a26bb1892c4b1408c9b052b502b44be8cf9ee29.zip
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()`.
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/io/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs
index 0ffad2c27a4..980ea1478e0 100644
--- a/library/std/src/io/mod.rs
+++ b/library/std/src/io/mod.rs
@@ -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.