]> git.lizzy.rs Git - rust.git/commitdiff
Replace example and message by @Manisheart proposition
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 23 Jun 2015 17:38:40 +0000 (19:38 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 23 Jun 2015 17:48:13 +0000 (19:48 +0200)
src/librustc_typeck/diagnostics.rs

index 59c21f581ea4d591ad2db7bc759c5aa74d145b0b..d660f92db5ee56ed15ca061a8dc7ae794ff9cd03 100644 (file)
@@ -384,13 +384,15 @@ fn main() {
 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 @@ fn some_func(x: &mut i32) {
 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 @@ impl Baz for Bar { } // Note: This is OK
 }
 
 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,