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

implement core::error::Error (dynamic approach) #629

Closed

Commits on Sep 9, 2024

  1. implement core::error::Error

    this trait has been stabilised in Rust 1.81.0.
    
    the existing custom `Error` types cannot be removed / replaced as that'd
    be a breaking change. for the same reason it's not possible for them to
    require `core::error::Error` being implemented.
    
    however, we can add an `impl core::error::Error for dyn Error` for every
    custom error type to provide an automatic coverage. HALs can still add
    an implementation for their specific error type if they wish to add more
    details (e.g. implement `source`).
    as `core::error::Error` requires `core::fmt::Display` to be implemented
    a simple blanket implementation has been added which prints the `Debug`
    output.
    
    existing `std` feature-gated implementations of `std::error::Error` have
    also been moved to `core::error::Error` and the feature gate removed.
    
    this raises the MSRV to 1.81.0 for most crates, but based on the MSRV
    policy this should not be an issue.
    rursprung committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    7bb7ca3 View commit details
    Browse the repository at this point in the history