diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-05-19 13:20:33 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-05-19 13:20:33 +0200 |
| commit | 56c494a1487e7fdea07c641e5a182cffba1d15c0 (patch) | |
| tree | 639d384893ce15e5a8a0dbf61ab471447711a67c /src/librustc_error_codes/error_codes | |
| parent | 97f3eeec8216d7155c24674b9be55e7c672bcae3 (diff) | |
| download | rust-56c494a1487e7fdea07c641e5a182cffba1d15c0.tar.gz rust-56c494a1487e7fdea07c641e5a182cffba1d15c0.zip | |
Clean up E0593 explanation
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0593.md | 11 |
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! +} +``` |
