We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60d9c2c commit f798804Copy full SHA for f798804
src/librustc_error_codes/error_codes/E0057.md
@@ -1,8 +1,6 @@
1
-When invoking closures or other implementations of the function traits `Fn`,
2
-`FnMut` or `FnOnce` using call notation, the number of parameters passed to the
3
-function must match its definition.
+An invalid number of arguments was given when calling a closure.
4
5
-An example using a closure:
+Erroneous code example:
6
7
```compile_fail,E0057
8
let f = |x| x * 3;
@@ -11,6 +9,10 @@ let b = f(4); // this works!
11
9
let c = f(2, 3); // invalid, too many parameters
12
10
```
13
+When invoking closures or other implementations of the function traits `Fn`,
+`FnMut` or `FnOnce` using call notation, the number of parameters passed to the
14
+function must match its definition.
15
+
16
A generic function must be treated similarly:
17
18
0 commit comments