Skip to content

Stabilize mpmc_channel - #158729

Open
obeis wants to merge 1 commit into
rust-lang:mainfrom
obeis:stabilize-mpmc-channel
Open

Stabilize mpmc_channel#158729
obeis wants to merge 1 commit into
rust-lang:mainfrom
obeis:stabilize-mpmc-channel

Conversation

@obeis

@obeis obeis commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

tracking issue: #126840

@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 Jul 3, 2026
@rustbot

rustbot commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

r? @jhpratt

rustbot has assigned @jhpratt.
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 13 candidates
  • Random selection from 7 candidates

@rustbot

This comment has been minimized.

@obeis obeis mentioned this pull request Jul 3, 2026
4 tasks
@obeis
obeis force-pushed the stabilize-mpmc-channel branch from cf36d2e to b4e2db4 Compare July 3, 2026 11:35
@jhpratt jhpratt added S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 4, 2026
#[stable(feature = "mpmc_channel", since = "CURRENT_RUSTC_VERSION")]
impl<T> fmt::Display for SendTimeoutError<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match *self {

@dtolnay dtolnay Jul 28, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SendTimeoutError::Disconnected renders as "sending on a disconnected channel", which is different from SendError and TrySendError::Disconnected (all of which are the same failure mode). Let's pick one of these messages and use it for all three types.

impl<T> fmt::Display for SendError<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
"sending on a closed channel".fmt(f)
}
}

impl<T> fmt::Display for TrySendError<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match *self {
TrySendError::Full(..) => "sending on a full channel".fmt(f),
TrySendError::Disconnected(..) => "sending on a closed channel".fmt(f),
}
}
}

(Can be a separate PR or in this PR.)

View changes since the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. 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