2021-06-08 20:38:43 +02:00
|
|
|
// Check that appropriate errors are reported if an intrinsic is defined
|
|
|
|
|
// with the wrong number of generic lifetime/type/const parameters, and
|
|
|
|
|
// that no ICE occurs in these cases.
|
|
|
|
|
|
2024-02-23 18:36:24 +01:00
|
|
|
#![feature(intrinsics)]
|
2025-02-24 17:26:56 +01:00
|
|
|
#![crate_type = "lib"]
|
2021-06-08 20:38:43 +02:00
|
|
|
|
2025-01-21 15:06:52 -05:00
|
|
|
#[rustc_intrinsic]
|
|
|
|
|
unsafe fn simd_saturating_add<'a, T: 'a>(x: T, y: T);
|
|
|
|
|
//~^ ERROR: intrinsic has wrong number of lifetime parameters
|
2021-06-08 20:38:43 +02:00
|
|
|
|
2025-01-21 15:06:52 -05:00
|
|
|
#[rustc_intrinsic]
|
|
|
|
|
unsafe fn simd_add<'a, T>(x: T, y: T) -> T;
|
2021-06-08 20:38:43 +02:00
|
|
|
|
2025-01-21 15:06:52 -05:00
|
|
|
#[rustc_intrinsic]
|
|
|
|
|
unsafe fn simd_sub<T, U>(x: T, y: U);
|
|
|
|
|
//~^ ERROR: intrinsic has wrong number of type parameters
|
|
|
|
|
|
|
|
|
|
#[rustc_intrinsic]
|
|
|
|
|
unsafe fn simd_mul<T, const N: usize>(x: T, y: T);
|
|
|
|
|
//~^ ERROR: intrinsic has wrong number of const parameters
|