Skip to content

Commit

Permalink
Clean up E0593 explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed May 19, 2020
1 parent 97f3eee commit 56c494a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/librustc_error_codes/error_codes/E0593.md
Expand Up @@ -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!
}
```

0 comments on commit 56c494a

Please sign in to comment.