File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/librustc_error_codes/error_codes Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 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.
1+ An invalid number of arguments was given when calling a closure.
42
5- An example using a closure :
3+ Erroneous code example :
64
75``` compile_fail,E0057
86let f = |x| x * 3;
@@ -11,6 +9,10 @@ let b = f(4); // this works!
119let c = f(2, 3); // invalid, too many parameters
1210```
1311
12+ When invoking closures or other implementations of the function traits ` Fn ` ,
13+ ` FnMut ` or ` FnOnce ` using call notation, the number of parameters passed to the
14+ function must match its definition.
15+
1416A generic function must be treated similarly:
1517
1618```
You can’t perform that action at this time.
0 commit comments