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

Switch to std::error::Error for errors #3948

Merged
merged 6 commits into from
Dec 3, 2019
Merged

Switch to std::error::Error for errors #3948

merged 6 commits into from
Dec 3, 2019

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Nov 30, 2019

In attempting to modernize https://github.com/dtolnay/syn/blob/1.0.9/codegen/src/error.rs I ran into trouble because rustfmt::ErrorKind does not implement the std::error::Error trait.

This PR drops the reliance on the failure::Fail trait and gives errors a std::error::Error implementation, using thiserror to replace derive(Fail) and anyhow to replace failure::Error.

@topecongiro
Copy link
Contributor

Nice, thank you!

@topecongiro topecongiro merged commit 7713d05 into rust-lang:master Dec 3, 2019
@dtolnay dtolnay deleted the error branch December 4, 2019 07:42
calebcartwright pushed a commit to calebcartwright/rustfmt that referenced this pull request Jun 12, 2020
@karyon
Copy link
Contributor

karyon commented Oct 27, 2021

backported in #4253

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

Successfully merging this pull request may close these issues.

3 participants