about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_error_codes/error_codes/E0593.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/librustc_error_codes/error_codes/E0593.md b/src/librustc_error_codes/error_codes/E0593.md
index b32923a9e5f..1902d73f4d0 100644
--- a/src/librustc_error_codes/error_codes/E0593.md
+++ b/src/librustc_error_codes/error_codes/E0593.md
@@ -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!
+}
+```