]> git.lizzy.rs Git - rust.git/commitdiff
Add E0094 error explanation
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 30 Jun 2015 08:44:20 +0000 (10:44 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 30 Jun 2015 17:21:22 +0000 (19:21 +0200)
src/librustc_typeck/diagnostics.rs

index 57fbd52f71f4e3601d41c1a8b49ff934cc56ae0c..4d3d18cb16c0272387c8d574ffd0695b42a67d2c 100644 (file)
@@ -1029,7 +1029,7 @@ fn main() {
 #![feature(intrinsics)]
 
 extern "rust-intrinsic" {
-    fn foo();
+    fn foo(); // error: unrecognized intrinsic function: `foo`
 }
 
 fn main() {
@@ -1047,7 +1047,7 @@ fn main() {
 #![feature(intrinsics)]
 
 extern "rust-intrinsic" {
-    fn atomic_fence();
+    fn atomic_fence(); // ok!
 }
 
 fn main() {
@@ -1058,6 +1058,31 @@ fn main() {
 ```
 "##,
 
+E0094: r##"
+You gave an invalid number of type parameters to an intrinsic function.
+Erroneous code example:
+
+```
+#![feature(intrinsics)]
+
+extern "rust-intrinsic" {
+    fn size_of<T, U>() -> usize; // error: intrinsic has wrong number
+                                 //        of type parameters
+}
+```
+
+Please check you give the right number of lifetime parameters and/or the
+function definition. Example:
+
+```
+#![feature(intrinsics)]
+
+extern "rust-intrinsic" {
+    fn size_of<T>() -> usize; // ok!
+}
+```
+"##,
+
 E0106: r##"
 This error indicates that a lifetime is missing from a type. If it is an error
 inside a function signature, the problem may be with failing to adhere to the
@@ -1724,7 +1749,6 @@ impl Baz for Bar { } // Note: This is OK
     E0086,
     E0090,
     E0092,
-    E0094,
     E0101,
     E0102,
     E0103,