blob: 4eb33497c39560cb4ec86d0aa16fb2df740caeec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
trait Foo {}
impl<T: Fn(&())> Foo for T {}
fn baz<T: Foo>(_: T) {}
fn main() {
baz(|_| ());
//~^ ERROR implementation of `FnOnce` is not general enough
//~| ERROR mismatched types
baz(|x| ());
//~^ ERROR implementation of `FnOnce` is not general enough
//~| ERROR mismatched types
}
|