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: perhaps two different versions of crate `crate_a1` are being used?
10 note: function defined here
11 --> $DIR/auxiliary/crate_a1.rs:10:8
13 LL | pub fn try_foo(x: Foo){}
16 error[E0308]: mismatched types
17 --> $DIR/type-mismatch-same-crate-name.rs:20:20
19 LL | a::try_bar(bar2);
20 | ---------- ^^^^ expected trait `main::a::Bar`, found a different trait `main::a::Bar`
22 | arguments to this function are incorrect
24 = note: expected struct `Box<(dyn main::a::Bar + 'static)>`
25 found struct `Box<dyn main::a::Bar>`
26 = note: perhaps two different versions of crate `crate_a1` are being used?
27 note: function defined here
28 --> $DIR/auxiliary/crate_a1.rs:11:8
30 LL | pub fn try_bar(x: Box<Bar>){}
33 error: aborting due to 2 previous errors
35 For more information about this error, try `rustc --explain E0308`.