]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/closure-mismatch.rs
40a4641fe719602f3991dc7a49478f3d5dfafc54
[rust.git] / src / test / ui / mismatched_types / closure-mismatch.rs
1 trait Foo {}
2
3 impl<T: Fn(&())> Foo for T {}
4
5 fn baz<T: Foo>(_: T) {}
6
7 fn main() {
8     baz(|_| ()); //~ ERROR type mismatch
9     //~^ ERROR type mismatch
10 }