1 // This tests the extra note reported when a type error deals with
2 // seemingly identical types.
3 // The main use case of this error is when there are two crates
4 // (generally different versions of the same crate) with the same name
5 // causing a type mismatch.
7 // The test is nearly the same as the one in
8 // ui/type/type-mismatch-same-crate-name.rs
9 // but deals with the case where one of the crates
10 // is only introduced as an indirect dependency.
11 // and the type is accessed via a re-export.
12 // This is similar to how the error can be introduced
13 // when using cargo's automatic dependency resolution.
18 let foo2 = crateA::Foo;
19 let bar2 = crateA::bar();
22 crateB::try_foo(foo2);
23 crateB::try_bar(bar2);