Skip to content

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

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
cammeresi:20260422-sender-diag
Apr 24, 2026
Merged

Add Sender diagnostic item for std::sync::mpsc::Sender#155669
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
cammeresi:20260422-sender-diag

Conversation

@cammeresi
Copy link
Copy Markdown
Contributor

@cammeresi cammeresi commented Apr 23, 2026

Similar to the existing Receiver item, it will be used in Clippy to detect uses of is_disconnected that are racy.

Tracking issue: #153668
Suggested: rust-lang/libs-team#748 (comment)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 23, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 23, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 7 candidates
  • Random selection from Mark-Simulacrum, jhpratt

Copy link
Copy Markdown
Contributor

@mejrs mejrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r? me

We have multiple Senders in the standard library, (same for Receiver actually). Shouldn't we call it something like MpscSender?

View changes since this review

@rustbot rustbot assigned mejrs and unassigned Mark-Simulacrum Apr 23, 2026
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 23, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 23, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@cammeresi
Copy link
Copy Markdown
Contributor Author

cammeresi commented Apr 23, 2026

We have multiple Senders in the standard library, (same for Receiver actually). Shouldn't we call it something like MpscSender?

I wouldn't argue with that, but Receiver is already used for the receiver, and that symbol is actually referenced by Clippy. Should I change it to align with MpscSender?

@mejrs
Copy link
Copy Markdown
Contributor

mejrs commented Apr 23, 2026

That sounds good to me. What kind of fallout does changing diagnostic item names cause for clippy? If that's going to be a pain wrt Receiver I might not do it tbh.

@cammeresi
Copy link
Copy Markdown
Contributor Author

Well I'm kind of confused now about how to proceed. I figured one could do that rename within this repository, but the clippy here doesn't seem to build, maybe due to ongoing compiler work.

@mejrs
Copy link
Copy Markdown
Contributor

mejrs commented Apr 23, 2026

Hmm let's not bother with Receiver then, and just rename the diagnostic item to MspcSender.

Similar to the existing `Receiver` item, it will be used in Clippy to
detect uses of `is_disconnected` that are racy.
@cammeresi cammeresi force-pushed the 20260422-sender-diag branch from 29e1cd1 to 70fe8a6 Compare April 24, 2026 00:20
@cammeresi
Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 24, 2026
@mejrs
Copy link
Copy Markdown
Contributor

mejrs commented Apr 24, 2026

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 24, 2026

📌 Commit 70fe8a6 has been approved by mejrs

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 24, 2026
rust-bors Bot pushed a commit that referenced this pull request Apr 24, 2026
Rollup of 9 pull requests

Successful merges:

 - #155684 (Generalize IO Traits for `Arc<T>` where `&T: IoTrait`)
 - #155081 (Move and clean up some ui test)
 - #155379 (Avoid query cycles in DataflowConstProp)
 - #155663 (Eliminate `CrateMetadataRef`.)
 - #155669 (Add `Sender` diagnostic item for `std::sync::mpsc::Sender`)
 - #155698 (Syntactically reject tuple index shorthands in struct patterns to fix a correctness regression)
 - #155703 (Remove myself as a maintainer of `wasm32-wasip1-threads`)
 - #155706 (Remove `AttributeLintKind` variants - part 7)
 - #155712 (Forbid `*-pass` and `*-fail` directives in tests/crashes)
@rust-bors rust-bors Bot merged commit 46362de into rust-lang:main Apr 24, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 24, 2026
@cammeresi cammeresi deleted the 20260422-sender-diag branch April 24, 2026 14:02
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Apr 27, 2026
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#155684 (Generalize IO Traits for `Arc<T>` where `&T: IoTrait`)
 - rust-lang/rust#155081 (Move and clean up some ui test)
 - rust-lang/rust#155379 (Avoid query cycles in DataflowConstProp)
 - rust-lang/rust#155663 (Eliminate `CrateMetadataRef`.)
 - rust-lang/rust#155669 (Add `Sender` diagnostic item for `std::sync::mpsc::Sender`)
 - rust-lang/rust#155698 (Syntactically reject tuple index shorthands in struct patterns to fix a correctness regression)
 - rust-lang/rust#155703 (Remove myself as a maintainer of `wasm32-wasip1-threads`)
 - rust-lang/rust#155706 (Remove `AttributeLintKind` variants - part 7)
 - rust-lang/rust#155712 (Forbid `*-pass` and `*-fail` directives in tests/crashes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants