blob: 5888aad8f37bcc42957d9607465911902db5957d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
error[E0277]: the trait bound `dep_2_reexport::Type: Trait` is not satisfied
--> replaced
|
LL | do_something(Type);
| ------------ ^^^^ the trait `Trait` is not implemented for `dep_2_reexport::Type`
| |
| required by a bound introduced by this call
|
note: there are multiple different versions of crate `dependency` in the dependency graph
--> replaced
|
LL | pub struct Type(pub i32);
| --------------- this type implements the required trait
LL | pub trait Trait {
| ^^^^^^^^^^^^^^^ this is the required trait
|
::: replaced
|
LL | extern crate dep_2_reexport;
| ---------------------------- one version of crate `dependency` is used here, as a dependency of crate `foo`
LL | extern crate dependency;
| ------------------------ one version of crate `dependency` is used here, as a direct dependency of the current crate
|
::: replaced
|
LL | pub struct Type;
| --------------- this type doesn't implement the required trait
LL | pub trait Trait {
| --------------- this is the found trait
= note: two types coming from two different versions of the same crate are different types even if they look the same
= help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `do_something`
--> replaced
|
LL | pub fn do_something<X: Trait>(_: X) {}
| ^^^^^ required by this bound in `do_something`
error[E0599]: no method named `foo` found for struct `dep_2_reexport::Type` in the current scope
--> replaced
|
LL | Type.foo();
| ^^^ method not found in `Type`
|
note: there are multiple different versions of crate `dependency` in the dependency graph
--> replaced
|
LL | pub trait Trait {
| ^^^^^^^^^^^^^^^ this is the trait that is needed
LL | fn foo(&self);
| -------------- the method is available for `dep_2_reexport::Type` here
|
::: replaced
|
LL | use dependency::{Trait, do_something};
| ----- `Trait` imported here doesn't correspond to the right version of crate `dependency`
|
::: replaced
|
LL | pub trait Trait {
| --------------- this is the trait that was imported
error[E0599]: no function or associated item named `bar` found for struct `dep_2_reexport::Type` in the current scope
--> replaced
|
LL | Type::bar();
| ^^^ function or associated item not found in `Type`
|
note: there are multiple different versions of crate `dependency` in the dependency graph
--> replaced
|
LL | pub trait Trait {
| ^^^^^^^^^^^^^^^ this is the trait that is needed
LL | fn foo(&self);
LL | fn bar();
| --------- the associated function is available for `dep_2_reexport::Type` here
|
::: replaced
|
LL | use dependency::{Trait, do_something};
| ----- `Trait` imported here doesn't correspond to the right version of crate `dependency`
|
::: replaced
|
LL | pub trait Trait {
| --------------- this is the trait that was imported
error[E0277]: the trait bound `OtherType: Trait` is not satisfied
--> replaced
|
LL | do_something(OtherType);
| ------------ ^^^^^^^^^ the trait `Trait` is not implemented for `OtherType`
| |
| required by a bound introduced by this call
|
note: there are multiple different versions of crate `dependency` in the dependency graph
--> replaced
|
LL | pub trait Trait {
| ^^^^^^^^^^^^^^^ this is the required trait
|
::: replaced
|
LL | extern crate dep_2_reexport;
| ---------------------------- one version of crate `dependency` is used here, as a dependency of crate `foo`
LL | extern crate dependency;
| ------------------------ one version of crate `dependency` is used here, as a direct dependency of the current crate
|
::: replaced
|
LL | pub struct OtherType;
| -------------------- this type doesn't implement the required trait
|
::: replaced
|
LL | pub trait Trait {
| --------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `do_something`
--> replaced
|
LL | pub fn do_something<X: Trait>(_: X) {}
| ^^^^^ required by this bound in `do_something`
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.
|