From d202b595065b9f20c07d3abc72c47f506f4491f0 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 2 Jan 2020 19:57:19 +0100 Subject: [PATCH 1/2] Clean up E0130 error explanation --- src/librustc_error_codes/error_codes/E0130.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc_error_codes/error_codes/E0130.md b/src/librustc_error_codes/error_codes/E0130.md index 5273f3ad14f46..539049edb33b7 100644 --- a/src/librustc_error_codes/error_codes/E0130.md +++ b/src/librustc_error_codes/error_codes/E0130.md @@ -1,4 +1,4 @@ -You declared a pattern as an argument in a foreign function declaration. +A pattern was declared as an argument in a foreign function declaration. Erroneous code example: @@ -9,7 +9,7 @@ extern { } ``` -Please replace the pattern argument with a regular one. Example: +To fix this error, replace the pattern argument with a regular one. Example: ``` struct SomeStruct { From 8341a9a8f770ad2cf4390446c5da1e590acfc14e Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 2 Jan 2020 19:57:25 +0100 Subject: [PATCH 2/2] Clean up E0131 error explanation --- src/librustc_error_codes/error_codes/E0131.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/librustc_error_codes/error_codes/E0131.md b/src/librustc_error_codes/error_codes/E0131.md index a70a02925b0fb..ed798d4f881a3 100644 --- a/src/librustc_error_codes/error_codes/E0131.md +++ b/src/librustc_error_codes/error_codes/E0131.md @@ -1,8 +1,11 @@ -It is not possible to define `main` with generic parameters. -When `main` is present, it must take no arguments and return `()`. +The `main` function was defined with generic parameters. + Erroneous code example: ```compile_fail,E0131 fn main() { // error: main function is not allowed to have generic parameters } ``` + +It is not possible to define the `main` function with generic parameters. +It must not take any arguments.