Skip to content

Commit

Permalink
add test for SIMD element type of optional nonnull ptr to extern type
Browse files Browse the repository at this point in the history
  • Loading branch information
programmerjake committed Jun 2, 2021
1 parent c0ca382 commit 713b864
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// run-pass
// ignore-emscripten

#![feature(extern_types)]
#![feature(repr_simd)]

use std::ptr::NonNull;

extern {
type Extern;
}

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

#[inline(never)]
fn identity<T>(v: T) -> T {
v
}

fn main() {
let _v: S<[Option<NonNull<Extern>>; 4]> = identity(S([None; 4]));
}

0 comments on commit 713b864

Please sign in to comment.