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

Trait version mismatches aren't surfaced in errors #53795

Open
bbangert opened this issue Aug 29, 2018 · 1 comment
Open

Trait version mismatches aren't surfaced in errors #53795

bbangert opened this issue Aug 29, 2018 · 1 comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. D-confusing Diagnostics: Confusing error or lint that should be reworked. D-crate-version-mismatch Diagnostics: Errors or lints caused be the use of two different crate versions. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@bbangert
Copy link

bbangert commented Aug 29, 2018

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.

@estebank
Copy link
Contributor

estebank commented Aug 29, 2018

CC #46388 #22750 #51458 #32611

@estebank estebank added the A-diagnostics Area: Messages for errors, warnings, and lints label Aug 29, 2018
@estebank estebank added D-confusing Diagnostics: Confusing error or lint that should be reworked. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 18, 2019
@JohnTitor JohnTitor added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Mar 15, 2020
@jyn514 jyn514 added the D-crate-version-mismatch Diagnostics: Errors or lints caused be the use of two different crate versions. label Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. D-confusing Diagnostics: Confusing error or lint that should be reworked. D-crate-version-mismatch Diagnostics: Errors or lints caused be the use of two different crate versions. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants