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 Send bound from Error trait. #21312

Merged
merged 1 commit into from
Jan 21, 2015
Merged

Remove Send bound from Error trait. #21312

merged 1 commit into from
Jan 21, 2015

Conversation

michaelsproul
Copy link
Contributor

As discussed with @aturon, this PR removes the Send bound from std::error::Error, allowing us to implement Error for error types containing non-Send types. Current examples include PoisonError and TryLockError from std::sync which contain a Guard that we don't want sent between tasks.

[breaking-change]

@rust-highfive
Copy link
Collaborator

r? @pcwalton

(rust_highfive has picked a reviewer for you, use r? to override)

@michaelsproul
Copy link
Contributor Author

Apparently this is also part of a larger RFC, but I couldn't find it...

@brson
Copy link
Contributor

brson commented Jan 17, 2015

r? @aturon

@rust-highfive rust-highfive assigned aturon and unassigned pcwalton Jan 17, 2015
@aturon
Copy link
Member

aturon commented Jan 20, 2015

@bors: r+ 97a2b26

@aturon
Copy link
Member

aturon commented Jan 20, 2015

@bors: rollup

barosl added a commit to barosl/rust that referenced this pull request Jan 20, 2015
…nd, r=aturon

As discussed with @aturon, this PR removes the `Send` bound from `std::error::Error`, allowing us to implement `Error` for error types containing non-`Send` types. Current examples include `PoisonError` and `TryLockError` from `std::sync` which contain a Guard that we don't want sent between tasks.

[breaking-change]
barosl added a commit to barosl/rust that referenced this pull request Jan 20, 2015
…lexcrichton

Two errors in `std::sync` are currently missing implementations of the standard error trait because they contain types which aren't `Send`.

This PR therefore requires rust-lang#21312.
@bors bors merged commit 97a2b26 into rust-lang:master Jan 21, 2015
@michaelsproul michaelsproul deleted the remove-error-send-bound branch January 21, 2015 01:57
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants