Rollup merge of #155669 - cammeresi:20260422-sender-diag, r=mejrs

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.

Tracking issue: rust-lang/rust#153668
Suggested: https://github.com/rust-lang/libs-team/issues/748#issuecomment-4032790302
This commit is contained in:
Jacob Pratt
2026-04-24 02:42:51 -04:00
committed by GitHub
+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>,
}