]> git.lizzy.rs Git - rust.git/blob - tests/ui/type/type-mismatch-same-crate-name.stderr
Make `output_filenames` a real query
[rust.git] / tests / ui / type / type-mismatch-same-crate-name.stderr
1 error[E0308]: mismatched types
2   --> $DIR/type-mismatch-same-crate-name.rs:16:20
3    |
4 LL |         a::try_foo(foo2);
5    |         ---------- ^^^^ expected struct `main::a::Foo`, found a different struct `main::a::Foo`
6    |         |
7    |         arguments to this function are incorrect
8    |
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
12    |
13 LL | pub struct Foo;
14    | ^^^^^^^^^^^^^^
15 note: struct `main::a::Foo` is defined in crate `crate_a1`
16   --> $DIR/auxiliary/crate_a1.rs:1:1
17    |
18 LL | pub struct Foo;
19    | ^^^^^^^^^^^^^^
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
23    |
24 LL | pub fn try_foo(x: Foo){}
25    |        ^^^^^^^
26
27 error[E0308]: mismatched types
28   --> $DIR/type-mismatch-same-crate-name.rs:20:20
29    |
30 LL |         a::try_bar(bar2);
31    |         ---------- ^^^^ expected trait `main::a::Bar`, found a different trait `main::a::Bar`
32    |         |
33    |         arguments to this function are incorrect
34    |
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
40    |
41 LL | pub fn try_bar(x: Box<Bar>){}
42    |        ^^^^^^^
43
44 error: aborting due to 2 previous errors
45
46 For more information about this error, try `rustc --explain E0308`.