diff --git a/src/test/ui/simd/simd-type-generic-monomorphisation-extern-nonnull-ptr.rs b/src/test/ui/simd/simd-type-generic-monomorphisation-extern-nonnull-ptr.rs new file mode 100644 index 0000000000000..ae321c974b9d9 --- /dev/null +++ b/src/test/ui/simd/simd-type-generic-monomorphisation-extern-nonnull-ptr.rs @@ -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); + +#[inline(never)] +fn identity(v: T) -> T { + v +} + +fn main() { + let _v: S<[Option>; 4]> = identity(S([None; 4])); +}