summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.rs')
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.rs b/tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.rs
new file mode 100644
index 000000000..9feed3941
--- /dev/null
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.rs
@@ -0,0 +1,13 @@
+#![cfg_attr(target_arch = "x86", feature(raw_dylib))]
+
+#[link(name = "foo")]
+extern "C" {
+ #[link_ordinal()]
+ //~^ ERROR incorrect number of arguments to `#[link_ordinal]`
+ fn foo();
+ #[link_ordinal()]
+ //~^ ERROR incorrect number of arguments to `#[link_ordinal]`
+ static mut imported_variable: i32;
+}
+
+fn main() {}