-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Make std::error::Error
not inherit from Send
#23799
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Send bound is an unnecessary restriction, and though provided as a convenience, can't be removed by downstream code. The removal of this bound is a [breaking-change] since it removes an implicit Send bound on all `E: Error` and all `Error` trait objects. To migrate, consider if your code actually requires the Send bound and, if so, add it explicitly. Fixes rust-lang#23774
bors
added a commit
that referenced
this pull request
Mar 28, 2015
The Send bound is an unnecessary restriction, and though provided as a convenience, can't be removed by downstream code. The removal of this bound is a [breaking-change] since it removes an implicit Send bound on all `E: Error` and all `Error` trait objects. To migrate, consider if your code actually requires the Send bound and, if so, add it explicitly. Fixes #23774 r? @aturon
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
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 16, 2023
…ror, 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>`.
RalfJung
pushed a commit
to RalfJung/miri
that referenced
this pull request
May 16, 2023
…olnay 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/rust#23541). In the meantime, the `Send` bound `Error` got removed (see rust-lang/rust#21312 and rust-lang/rust#23799). So here a PR to removed this bound for `SendError<T>`, `TrySendError<T>` and `SendTimeoutError<T>`.
thomcc
pushed a commit
to tcdi/postgrestd
that referenced
this pull request
Jul 18, 2023
…olnay 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/rust#23541). In the meantime, the `Send` bound `Error` got removed (see rust-lang/rust#21312 and rust-lang/rust#23799). So here a PR to removed this bound for `SendError<T>`, `TrySendError<T>` and `SendTimeoutError<T>`.
RalfJung
pushed a commit
to RalfJung/rust-analyzer
that referenced
this pull request
Apr 20, 2024
…olnay 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/rust#23541). In the meantime, the `Send` bound `Error` got removed (see rust-lang/rust#21312 and rust-lang/rust#23799). So here a PR to removed this bound for `SendError<T>`, `TrySendError<T>` and `SendTimeoutError<T>`.
RalfJung
pushed a commit
to RalfJung/rust-analyzer
that referenced
this pull request
Apr 27, 2024
…olnay 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/rust#23541). In the meantime, the `Send` bound `Error` got removed (see rust-lang/rust#21312 and rust-lang/rust#23799). So here a PR to removed this bound for `SendError<T>`, `TrySendError<T>` and `SendTimeoutError<T>`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Send bound is an unnecessary restriction, and though provided as a convenience, can't be removed by downstream code.
The removal of this bound is a [breaking-change] since it removes an implicit Send bound on all
E: Error
and allError
trait objects.To migrate, consider if your code actually requires the Send bound and, if so, add it explicitly.
Fixes #23774
r? @aturon