From 7905c8fd997c4e32703eb8adc793863707881bc6 Mon Sep 17 00:00:00 2001 From: JafarTano <81587305+JaafarTanoukhi@users.noreply.github.com> Date: Mon, 18 May 2026 11:14:17 +0300 Subject: [PATCH] Add diagnostic items for IoBufReader and StdinLock --- compiler/rustc_span/src/symbol.rs | 2 ++ library/std/src/io/buffered/bufreader.rs | 1 + library/std/src/io/stdio.rs | 1 + 3 files changed, 4 insertions(+) diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 69ed7314855f..49852e006e4c 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -237,6 +237,7 @@ IntoFuture, IntoIterator, IntoIteratorItem, + IoBufReader, IrTyKind, Item, ItemContext, @@ -306,6 +307,7 @@ Some, Source, SpanCtxt, + StdinLock, Str, String, Struct, diff --git a/library/std/src/io/buffered/bufreader.rs b/library/std/src/io/buffered/bufreader.rs index ac461f4f0307..36bf329a946e 100644 --- a/library/std/src/io/buffered/bufreader.rs +++ b/library/std/src/io/buffered/bufreader.rs @@ -48,6 +48,7 @@ /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] +#[cfg_attr(not(test), rustc_diagnostic_item = "IoBufReader")] pub struct BufReader { buf: Buffer, inner: R, diff --git a/library/std/src/io/stdio.rs b/library/std/src/io/stdio.rs index 2d80fe49e80a..845d325e4e5b 100644 --- a/library/std/src/io/stdio.rs +++ b/library/std/src/io/stdio.rs @@ -285,6 +285,7 @@ pub struct Stdin { /// ``` #[must_use = "if unused stdin will immediately unlock"] #[stable(feature = "rust1", since = "1.0.0")] +#[cfg_attr(not(test), rustc_diagnostic_item = "StdinLock")] pub struct StdinLock<'a> { inner: MutexGuard<'a, BufReader>, }