From 87f0237d01936d291fc0f6499aff32726f0f6cb1 Mon Sep 17 00:00:00 2001 From: Nick Hamann Date: Thu, 7 May 2015 18:41:33 -0500 Subject: [PATCH 1/3] Add long diagnostics for E0062 and E0063 --- src/librustc_typeck/diagnostics.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index f00f0eea1f48d..cf229e5802729 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -34,6 +34,16 @@ let x_is_nonzero = x as bool; ``` "##, +E0062: r##" +This error indicates that during an attempt to build a struct or struct-like +enum variant, one of the fields was specified more than once. +"##, + +E0063: r##" +This error indicates that during an attempt to build a struct or struct-like +enum variant, one of the fields was not provided. +"##, + E0081: r##" Enum discriminants are used to differentiate enum variants stored in memory. This error indicates that the same value was used for two or more variants, @@ -136,8 +146,6 @@ register_diagnostics! { E0059, E0060, E0061, - E0062, - E0063, E0066, E0067, E0068, From f736468c06b7c2dfc30ab72741aa2c63385bf2f0 Mon Sep 17 00:00:00 2001 From: Nick Hamann Date: Thu, 7 May 2015 19:00:56 -0500 Subject: [PATCH 2/3] Add long diagnostic for E0137 --- src/librustc/diagnostics.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs index ad37cc254d1bc..aaf615ee40409 100644 --- a/src/librustc/diagnostics.rs +++ b/src/librustc/diagnostics.rs @@ -271,6 +271,12 @@ fn main() { See also http://doc.rust-lang.org/book/unsafe.html "##, +E0137: r##" +This error indicates that the compiler found multiple functions with the +#[main] attribute. This is an error because there must be a unique entry point +into a Rust program. +"##, + E0152: r##" Lang items are already implemented in the standard library. Unless you are writing a free-standing application (e.g. a kernel), you do not need to provide @@ -800,7 +806,6 @@ register_diagnostics! { E0134, E0135, E0136, - E0137, E0138, E0139, E0261, // use of undeclared lifetime name From df64e05426d894241398b941f89001e81fd1521b Mon Sep 17 00:00:00 2001 From: Nick Hamann Date: Fri, 8 May 2015 13:13:43 -0500 Subject: [PATCH 3/3] Change E0062 and E0063 to say each field should be specified once. --- src/librustc_typeck/diagnostics.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index cf229e5802729..0e6386618f17b 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -36,12 +36,14 @@ let x_is_nonzero = x as bool; E0062: r##" This error indicates that during an attempt to build a struct or struct-like -enum variant, one of the fields was specified more than once. +enum variant, one of the fields was specified more than once. Each field should +be specified exactly one time. "##, E0063: r##" This error indicates that during an attempt to build a struct or struct-like -enum variant, one of the fields was not provided. +enum variant, one of the fields was not provided. Each field should be specified +exactly once. "##, E0081: r##"