From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/feature-gates/feature-gate-wasm_abi.rs | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/ui/feature-gates/feature-gate-wasm_abi.rs (limited to 'tests/ui/feature-gates/feature-gate-wasm_abi.rs') diff --git a/tests/ui/feature-gates/feature-gate-wasm_abi.rs b/tests/ui/feature-gates/feature-gate-wasm_abi.rs new file mode 100644 index 000000000..222c88daf --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-wasm_abi.rs @@ -0,0 +1,26 @@ +// needs-llvm-components: webassembly +// compile-flags: --target=wasm32-unknown-unknown --crate-type=rlib +#![no_core] +#![feature(no_core, lang_items)] +#[lang="sized"] +trait Sized { } + +extern "wasm" fn fu() {} //~ ERROR wasm ABI is experimental + +trait T { + extern "wasm" fn mu(); //~ ERROR wasm ABI is experimental + extern "wasm" fn dmu() {} //~ ERROR wasm ABI is experimental +} + +struct S; +impl T for S { + extern "wasm" fn mu() {} //~ ERROR wasm ABI is experimental +} + +impl S { + extern "wasm" fn imu() {} //~ ERROR wasm ABI is experimental +} + +type TAU = extern "wasm" fn(); //~ ERROR wasm ABI is experimental + +extern "wasm" {} //~ ERROR wasm ABI is experimental -- cgit v1.2.3