Rollup merge of #59201 - lambda:remove-repr-simd-isize-usize-restriction, r=alexcrichton

Remove restriction on isize/usize in repr(simd)

As discussed in #55078, there's no known reason for this restriction.

It's unlikely that repr(simd) will be stabilized in its current form, but
might as well remove some restrictions on it.

This removes the branch in `is_machine` which returns false for these types.
`is_machine` is only used for the repr(simd) type validation check.
This commit is contained in:
kennytm 2019-03-16 14:57:01 +08:00
commit 524a7afcf2
No known key found for this signature in database
GPG key ID: FEF6C8051D0E013C
4 changed files with 34 additions and 12 deletions

View file

@ -7,7 +7,4 @@ struct empty; //~ ERROR SIMD vector cannot be empty
#[repr(simd)]
struct i64f64(i64, f64); //~ ERROR SIMD vector should be homogeneous
#[repr(simd)]
struct int4(isize, isize, isize, isize); //~ ERROR SIMD vector element type should be machine type
fn main() {}

View file

@ -10,13 +10,7 @@ error[E0076]: SIMD vector should be homogeneous
LL | struct i64f64(i64, f64);
| ^^^^^^^^^^^^^^^^^^^^^^^^ SIMD elements must have the same type
error[E0077]: SIMD vector element type should be machine type
--> $DIR/simd-type.rs:11:1
|
LL | struct int4(isize, isize, isize, isize);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
error: aborting due to 3 previous errors
Some errors occurred: E0075, E0076, E0077.
Some errors occurred: E0075, E0076.
For more information about an error, try `rustc --explain E0075`.