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 = note: expected struct `main::a::Foo` (struct `main::a::Foo`)
8 found struct `main::a::Foo` (struct `main::a::Foo`)
9 note: Perhaps two different versions of crate `crate_a1` are being used?
10 --> $DIR/type-mismatch-same-crate-name.rs:16:20
12 LL | a::try_foo(foo2);
15 error[E0308]: mismatched types
16 --> $DIR/type-mismatch-same-crate-name.rs:22:20
18 LL | a::try_bar(bar2);
19 | ^^^^ expected trait `main::a::Bar`, found a different trait `main::a::Bar`
21 = note: expected struct `std::boxed::Box<(dyn main::a::Bar + 'static)>`
22 found struct `std::boxed::Box<dyn main::a::Bar>`
23 note: Perhaps two different versions of crate `crate_a1` are being used?
24 --> $DIR/type-mismatch-same-crate-name.rs:22:20
26 LL | a::try_bar(bar2);
29 error: aborting due to 2 previous errors
31 For more information about this error, try `rustc --explain E0308`.