Fix UI errors

This commit is contained in:
Erin Power 2021-03-02 12:18:46 +01:00
parent 79c5fa1f0c
commit 5f344a2883
5 changed files with 3 additions and 18 deletions

View File

@ -1161,15 +1161,6 @@ pub fn check_simd(tcx: TyCtxt<'_>, sp: Span, def_id: LocalDefId) {
if len == 0 {
struct_span_err!(tcx.sess, sp, E0075, "SIMD vector cannot be empty").emit();
return;
} else if !len.is_power_of_two() {
struct_span_err!(
tcx.sess,
sp,
E0075,
"SIMD vector length must be a power of two"
)
.emit();
return;
} else if len > MAX_SIMD_LANES {
struct_span_err!(
tcx.sess,

View File

@ -1,9 +1,7 @@
// build-fail
// run-pass
#![feature(repr_simd, platform_intrinsics)]
// error-pattern:monomorphising SIMD type `Simd<3_usize>` of non-power-of-two length
#[repr(simd)]
struct Simd<const N: usize>([f32; N]);

View File

@ -1,4 +0,0 @@
error: monomorphising SIMD type `Simd<3_usize>` of non-power-of-two length
error: aborting due to previous error

View File

@ -10,7 +10,7 @@ struct empty; //~ ERROR SIMD vector cannot be empty
struct empty2([f32; 0]); //~ ERROR SIMD vector cannot be empty
#[repr(simd)]
struct pow2([f32; 7]); //~ ERROR SIMD vector length must be a power of two
struct pow2([f32; 7]);
#[repr(simd)]
struct i64f64(i64, f64); //~ ERROR SIMD vector should be homogeneous

View File

@ -34,7 +34,7 @@ error[E0075]: SIMD vector cannot have more than 32768 elements
LL | struct TooBig([f32; 65536]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 7 previous errors
error: aborting due to 6 previous errors
Some errors have detailed explanations: E0075, E0076, E0077.
For more information about an error, try `rustc --explain E0075`.