From 4840c13f1ae38a6d6b2c3068a7a066ea4af30b11 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 6 Aug 2015 15:21:25 +0200 Subject: [PATCH] Add E0415 error explanation --- src/librustc_resolve/diagnostics.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs index f656c289f84..5551837cdce 100644 --- a/src/librustc_resolve/diagnostics.rs +++ b/src/librustc_resolve/diagnostics.rs @@ -457,6 +457,22 @@ trait Foo { The goal here is to avoid a conflict of names. "##, +E0415: r##" +More than one parameter have the same name. Example of erroneous +code: + +``` +fn foo(f: i32, f: i32) {} // error: identifier `f` is bound more than + // once in this parameter list +``` + +Please verify you didn't misspell parameters' name. Example: + +``` +fn foo(f: i32, g: i32) {} // ok! +``` +"##, + E0417: r##" A static variable was referenced in a pattern. Example of erroneous code: @@ -780,7 +796,6 @@ impl Foo for i32 {} E0410, // variable from pattern is not bound in pattern 1 E0411, // use of `Self` outside of an impl or trait E0414, // only irrefutable patterns allowed here - E0415, // identifier is bound more than once in this parameter list E0416, // identifier is bound more than once in the same pattern E0418, // is not an enum variant, struct or const E0420, // is not an associated const