about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2015-06-23 19:38:40 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2015-06-23 19:48:13 +0200
commite52b94e259b7f416ec584164e6803dcbf038b200 (patch)
tree9e6992af36fb09a224eb6216b3b02a3daf4d4284
parent67c11b0146d875260ffd7d44184221e42c01186c (diff)
Replace example and message by @Manisheart proposition
-rw-r--r--src/librustc_typeck/diagnostics.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs
index 59c21f581ea..d660f92db5e 100644
--- a/src/librustc_typeck/diagnostics.rs
+++ b/src/librustc_typeck/diagnostics.rs
@@ -384,13 +384,15 @@ E0044: r##"
 You can't use type parameters on foreign items. Example of erroneous code:
 
 ```
-extern { fn some_func<T>(); }
+extern { fn some_func<T>(x: T); }
 ```
 
-Just remove the type parameter to make this code works:
+To fix this, replace the type parameter with the specializations that you
+need:
 
 ```
-extern { fn some_func(); }
+extern { fn some_func_i32(x: i32); }
+extern { fn some_func_i64(x: i64); }
 ```
 
 E0045: r##"
@@ -754,7 +756,7 @@ Example of erroneous code:
 enum Foo { f };
 
 let u = Foo::f { value: 0i32 }; // error: Foo:f isn't a structure!
-// or even more simple:
+// or even simpler:
 let u = t { random_field: 0i32 }; //error: t isn't a structure!
 ```
 
@@ -772,7 +774,7 @@ enum Foo {
 
 fn main() {
     let u = Foo::f(Inner { value: 0i32 });
-    // or even more simple:
+    // or even simpler:
     let t = Inner { value: 0i32 };
 }
 ```
@@ -1533,9 +1535,6 @@ For more information see the [opt-in builtin traits RFC](https://github.com/rust
 }
 
 register_diagnostics! {
-    E0034, // multiple applicable methods in scope
-    E0035, // does not take type parameters
-    E0036, // incorrect number of type parameters given for this method
     E0068,
     E0074,
     E0075,