1 An invalid number of arguments was given when calling a closure.
3 Erroneous code example:
7 let a = f(); // invalid, too few parameters
8 let b = f(4); // this works!
9 let c = f(2, 3); // invalid, too many parameters
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.
16 A generic function must be treated similarly:
19 fn foo<F: Fn()>(f: F) {
20 f(); // this is valid, but f(3) would not work