diff options
Diffstat (limited to 'tests/ui/rfc-2627-raw-dylib/link-ordinal-unsupported-link-kind.rs')
-rw-r--r-- | tests/ui/rfc-2627-raw-dylib/link-ordinal-unsupported-link-kind.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-unsupported-link-kind.rs b/tests/ui/rfc-2627-raw-dylib/link-ordinal-unsupported-link-kind.rs new file mode 100644 index 000000000..329c93fc1 --- /dev/null +++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-unsupported-link-kind.rs @@ -0,0 +1,17 @@ +#![cfg_attr(target_arch = "x86", feature(raw_dylib))] + +#[link(name = "foo")] +extern "C" { + #[link_ordinal(3)] + //~^ ERROR `#[link_ordinal]` is only supported if link kind is `raw-dylib` + fn foo(); +} + +#[link(name = "bar", kind = "static")] +extern "C" { + #[link_ordinal(3)] + //~^ ERROR `#[link_ordinal]` is only supported if link kind is `raw-dylib` + fn bar(); +} + +fn main() {} |