mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
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:
@@ -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>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user