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 enum `y::Foo`, found enum `x::Foo` error: aborting due to previous error For more information about this error, try `rustc --explain E0308`.