From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../feature-gate-abi_amdgpu_kernel.rs | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/ui/feature-gates/feature-gate-abi_amdgpu_kernel.rs (limited to 'tests/ui/feature-gates/feature-gate-abi_amdgpu_kernel.rs') diff --git a/tests/ui/feature-gates/feature-gate-abi_amdgpu_kernel.rs b/tests/ui/feature-gates/feature-gate-abi_amdgpu_kernel.rs new file mode 100644 index 000000000..465b81d7f --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-abi_amdgpu_kernel.rs @@ -0,0 +1,30 @@ +// compile-flags: --crate-type=rlib +#![no_core] +#![feature(no_core, lang_items)] +#[lang="sized"] +trait Sized { } + +extern "amdgpu-kernel" fn fu() {} //~ ERROR amdgpu-kernel ABI is experimental +//~^ ERROR is not a supported ABI + +trait T { + extern "amdgpu-kernel" fn mu(); //~ ERROR amdgpu-kernel ABI is experimental + extern "amdgpu-kernel" fn dmu() {} //~ ERROR amdgpu-kernel ABI is experimental + //~^ ERROR is not a supported ABI +} + +struct S; +impl T for S { + extern "amdgpu-kernel" fn mu() {} //~ ERROR amdgpu-kernel ABI is experimental + //~^ ERROR is not a supported ABI +} + +impl S { + extern "amdgpu-kernel" fn imu() {} //~ ERROR amdgpu-kernel ABI is experimental + //~^ ERROR is not a supported ABI +} + +type TAU = extern "amdgpu-kernel" fn(); //~ ERROR amdgpu-kernel ABI is experimental + +extern "amdgpu-kernel" {} //~ ERROR amdgpu-kernel ABI is experimental +//~^ ERROR is not a supported ABI -- cgit v1.2.3