Rollup merge of #72345 - GuillaumeGomez:cleanup-e0593, r=Dylan-DPC

Clean up E0593 explanation

r? @Dylan-DPC
This commit is contained in:
Ralf Jung 2020-05-22 16:58:29 +02:00 committed by GitHub
commit f7ed13b6a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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!
}
```