Clean up E0593 explanation

This commit is contained in:
Guillaume Gomez 2020-05-19 13:20:33 +02:00
parent 97f3eeec82
commit 56c494a148

View File

@ -11,3 +11,14 @@ fn main() {
foo(|y| { });
}
```
You have to provide the same number of arguments as expected by the `Fn`-based
type. So to fix the previous example, we need to remove the `y` argument:
```
fn foo<F: Fn()>(x: F) { }
fn main() {
foo(|| { }); // ok!
}
```