Fix UI errors
This commit is contained in:
parent
79c5fa1f0c
commit
5f344a2883
5 changed files with 3 additions and 18 deletions
|
@ -1161,15 +1161,6 @@ pub fn check_simd(tcx: TyCtxt<'_>, sp: Span, def_id: LocalDefId) {
|
||||||
if len == 0 {
|
if len == 0 {
|
||||||
struct_span_err!(tcx.sess, sp, E0075, "SIMD vector cannot be empty").emit();
|
struct_span_err!(tcx.sess, sp, E0075, "SIMD vector cannot be empty").emit();
|
||||||
return;
|
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 {
|
} else if len > MAX_SIMD_LANES {
|
||||||
struct_span_err!(
|
struct_span_err!(
|
||||||
tcx.sess,
|
tcx.sess,
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
// build-fail
|
// run-pass
|
||||||
|
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, platform_intrinsics)]
|
||||||
|
|
||||||
// error-pattern:monomorphising SIMD type `Simd<3_usize>` of non-power-of-two length
|
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
struct Simd<const N: usize>([f32; N]);
|
struct Simd<const N: usize>([f32; N]);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
error: monomorphising SIMD type `Simd<3_usize>` of non-power-of-two length
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ struct empty; //~ ERROR SIMD vector cannot be empty
|
||||||
struct empty2([f32; 0]); //~ ERROR SIMD vector cannot be empty
|
struct empty2([f32; 0]); //~ ERROR SIMD vector cannot be empty
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
struct pow2([f32; 7]); //~ ERROR SIMD vector length must be a power of two
|
struct pow2([f32; 7]);
|
||||||
|
|
||||||
#[repr(simd)]
|
#[repr(simd)]
|
||||||
struct i64f64(i64, f64); //~ ERROR SIMD vector should be homogeneous
|
struct i64f64(i64, f64); //~ ERROR SIMD vector should be homogeneous
|
||||||
|
|
|
@ -34,7 +34,7 @@ error[E0075]: SIMD vector cannot have more than 32768 elements
|
||||||
LL | struct TooBig([f32; 65536]);
|
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.
|
Some errors have detailed explanations: E0075, E0076, E0077.
|
||||||
For more information about an error, try `rustc --explain E0075`.
|
For more information about an error, try `rustc --explain E0075`.
|
||||||
|
|
Loading…
Add table
Reference in a new issue