]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/closure-mismatch.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / 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(|_| ());
9     //~^ ERROR implementation of `FnOnce` is not general enough
10     //~| ERROR mismatched types
11 }