1 error[E0308]: mismatched types
2 --> $DIR/type-mismatch-same-crate-name.rs:16:20
5 | ---------- ^^^^ expected struct `main::a::Foo`, found a different struct `main::a::Foo`
7 | arguments to this function are incorrect
9 = note: struct `main::a::Foo` and struct `main::a::Foo` have similar names, but are actually distinct types
10 note: struct `main::a::Foo` is defined in crate `crate_a2`
11 --> $DIR/auxiliary/crate_a2.rs:1:1
15 note: struct `main::a::Foo` is defined in crate `crate_a1`
16 --> $DIR/auxiliary/crate_a1.rs:1:1
20 = note: perhaps two different versions of crate `crate_a1` are being used?
21 note: function defined here
22 --> $DIR/auxiliary/crate_a1.rs:10:8
24 LL | pub fn try_foo(x: Foo){}
27 error[E0308]: mismatched types
28 --> $DIR/type-mismatch-same-crate-name.rs:20:20
30 LL | a::try_bar(bar2);
31 | ---------- ^^^^ expected trait `main::a::Bar`, found a different trait `main::a::Bar`
33 | arguments to this function are incorrect
35 = note: expected struct `Box<(dyn main::a::Bar + 'static)>`
36 found struct `Box<dyn main::a::Bar>`
37 = note: perhaps two different versions of crate `crate_a1` are being used?
38 note: function defined here
39 --> $DIR/auxiliary/crate_a1.rs:11:8
41 LL | pub fn try_bar(x: Box<Bar>){}
44 error: aborting due to 2 previous errors
46 For more information about this error, try `rustc --explain E0308`.