Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd a Sync bounds to errors #110
Conversation
This comment has been minimized.
This comment has been minimized.
|
Do you have an example of code that requires this change? |
This comment has been minimized.
This comment has been minimized.
|
Returning an error_chain generated error as a |
This comment has been minimized.
This comment has been minimized.
|
Most errors are Sync I think, since they are read-only? |
This comment has been minimized.
This comment has been minimized.
|
Yep! |
This comment has been minimized.
This comment has been minimized.
|
Please update the changelog. |
This comment has been minimized.
This comment has been minimized.
|
Done |
This comment has been minimized.
This comment has been minimized.
What do you mean? |
This comment has been minimized.
This comment has been minimized.
|
This works: |
This comment has been minimized.
This comment has been minimized.
|
Hum, strange, do you know why? |
This comment has been minimized.
This comment has been minimized.
|
We never bothered implementing it since |
Yamakaky
merged commit 6e5ac7a
into
rust-lang-nursery:master
Jan 9, 2017
1 check passed
This comment has been minimized.
This comment has been minimized.
|
Ok, let see if it breaks something important in another crate ;) |
This comment has been minimized.
This comment has been minimized.
diwic
commented
Jan 23, 2017
|
JFTR, my main D-Bus error struct won't implement Sync, because it is a wrapper around an FFI struct, and as such I cannot provide any guarantees that the "C" side of the struct is (or will remain) Sync. |
This comment has been minimized.
This comment has been minimized.
|
That's what I feared... |
This comment has been minimized.
This comment has been minimized.
|
What is the suggested workaround for errors that cannot be made Sync? Can I just not use error-chain anymore? |
This comment has been minimized.
This comment has been minimized.
|
I'll just remove it in 0.9. |
Yamakaky
added a commit
that referenced
this pull request
Feb 8, 2017
This comment has been minimized.
This comment has been minimized.
|
Things break without the bound just as they do with it. Can we make the error bounds configurable in the |
This comment has been minimized.
This comment has been minimized.
|
Yes, see #121. |
This comment has been minimized.
This comment has been minimized.
jsgf
commented
Feb 10, 2017
•
|
I ran into this because |
This comment has been minimized.
This comment has been minimized.
|
See #134 |
This comment has been minimized.
This comment has been minimized.
rnewman
commented
Apr 18, 2017
|
Reverting this means that |
sfackler commentedJan 4, 2017
Box<Error + Sync + Send>is far more common thanBox<Error + Send>- common conveniences like conversion from strings are notimplemented for
Box<Error + Send>,Box<Error + Send>cannot bestored in
io::Errors, etc.This is a breaking change, but non-
Syncerrors should be rare so thefallout shouldn't be too bad.
r? @brson I've confirmed that rustup builds without modification with this change.