"##,
E0411: r##"
-`Self` keyword was used outside an impl or a trait. Erroneous code
-example:
+The `Self` keyword was used outside an impl or a trait. Erroneous
+code example:
```
<Self>::foo; // error: use of `Self` outside of an impl or trait
```
The `Self` keyword represents the current type, which explains why it
-can only be used inside an impl or a trait. It gives access to
+can only be used inside an impl or a trait. It gives access to the
associated items of a type:
```
}
```
-It can be solved by specifying from which trait we want to use the
-`Bar` type:
+This problem can be solved by specifying from which trait we want
+to use the `Bar` type:
```
trait Baz : Foo + Foo2 {
}
register_diagnostics! {
-// E0153,
-// E0157,
+// E0153, unused error code
+// E0157, unused error code
E0254, // import conflicts with imported crate in this module
E0257,
E0258,
https://doc.rust-lang.org/std/marker/struct.PhantomData.html
"##,
+E0439: r##"
+The length of the platform-intrinsic function `simd_shuffle`
+wasn't specified. Erroneous code example:
+
+```
+extern "platform-intrinsic" {
+ fn simd_shuffle<A,B>(a: A, b: A, c: [u32; 8]) -> B;
+ // error: invalid `simd_shuffle`, needs length: `simd_shuffle`
+}
+```
+
+The `simd_shuffle` function needs the length of the array passed as
+last parameter in its name. Example:
+
+```
+extern "platform-intrinsic" {
+ fn simd_shuffle8<A,B>(a: A, b: A, c: [u32; 8]) -> B;
+}
+```
+"##,
+
E0440: r##"
-A platform-specific intrinsic function has wrong number of type
+A platform-specific intrinsic function has the wrong number of type
parameters. Erroneous code example:
```
}
```
-Please check you didn't misspell the function's name or that it is
-declared in the rust source code (in the file
+Please verify that the function name wasn't misspelled, and ensure
+that it is declared in the rust source code (in the file
src/librustc_platform_intrinsics/x86.rs). Example:
```
"##,
E0442: r##"
-Intrinsic argument(s) and/or return value have the wrong length.
+Intrinsic argument(s) and/or return value have the wrong type.
Erroneous code example:
```
extern "platform-intrinsic" {
fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
- // error: intrinsic arguments/return value have wrong length
+ // error: intrinsic arguments/return value have wrong type
}
```
To fix this error, please refer to the function declaration to give
-it the awaited types with the awaited length. Example:
+it the awaited types. Example:
```
#[repr(simd)]
E0399, // trait items need to be implemented because the associated
// type `{}` was overridden
E0436, // functional record update requires a struct
- E0439, // invalid `simd_shuffle`, needs length: `{}`
}