We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97f3eee commit 56c494aCopy full SHA for 56c494a
src/librustc_error_codes/error_codes/E0593.md
@@ -11,3 +11,14 @@ fn main() {
11
foo(|y| { });
12
}
13
```
14
+
15
+You have to provide the same number of arguments as expected by the `Fn`-based
16
+type. So to fix the previous example, we need to remove the `y` argument:
17
18
+```
19
+fn foo<F: Fn()>(x: F) { }
20
21
+fn main() {
22
+ foo(|| { }); // ok!
23
+}
24
0 commit comments