diff options
Diffstat (limited to 'tests/ui/wasm/wasm-import-module.rs')
-rw-r--r-- | tests/ui/wasm/wasm-import-module.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/wasm/wasm-import-module.rs b/tests/ui/wasm/wasm-import-module.rs new file mode 100644 index 000000000..bff08847d --- /dev/null +++ b/tests/ui/wasm/wasm-import-module.rs @@ -0,0 +1,21 @@ +#![feature(link_cfg)] + +#[link(name = "...", wasm_import_module)] //~ ERROR: must be of the form +extern "C" {} + +#[link(name = "...", wasm_import_module(x))] //~ ERROR: must be of the form +extern "C" {} + +#[link(name = "...", wasm_import_module())] //~ ERROR: must be of the form +extern "C" {} + +#[link(wasm_import_module = "foo", name = "bar")] //~ ERROR: `wasm_import_module` is incompatible with other arguments +extern "C" {} + +#[link(wasm_import_module = "foo", kind = "dylib")] //~ ERROR: `wasm_import_module` is incompatible with other arguments +extern "C" {} + +#[link(wasm_import_module = "foo", cfg(FALSE))] //~ ERROR: `wasm_import_module` is incompatible with other arguments +extern "C" {} + +fn main() {} |