2025-02-24 09:26:54 +00:00
|
|
|
//@ add-core-stubs
|
2025-01-02 21:42:10 +00:00
|
|
|
//@ compile-flags: --crate-type=rlib
|
|
|
|
|
|
|
|
#![feature(no_core, lang_items)]
|
|
|
|
#![no_core]
|
|
|
|
|
2025-02-24 09:26:54 +00:00
|
|
|
extern crate minicore;
|
|
|
|
use minicore::*;
|
2025-01-02 21:42:10 +00:00
|
|
|
|
|
|
|
// Functions
|
2025-02-05 19:15:27 +00:00
|
|
|
extern "gpu-kernel" fn f1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
|
2025-01-02 21:42:10 +00:00
|
|
|
//~^ ERROR is not a supported ABI
|
|
|
|
|
|
|
|
// Methods in trait definition
|
|
|
|
trait Tr {
|
2025-02-05 19:15:27 +00:00
|
|
|
extern "gpu-kernel" fn m1(_: ()); //~ ERROR "gpu-kernel" ABI is experimental and subject to change
|
2025-01-02 21:42:10 +00:00
|
|
|
|
2025-02-05 19:15:27 +00:00
|
|
|
extern "gpu-kernel" fn dm1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
|
2025-01-02 21:42:10 +00:00
|
|
|
//~^ ERROR is not a supported ABI
|
|
|
|
}
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
|
|
|
|
// Methods in trait impl
|
|
|
|
impl Tr for S {
|
2025-02-05 19:15:27 +00:00
|
|
|
extern "gpu-kernel" fn m1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
|
2025-01-02 21:42:10 +00:00
|
|
|
//~^ ERROR is not a supported ABI
|
|
|
|
}
|
|
|
|
|
|
|
|
// Methods in inherent impl
|
|
|
|
impl S {
|
2025-02-05 19:15:27 +00:00
|
|
|
extern "gpu-kernel" fn im1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
|
2025-01-02 21:42:10 +00:00
|
|
|
//~^ ERROR is not a supported ABI
|
|
|
|
}
|
|
|
|
|
|
|
|
// Function pointer types
|
2025-02-05 19:15:27 +00:00
|
|
|
type A1 = extern "gpu-kernel" fn(_: ()); //~ ERROR "gpu-kernel" ABI is experimental and subject to change
|
2025-01-02 21:42:10 +00:00
|
|
|
//~^ WARN the calling convention "gpu-kernel" is not supported on this target
|
|
|
|
//~^^ WARN this was previously accepted by the compiler but is being phased out
|
|
|
|
|
|
|
|
// Foreign modules
|
2025-02-05 19:15:27 +00:00
|
|
|
extern "gpu-kernel" {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
|
2025-01-02 21:42:10 +00:00
|
|
|
//~^ ERROR is not a supported ABI
|