Skip to content

Commit

Permalink
add build-fail test for simd type with an element type that's a wide …
Browse files Browse the repository at this point in the history
…pointer
  • Loading branch information
programmerjake committed Jun 2, 2021
1 parent d03683c commit c0ca382
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/ui/simd/simd-type-generic-monomorphisation-wide-ptr.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// build-fail

#![feature(repr_simd)]

// error-pattern:monomorphising SIMD type `S<[*mut [u8]; 4]>` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]`

#[repr(simd)]
struct S<T>(T);

fn main() {
let _v: Option<S<[*mut [u8]; 4]>> = None;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: monomorphising SIMD type `S<[*mut [u8]; 4]>` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]`

error: aborting due to previous error

0 comments on commit c0ca382

Please sign in to comment.