mirror of https://github.com/rust-lang/rust
24 lines
795 B
Plaintext
24 lines
795 B
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/fully-qualified-type-name2.rs:12:12
|
|
|
|
|
LL | fn bar(x: x::Foo) -> y::Foo {
|
|
| ------ expected `y::Foo` because of return type
|
|
LL | return x;
|
|
| ^ expected `y::Foo`, found `x::Foo`
|
|
|
|
|
= note: `x::Foo` and `y::Foo` have similar names, but are actually distinct types
|
|
note: `x::Foo` is defined in module `crate::x` of the current crate
|
|
--> $DIR/fully-qualified-type-name2.rs:4:5
|
|
|
|
|
LL | pub enum Foo { }
|
|
| ^^^^^^^^^^^^
|
|
note: `y::Foo` is defined in module `crate::y` of the current crate
|
|
--> $DIR/fully-qualified-type-name2.rs:8:5
|
|
|
|
|
LL | pub enum Foo { }
|
|
| ^^^^^^^^^^^^
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|