Skip to content

Trait version mismatches aren't surfaced in errors #53795

Description

@bbangert

When using the sentry 0.8.0 crate with my project using error-chain 0.12.0, an error happened attempting to display the error:

error[E0277]: the trait bound `errors::Error: error_chain::ChainedError` is not satisfied
   --> src/client.rs:468:21
    |
468 |                     capture_error_chain(&e);
    |                     ^^^^^^^^^^^^^^^^^^^ the trait `error_chain::ChainedError` is not implemented for `errors::Error`
    |
    = note: required by `sentry::integrations::error_chain::capture_error_chain

The errors::Error object did implement the trait, however it was the 0.12 version of the trait, and sentry 0.8.0 was built with error-chain 0.11.0. I got lucky in guessing this was the issue after a few hours of tweaking things and trying to understand how the trait wasn't being satisfied.

Ideally the rust compiler should note the trait version mismatch somehow.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.D-confusingDiagnostics: Confusing error or lint that should be reworked.D-crate-version-mismatchDiagnostics: Errors or lints caused be the use of two different crate versions.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions