Add Sender diagnostic item for std::sync::mpsc::Sender

Similar to the existing `Receiver` item, it will be used in Clippy to
detect uses of `is_disconnected` that are racy.
This commit is contained in:
Sidney Cammeresi
2026-04-22 21:21:55 -07:00
parent 30837cb66d
commit 70fe8a6dc4
+1
View File
@@ -330,6 +330,7 @@ pub struct IntoIter<T> {
/// assert_eq!(3, msg + msg2);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "MpscSender")]
pub struct Sender<T> {
inner: mpmc::Sender<T>,
}