Skip to content

Commit c0ca382

Browse files
add build-fail test for simd type with an element type that's a wide pointer
1 parent d03683c commit c0ca382

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// build-fail
2+
3+
#![feature(repr_simd)]
4+
5+
// error-pattern:monomorphising SIMD type `S<[*mut [u8]; 4]>` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]`
6+
7+
#[repr(simd)]
8+
struct S<T>(T);
9+
10+
fn main() {
11+
let _v: Option<S<[*mut [u8]; 4]>> = None;
12+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: monomorphising SIMD type `S<[*mut [u8]; 4]>` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]`
2+
3+
error: aborting due to previous error
4+

0 commit comments

Comments
 (0)