summaryrefslogtreecommitdiffstats
path: root/src/test/ui/wasm/wasm-import-module.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/wasm/wasm-import-module.rs')
-rw-r--r--src/test/ui/wasm/wasm-import-module.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/wasm/wasm-import-module.rs b/src/test/ui/wasm/wasm-import-module.rs
new file mode 100644
index 000000000..bff08847d
--- /dev/null
+++ b/src/test/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() {}