about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2025-06-20 12:25:09 +0200
committerSamuel Tardieu <sam@rfc1149.net>2025-06-20 17:53:09 +0200
commit6a9f223f0030729560fd60fbd112e3e6e81ae2a9 (patch)
treec7d74a1829689dc291561e9fbd5cdecca81fd456 /library/std/src
parent3b97f1308ff72016a4aaa93fbe6d09d4d6427815 (diff)
downloadrust-6a9f223f0030729560fd60fbd112e3e6e81ae2a9.tar.gz
rust-6a9f223f0030729560fd60fbd112e3e6e81ae2a9.zip
Add diagnostic items for Clippy
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/io/error.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/io/error.rs b/library/std/src/io/error.rs
index ba765a6203f..d43976ecc9e 100644
--- a/library/std/src/io/error.rs
+++ b/library/std/src/io/error.rs
@@ -219,6 +219,7 @@ struct Custom {
 /// the recognized error kinds and fail in those cases.
 #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
 #[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(not(test), rustc_diagnostic_item = "io_errorkind")]
 #[allow(deprecated)]
 #[non_exhaustive]
 pub enum ErrorKind {
@@ -562,6 +563,7 @@ impl Error {
     /// let eof_error = Error::from(ErrorKind::UnexpectedEof);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[cfg_attr(not(test), rustc_diagnostic_item = "io_error_new")]
     #[inline(never)]
     pub fn new<E>(kind: ErrorKind, error: E) -> Error
     where