about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2015-08-28 16:21:56 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2015-09-01 01:22:43 +0200
commitdc70eca9a4e511e569b56a2c3cf40c46cd682a72 (patch)
treed335ca29113d9c1ac566cda2992760cdccc17fa2 /src
parent9259418d26f3b9197efedf9aa01bbc3967bb9628 (diff)
downloadrust-dc70eca9a4e511e569b56a2c3cf40c46cd682a72.tar.gz
rust-dc70eca9a4e511e569b56a2c3cf40c46cd682a72.zip
Add E0441 error explanation
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/diagnostics.rs29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs
index 1ec32bd3b1e..ba686b68027 100644
--- a/src/librustc_typeck/diagnostics.rs
+++ b/src/librustc_typeck/diagnostics.rs
@@ -3020,6 +3020,34 @@ parameters. You can read more about it in the API documentation:
 https://doc.rust-lang.org/std/marker/struct.PhantomData.html
 "##,
 
+E0441: r##"
+An unknown platform-specific intrinsic function was used. Erroneous
+code example:
+
+```
+#[repr(simd)]
+struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
+
+extern "platform-intrinsic" {
+    fn x86_mm_adds_ep16(x: i16x8, y: i16x8) -> i16x8;
+    // error: unrecognized platform-specific intrinsic function
+}
+```
+
+Please check you didn't misspell the function's name or that it is
+declared in the rust source code (in the file
+src/librustc_platform_intrinsics/x86.rs). Example:
+
+```
+#[repr(simd)]
+struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
+
+extern "platform-intrinsic" {
+    fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i16x8; // ok!
+}
+```
+"##,
+
 E0442: r##"
 Intrinsic argument(s) and/or return value have the wrong length.
 Erroneous code example:
@@ -3191,5 +3219,4 @@ register_diagnostics! {
     E0436,  // functional record update requires a struct
     E0439, // invalid `simd_shuffle`, needs length: `{}`
     E0440, // platform-specific intrinsic has wrong number of type parameters
-    E0441, // unrecognized platform-specific intrinsic function
 }