2 // rustc-env:RUST_BACKTRACE=0
3 // normalize-stderr-test "note: rustc 1.* running on .*" -> "note: rustc VERSION running on TARGET"
4 // normalize-stderr-test "note: compiler flags: .*" -> "note: compiler flags: FLAGS"
5 // normalize-stderr-test "interpret/intern.rs:[0-9]*:[0-9]*" -> "interpret/intern.rs:LL:CC"
9 #![feature(platform_intrinsics)]
10 #![allow(non_camel_case_types)]
12 #[repr(simd)] struct i8x1(i8);
14 extern "platform-intrinsic" {
15 fn simd_insert<T, U>(x: T, idx: u32, val: U) -> T;
18 const X: i8x1 = i8x1(42);
20 const fn insert_wrong_scalar() -> i8x1 {
21 unsafe { simd_insert(X, 0_u32, 42_i16) }
24 const D: i8x1 = insert_wrong_scalar();