blob: 3a47710d508b55663f4ba3cc6ab3df9b3595a076 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
trait Foo<T> {
fn foo(self, f: impl FnOnce());
}
impl<T> Foo<T> for () {
fn foo(self, f: impl FnOnce()) {
f()
}
}
fn main() {
// FIXME: This should ideally use a fully qualified path
// without mentioning the generic arguments of `foo`.
().foo(|| ()) //~ ERROR type annotations needed
}
|