Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary Send bound #111134

Merged
merged 1 commit into from May 16, 2023

Conversation

GilShoshan94
Copy link
Contributor

Hi,

While working on a PR on Tokio, I took inspiration from the std channel mpsc and stumbled on a Send bound for a Error impl.

Tokio's maintainer @Darksonn pointed out to me that Error used to required the Send bound long time ago (here #23541).

In the meantime, the Send bound Error got removed (see #21312 and #23799).

So here a PR to removed this bound for SendError<T>, TrySendError<T> and SendTimeoutError<T>.

@rustbot
Copy link
Collaborator

rustbot commented May 3, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @thomcc (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@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 May 3, 2023
@rustbot
Copy link
Collaborator

rustbot commented May 3, 2023

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@thomcc
Copy link
Member

thomcc commented May 5, 2023

This seems clearly worth doing, but since it's an insta-stable change to a public API, it needs libs-api sign-off (maybe FCP).

r? @dtolnay

@rustbot rustbot assigned dtolnay and unassigned thomcc May 5, 2023
@dtolnay dtolnay added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 5, 2023
@dtolnay
Copy link
Member

dtolnay commented May 5, 2023

@rust-lang/libs-api:
@rfcbot fcp merge

I agree with @thomcc that this is an obvious change.

Removes the T: Send constraint from these 2 stable Error impls:

This used to be necessary prior to #21312 / #23799 and the impls just haven't gotten updated since then.

@rfcbot
Copy link

rfcbot commented May 5, 2023

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels May 5, 2023
@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels May 15, 2023
@rfcbot
Copy link

rfcbot commented May 15, 2023

🔔 This is now entering its final comment period, as per the review above. 🔔

@dtolnay
Copy link
Member

dtolnay commented May 15, 2023

@bors r+

@bors
Copy link
Contributor

bors commented May 15, 2023

📌 Commit af5de85 has been approved by dtolnay

It is now in the queue for this repository.

@bors bors 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 May 15, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 15, 2023
…error, r=dtolnay

Remove unnecessary Send bound

Hi,

While working on a [PR on Tokio](tokio-rs/tokio#5666), I took inspiration from the std channel mpsc and stumbled on a `Send` bound for a `Error` impl.

Tokio's maintainer `@Darksonn` pointed out to me that `Error` used to required the `Send` bound long time ago (here rust-lang#23541).

In the meantime, the `Send` bound `Error` got removed (see rust-lang#21312 and rust-lang#23799).

So here a PR to removed this bound for `SendError<T>`, `TrySendError<T>` and `SendTimeoutError<T>`.
@bors
Copy link
Contributor

bors commented May 16, 2023

⌛ Testing commit af5de85 with merge 3ea9ad5...

@bors
Copy link
Contributor

bors commented May 16, 2023

☀️ Test successful - checks-actions
Approved by: dtolnay
Pushing 3ea9ad5 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 16, 2023
@bors bors merged commit 3ea9ad5 into rust-lang:master May 16, 2023
12 checks passed
@rustbot rustbot added this to the 1.71.0 milestone May 16, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3ea9ad5): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.6% [1.6%, 1.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 642.879s -> 641.794s (-0.17%)

@GilShoshan94 GilShoshan94 deleted the remove-send-bound-on-error branch May 24, 2023 10:39
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels May 25, 2023
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants