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

Would this be worth exploring adding to std? #13

Closed
mehcode opened this issue Oct 8, 2019 · 4 comments
Closed

Would this be worth exploring adding to std? #13

mehcode opened this issue Oct 8, 2019 · 4 comments
Labels

Comments

@mehcode
Copy link

mehcode commented Oct 8, 2019

First, this crate is awesome. I feel like Rust's error story is starting to feel really ergonomic.
This crate looks like a very nice Error type to reach for when working with a leaf/application crate.

Have you thought about working towards adding it to std ?

  • anyhow::Error could be added as std::error ( as a pseudo-primitive ) via the same hack that i32 and std::i32 are merged
  • std::error could be a very good default for various Err, Error, and E type parameters
  • std::error in a future edition could be added to the prelude as just error
@dtolnay
Copy link
Owner

dtolnay commented Oct 9, 2019

I am open to that, but since this crate just came out yesterday it's a bit early to say. I think if we still think this is the best possible approach after ~12 months then that could be good justification for a std::error RFC.

@dtolnay dtolnay added the later label Oct 11, 2019
@dtolnay dtolnay changed the title Would this be worth exploring adding to std ? Would this be worth exploring adding to std? Mar 14, 2020
@brightly-salty
Copy link

Bumping as it's been 14 months (making "later" now) since the above comment. I do feel like this is the best possible approach to Rust error handling. How should exploring adding to std proceed if it is still viable?

@dtolnay
Copy link
Owner

dtolnay commented Dec 15, 2020

RFC 2820 has some discussion on a standard type erased error type.

There is also now an error handling project group (https://github.com/rust-lang/project-error-handling) whose purview such a proposal would be under.

@dtolnay
Copy link
Owner

dtolnay commented Mar 25, 2021

The error handling project group clearly knows about this crate, so I don't think I need to keep this issue around. Closing and will leave it to them as far as what goes in std.

@dtolnay dtolnay closed this as completed Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants