You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.assert_stderr_contains(r#"error[E0277]: the trait bound `dep_2_reexport::Type: Trait` is not satisfied because the trait comes from a different crate version
22
-
--> multiple-dep-versions.rs:7:18
23
-
|
24
-
7 | do_something(Type);
25
-
| ^^^^ the trait `Trait` is not implemented for `dep_2_reexport::Type`
26
-
|
21
+
.assert_stderr_contains(r#"error[E0277]: the trait bound `dep_2_reexport::Type: Trait` is not satisfied
22
+
--> multiple-dep-versions.rs:7:18
23
+
|
24
+
7 | do_something(Type);
25
+
| ------------ ^^^^ the trait `Trait` is not implemented for `dep_2_reexport::Type`
26
+
| |
27
+
| required by a bound introduced by this call
28
+
|
27
29
note: there are multiple different versions of crate `dependency` in the dependency graph"#)
28
30
.assert_stderr_contains(r#"
29
-
3 | pub struct Type(pub i32);
30
-
| --------------- this type implements the required trait
31
-
4 | pub trait Trait {
32
-
| ^^^^^^^^^^^^^^^ this is the required trait
31
+
3 | pub struct Type(pub i32);
32
+
| --------------- this type implements the required trait
33
+
4 | pub trait Trait {
34
+
| ^^^^^^^^^^^^^^^ this is the required trait
33
35
"#)
34
36
.assert_stderr_contains(r#"
35
-
1 | extern crate dep_2_reexport;
36
-
| ---------------------------- one version of crate `dependency` is used here, as a dependency of crate `foo`
37
-
2 | extern crate dependency;
38
-
| ------------------------ one version of crate `dependency` is used here, as a direct dependency of the current crate"#)
37
+
1 | extern crate dep_2_reexport;
38
+
| ---------------------------- one version of crate `dependency` is used here, as a dependency of crate `foo`
39
+
2 | extern crate dependency;
40
+
| ------------------------ one version of crate `dependency` is used here, as a direct dependency of the current crate"#)
39
41
.assert_stderr_contains(r#"
40
-
3 | pub struct Type;
41
-
| --------------- this type doesn't implement the required trait
42
-
4 | pub trait Trait {
43
-
| --------------- this is the found trait
44
-
= note: two types coming from two different versions of the same crate are different types even if they look the same
45
-
= help: you can use `cargo tree` to explore your dependency tree"#)
42
+
3 | pub struct Type;
43
+
| --------------- this type doesn't implement the required trait
44
+
4 | pub trait Trait {
45
+
| --------------- this is the found trait
46
+
= note: two types coming from two different versions of the same crate are different types even if they look the same
47
+
= help: you can use `cargo tree` to explore your dependency tree"#)
48
+
.assert_stderr_contains(r#"note: required by a bound in `do_something`"#)
49
+
.assert_stderr_contains(r#"
50
+
12 | pub fn do_something<X: Trait>(_: X) {}
51
+
| ^^^^^ required by this bound in `do_something`"#)
46
52
.assert_stderr_contains(r#"error[E0599]: no method named `foo` found for struct `dep_2_reexport::Type` in the current scope
0 commit comments