error[E0308]: mismatched types --> $DIR/type-parameter-names.rs:5:5 | LL | fn foo(x: Foo) -> Bar { | --- expected `Bar` because of return type LL | x | ^ expected type parameter, found a different type parameter | = note: expected type `Bar` found type `Foo` error: aborting due to previous error For more information about this error, try `rustc --explain E0308`.