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
2
2
--> replaced
3
3
|
4
4
LL | 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
6
8
|
7
9
note: there are multiple different versions of crate `dependency` in the dependency graph
8
10
--> replaced
@@ -27,6 +29,11 @@ LL | pub trait Trait {
27
29
| --------------- this is the found trait
28
30
= note: two types coming from two different versions of the same crate are different types even if they look the same
29
31
= 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`
30
37
31
38
error[E0599]: no method named `foo` found for struct `dep_2_reexport::Type` in the current scope
32
39
--> replaced
@@ -77,11 +84,13 @@ LL | use dependency::{Trait, do_something};
77
84
LL | pub trait Trait {
78
85
| --------------- this is the trait that was imported
79
86
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
81
88
--> replaced
82
89
|
83
90
LL | 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
85
94
|
86
95
note: there are multiple different versions of crate `dependency` in the dependency graph
87
96
--> replaced
@@ -106,6 +115,11 @@ LL | pub struct OtherType;
106
115
LL | pub trait Trait {
107
116
| --------------- this is the found trait
108
117
= 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`
109
123
110
124
error: aborting due to 4 previous errors
111
125
0 commit comments