]> git.lizzy.rs Git - rust.git/commitdiff
Add E0044 error code explanation
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 19 Jun 2015 13:49:08 +0000 (15:49 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 23 Jun 2015 17:34:07 +0000 (19:34 +0200)
src/librustc_typeck/diagnostics.rs

index 16af8c6961ef67c45c615dbd9b55f897db54b9c3..59ddbc4f210d28aec1bb0351983c24ffdbf97b39 100644 (file)
@@ -380,6 +380,19 @@ fn main() {
 ```
 "##,
 
+E0044: r##"
+You can't use type parameters on foreign items. Example of erroneous code:
+
+```
+extern { fn some_func<T>(); }
+```
+
+Just remove the type parameter to make this code works:
+
+```
+extern { fn some_func(); }
+```
+
 E0045: r##"
 Rust only supports variadic parameters for interoperability with C code in its
 FFI. As such, variadic parameters can only be used with functions which are
@@ -1488,7 +1501,9 @@ impl Baz for Bar { } // Note: This is OK
 }
 
 register_diagnostics! {
-    E0044, // foreign items may not have type parameters
+    E0034, // multiple applicable methods in scope
+    E0035, // does not take type parameters
+    E0036, // incorrect number of type parameters given for this method
     E0068,
     E0071,
     E0074,