Skip to content

Commit 5f344a2

Browse files
committed
Fix UI errors
1 parent 79c5fa1 commit 5f344a2

File tree

5 files changed

+3
-18
lines changed

5 files changed

+3
-18
lines changed

compiler/rustc_typeck/src/check/check.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,15 +1161,6 @@ pub fn check_simd(tcx: TyCtxt<'_>, sp: Span, def_id: LocalDefId) {
11611161
if len == 0 {
11621162
struct_span_err!(tcx.sess, sp, E0075, "SIMD vector cannot be empty").emit();
11631163
return;
1164-
} else if !len.is_power_of_two() {
1165-
struct_span_err!(
1166-
tcx.sess,
1167-
sp,
1168-
E0075,
1169-
"SIMD vector length must be a power of two"
1170-
)
1171-
.emit();
1172-
return;
11731164
} else if len > MAX_SIMD_LANES {
11741165
struct_span_err!(
11751166
tcx.sess,

src/test/ui/simd/simd-type-generic-monomorphisation-power-of-two.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
// build-fail
1+
// run-pass
22

33
#![feature(repr_simd, platform_intrinsics)]
44

5-
// error-pattern:monomorphising SIMD type `Simd<3_usize>` of non-power-of-two length
6-
75
#[repr(simd)]
86
struct Simd<const N: usize>([f32; N]);
97

src/test/ui/simd/simd-type-generic-monomorphisation-power-of-two.stderr

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/test/ui/simd/simd-type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ struct empty; //~ ERROR SIMD vector cannot be empty
1010
struct empty2([f32; 0]); //~ ERROR SIMD vector cannot be empty
1111

1212
#[repr(simd)]
13-
struct pow2([f32; 7]); //~ ERROR SIMD vector length must be a power of two
13+
struct pow2([f32; 7]);
1414

1515
#[repr(simd)]
1616
struct i64f64(i64, f64); //~ ERROR SIMD vector should be homogeneous

src/test/ui/simd/simd-type.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ error[E0075]: SIMD vector cannot have more than 32768 elements
3434
LL | struct TooBig([f32; 65536]);
3535
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3636

37-
error: aborting due to 7 previous errors
37+
error: aborting due to 6 previous errors
3838

3939
Some errors have detailed explanations: E0075, E0076, E0077.
4040
For more information about an error, try `rustc --explain E0075`.

0 commit comments

Comments
 (0)