Closed
Description
Consider three crates High, Mid and Low, where:
- Mid depends on Low;
- High depends on both Mid and Low.
This is a quite common case.
Now, it sometimes happens that the dependency of Mid is bumped to a more recent version of Low. If, however, the developer fails to bump the dependency of High to a more recent version of Low, surprising error messages arise.
In particular,
"error: the trait `Foo` is not implemented for the type `Bar`"
may arise, without any change to the code of either Foo
or Bar
.
It would be great if the compiler could detect the error and somehow print something along the liens of
"error: using conflicting versions of the trait `Foo` for type `Bar`. You are probably using two distinct versions of the same library."
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: An issue proposing an enhancement or a PR with one.Diagnostics: Errors or lints caused be the use of two different crate versions.Status: This issue has no reproduction and needs a reproduction to make progress.Relevant to the compiler team, which will review and decide on the PR/issue.