1- error[E0277]: the trait bound `dep_2_reexport::Type: Trait` is not satisfied because the trait comes from a different crate version
1+ error[E0277]: the trait bound `dep_2_reexport::Type: Trait` is not satisfied
22 --> replaced
33 |
44LL | do_something(Type);
5- | ^^^^ the trait `Trait` is not implemented for `dep_2_reexport::Type`
5+ | ------------ ^^^^ the trait `Trait` is not implemented for `dep_2_reexport::Type`
6+ | |
7+ | required by a bound introduced by this call
68 |
79note: there are multiple different versions of crate `dependency` in the dependency graph
810 --> replaced
@@ -27,6 +29,11 @@ LL | pub trait Trait {
2729 | --------------- this is the found trait
2830 = note: two types coming from two different versions of the same crate are different types even if they look the same
2931 = help: you can use `cargo tree` to explore your dependency tree
32+ note: required by a bound in `do_something`
33+ --> replaced
34+ |
35+ LL | pub fn do_something<X: Trait>(_: X) {}
36+ | ^^^^^ required by this bound in `do_something`
3037
3138error[E0599]: no method named `foo` found for struct `dep_2_reexport::Type` in the current scope
3239 --> replaced
@@ -77,11 +84,13 @@ LL | use dependency::{Trait, do_something};
7784LL | pub trait Trait {
7885 | --------------- this is the trait that was imported
7986
80- error[E0277]: the trait bound `OtherType: Trait` is not satisfied because the trait comes from a different crate version
87+ error[E0277]: the trait bound `OtherType: Trait` is not satisfied
8188 --> replaced
8289 |
8390LL | do_something(OtherType);
84- | ^^^^^^^^^ the trait `Trait` is not implemented for `OtherType`
91+ | ------------ ^^^^^^^^^ the trait `Trait` is not implemented for `OtherType`
92+ | |
93+ | required by a bound introduced by this call
8594 |
8695note: there are multiple different versions of crate `dependency` in the dependency graph
8796 --> replaced
@@ -106,6 +115,11 @@ LL | pub struct OtherType;
106115LL | pub trait Trait {
107116 | --------------- this is the found trait
108117 = help: you can use `cargo tree` to explore your dependency tree
118+ note: required by a bound in `do_something`
119+ --> replaced
120+ |
121+ LL | pub fn do_something<X: Trait>(_: X) {}
122+ | ^^^^^ required by this bound in `do_something`
109123
110124error: aborting due to 4 previous errors
111125
0 commit comments