about summary refs log tree commit diff
path: root/library/std/src/io/stdio.rs
diff options
context:
space:
mode:
authorJason Newcomb <jsnewcomb@pm.me>2023-09-26 23:56:38 -0400
committerJason Newcomb <jsnewcomb@pm.me>2023-10-05 18:21:47 -0400
commitd464b72970faf5769c6c02d52f21f8e26eb1727d (patch)
tree1357c41f218e1ecc933587e8d654b1f5d7b6e647 /library/std/src/io/stdio.rs
parentcae0791da47bb01f16885eb233dcd66b0093a6e1 (diff)
downloadrust-d464b72970faf5769c6c02d52f21f8e26eb1727d.tar.gz
rust-d464b72970faf5769c6c02d52f21f8e26eb1727d.zip
Add more diagnostic items for clippy
Diffstat (limited to 'library/std/src/io/stdio.rs')
-rw-r--r--library/std/src/io/stdio.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/io/stdio.rs b/library/std/src/io/stdio.rs
index 9098d36ee53..05b21eeb40f 100644
--- a/library/std/src/io/stdio.rs
+++ b/library/std/src/io/stdio.rs
@@ -611,6 +611,7 @@ static STDOUT: OnceLock<ReentrantMutex<RefCell<LineWriter<StdoutRaw>>>> = OnceLo
 /// ```
 #[must_use]
 #[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(not(test), rustc_diagnostic_item = "io_stdout")]
 pub fn stdout() -> Stdout {
     Stdout {
         inner: STDOUT
@@ -847,6 +848,7 @@ pub struct StderrLock<'a> {
 /// ```
 #[must_use]
 #[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(not(test), rustc_diagnostic_item = "io_stderr")]
 pub fn stderr() -> Stderr {
     // Note that unlike `stdout()` we don't use `at_exit` here to register a
     // destructor. Stderr is not buffered, so there's no need to run a