Clean up E0593 explanation
This commit is contained in:
parent
97f3eeec82
commit
56c494a148
@ -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!
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user