]> git.lizzy.rs Git - rust.git/blob - tests/ui/fully-qualified-type/fully-qualified-type-name2.stderr
Rollup merge of #106715 - BoxyUwU:new_solver_triagebot, r=lcnr
[rust.git] / tests / ui / fully-qualified-type / fully-qualified-type-name2.stderr
1 error[E0308]: mismatched types
2   --> $DIR/fully-qualified-type-name2.rs:12:12
3    |
4 LL | fn bar(x: x::Foo) -> y::Foo {
5    |                      ------ expected `y::Foo` because of return type
6 LL |     return x;
7    |            ^ expected enum `y::Foo`, found enum `x::Foo`
8    |
9    = note: enum `x::Foo` and enum `y::Foo` have similar names, but are actually distinct types
10 note: enum `x::Foo` is defined in module `crate::x` of the current crate
11   --> $DIR/fully-qualified-type-name2.rs:4:5
12    |
13 LL |     pub enum Foo { }
14    |     ^^^^^^^^^^^^
15 note: enum `y::Foo` is defined in module `crate::y` of the current crate
16   --> $DIR/fully-qualified-type-name2.rs:8:5
17    |
18 LL |     pub enum Foo { }
19    |     ^^^^^^^^^^^^
20
21 error: aborting due to previous error
22
23 For more information about this error, try `rustc --explain E0308`.