about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRyan Senior <ryan.senior@puppetlabs.com>2016-10-17 22:25:08 -0500
committerRyan Senior <ryan.senior@puppetlabs.com>2016-10-21 07:23:41 -0500
commite7d01cfe02f2f0348bce7bbd8b11efc63123bbf5 (patch)
tree34471900e6968df72bc3184a7367056498c28ddb /src
parent5402271ceb072f2271e4dc9715c31dcfb525c51f (diff)
downloadrust-e7d01cfe02f2f0348bce7bbd8b11efc63123bbf5.tar.gz
rust-e7d01cfe02f2f0348bce7bbd8b11efc63123bbf5.zip
Add an error explaination for E0230
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/diagnostics.rs25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs
index 946e9add2b7..8e8a74ce7d7 100644
--- a/src/librustc_typeck/diagnostics.rs
+++ b/src/librustc_typeck/diagnostics.rs
@@ -2791,6 +2791,30 @@ fn main() {
 ```
 "##,
 
+E0230: r##"
+The trait has more type parameters specified than appear in its definition.
+
+Erroneous example code:
+
+```compile_fail,E0230
+#![feature(on_unimplemented)]
+#[rustc_on_unimplemented = "Trait error on `{Self}` with `<{A},{B},{C}>`"]
+// error: there is no type parameter C on trait TraitWithThreeParams
+trait TraitWithThreeParams<A,B>
+{}
+```
+
+Include the correct number of type parameters and the compilation should
+proceed:
+
+```
+#![feature(on_unimplemented)]
+#[rustc_on_unimplemented = "Trait error on `{Self}` with `<{A},{B},{C}>`"]
+trait TraitWithThreeParams<A,B,C> // ok!
+{}
+```
+"##,
+
 E0232: r##"
 The attribute must have a value. Erroneous code example:
 
@@ -4116,7 +4140,6 @@ register_diagnostics! {
     E0226, // only a single explicit lifetime bound is permitted
     E0227, // ambiguous lifetime bound, explicit lifetime bound required
     E0228, // explicit lifetime bound required
-    E0230, // there is no type parameter on trait
     E0231, // only named substitution parameters are allowed
 //  E0233,
 //  E0234,