Skip to content

Commit 98cc6b1

Browse files
---
yaml --- r: 233886 b: refs/heads/beta c: 9259418 h: refs/heads/master v: v3
1 parent d36b4f7 commit 98cc6b1

File tree

2 files changed

+50
-23
lines changed

2 files changed

+50
-23
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 297b77d49b2961c682e11fafb975f27780ba5625
26+
refs/heads/beta: 9259418d26f3b9197efedf9aa01bbc3967bb9628
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustc_typeck/diagnostics.rs

Lines changed: 49 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3020,54 +3020,56 @@ parameters. You can read more about it in the API documentation:
30203020
https://doc.rust-lang.org/std/marker/struct.PhantomData.html
30213021
"##,
30223022

3023-
E0444: r##"
3024-
A platform-specific intrinsic function has wrong number of arguments.
3023+
E0442: r##"
3024+
Intrinsic argument(s) and/or return value have the wrong length.
30253025
Erroneous code example:
30263026
30273027
```
30283028
#[repr(simd)]
3029-
struct f64x2(f64, f64);
3029+
struct i8x16(i8, i8, i8, i8, i8, i8, i8, i8,
3030+
i8, i8, i8, i8, i8, i8, i8, i8);
3031+
#[repr(simd)]
3032+
struct i32x4(i32, i32, i32, i32);
3033+
#[repr(simd)]
3034+
struct i64x2(i64, i64);
30303035
30313036
extern "platform-intrinsic" {
3032-
fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32;
3033-
// error: platform-specific intrinsic has invalid number of arguments
3037+
fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
3038+
// error: intrinsic arguments/return value have wrong length
30343039
}
30353040
```
30363041
3037-
Please refer to the function declaration to see if it corresponds
3038-
with yours. Example:
3042+
To fix this error, please refer to the function declaration to give
3043+
it the awaited types with the awaited length. Example:
30393044
30403045
```
30413046
#[repr(simd)]
3042-
struct f64x2(f64, f64);
3047+
struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
30433048
30443049
extern "platform-intrinsic" {
3045-
fn x86_mm_movemask_pd(x: f64x2) -> i32; // ok!
3050+
fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i16x8; // ok!
30463051
}
30473052
```
30483053
"##,
30493054

3050-
E0442: r##"
3051-
Intrinsic argument(s) and/or return value have the wrong length.
3055+
E0443: r##"
3056+
Intrinsic argument(s) and/or return value have the wrong type.
30523057
Erroneous code example:
30533058
30543059
```
30553060
#[repr(simd)]
3056-
struct i8x16(i8, i8, i8, i8, i8, i8, i8, i8,
3057-
i8, i8, i8, i8, i8, i8, i8, i8);
3058-
#[repr(simd)]
3059-
struct i32x4(i32, i32, i32, i32);
3061+
struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
30603062
#[repr(simd)]
3061-
struct i64x2(i64, i64);
3063+
struct i64x8(i64, i64, i64, i64, i64, i64, i64, i64);
30623064
30633065
extern "platform-intrinsic" {
3064-
fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
3065-
// error: intrinsic arguments have wrong length
3066+
fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i64x8;
3067+
// error: intrinsic argument/return value has wrong type
30663068
}
30673069
```
30683070
30693071
To fix this error, please refer to the function declaration to give
3070-
it the awaited types with the awaited length. Example:
3072+
it the awaited types. Example:
30713073
30723074
```
30733075
#[repr(simd)]
@@ -3077,7 +3079,34 @@ extern "platform-intrinsic" {
30773079
fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i16x8; // ok!
30783080
}
30793081
```
3080-
"##
3082+
"##,
3083+
3084+
E0444: r##"
3085+
A platform-specific intrinsic function has wrong number of arguments.
3086+
Erroneous code example:
3087+
3088+
```
3089+
#[repr(simd)]
3090+
struct f64x2(f64, f64);
3091+
3092+
extern "platform-intrinsic" {
3093+
fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32;
3094+
// error: platform-specific intrinsic has invalid number of arguments
3095+
}
3096+
```
3097+
3098+
Please refer to the function declaration to see if it corresponds
3099+
with yours. Example:
3100+
3101+
```
3102+
#[repr(simd)]
3103+
struct f64x2(f64, f64);
3104+
3105+
extern "platform-intrinsic" {
3106+
fn x86_mm_movemask_pd(x: f64x2) -> i32; // ok!
3107+
}
3108+
```
3109+
"##,
30813110

30823111
}
30833112

@@ -3163,6 +3192,4 @@ register_diagnostics! {
31633192
E0439, // invalid `simd_shuffle`, needs length: `{}`
31643193
E0440, // platform-specific intrinsic has wrong number of type parameters
31653194
E0441, // unrecognized platform-specific intrinsic function
3166-
E0443, // intrinsic {} has wrong type: found `{}`, expected `{}` which
3167-
// was used for this vector type previously in this signature
31683195
}

0 commit comments

Comments
 (0)