From d2e6ddabc4bdc041d2545896cfe4a642a9569664 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 1 Jul 2015 13:07:29 +0200 Subject: [PATCH] Add E0124 error explanation --- src/librustc_typeck/diagnostics.rs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 05ddfe89bcf5..e95145c3760e 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -1347,6 +1347,27 @@ static BAR: _ = "test"; // error, explicitly write out the type instead ``` "##, +E0124: r##" +You declared two fields of a struct with the same name. Erroneous code +example: + +``` +struct Foo { + field1: i32, + field1: i32 // error: field is already declared +} +``` + +Please check you didn't mispelled one field. Example: + +``` +struct Foo { + field1: i32, + field2: i32 // ok! +} +``` +"##, + E0131: r##" It is not possible to define `main` with type parameters, or even with function parameters. When `main` is present, it must take no arguments and return `()`. @@ -1956,7 +1977,6 @@ register_diagnostics! { E0120, E0122, E0123, - E0124, E0127, E0128, E0129,