Skip to content

Commit 713b864

Browse files
add test for SIMD element type of optional nonnull ptr to extern type
1 parent c0ca382 commit 713b864

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// run-pass
2+
// ignore-emscripten
3+
4+
#![feature(extern_types)]
5+
#![feature(repr_simd)]
6+
7+
use std::ptr::NonNull;
8+
9+
extern {
10+
type Extern;
11+
}
12+
13+
#[repr(simd)]
14+
struct S<T>(T);
15+
16+
#[inline(never)]
17+
fn identity<T>(v: T) -> T {
18+
v
19+
}
20+
21+
fn main() {
22+
let _v: S<[Option<NonNull<Extern>>; 4]> = identity(S([None; 4]));
23+
}

0 commit comments

Comments
 (0)