rust/tests/ui/fn/param-mismatch-trait-fn.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
161 B
Rust
Raw Normal View History

trait Foo {
fn same_type<T>(_: T, _: T);
}
fn f<T: Foo, X, Y>(x: X, y: Y) {
T::same_type([x], Some(y));
//~^ ERROR mismatched types
}
fn main() {}