]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/closure-mismatch.rs
Rollup merge of #89945 - JohnTitor:we-now-specialize-clone-from-slice, r=the8472
[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 mismatched types
9 }