Skip to content

Commit

Permalink
Fix UI errors
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky committed Mar 2, 2021
1 parent 79c5fa1 commit 5f344a2
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 18 deletions.
9 changes: 0 additions & 9 deletions compiler/rustc_typeck/src/check/check.rs
Expand Up @@ -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,
Expand Down
@@ -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]);

Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion src/test/ui/simd/simd-type.rs
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/simd/simd-type.stderr
Expand Up @@ -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`.

0 comments on commit 5f344a2

Please sign in to comment.