2022-07-29 13:18:07 -05:00
|
|
|
#![cfg_attr(target_arch = "x86", feature(raw_dylib))]
|
2022-08-02 22:30:27 -05:00
|
|
|
|
|
|
|
#[link_ordinal(123)]
|
2022-08-03 20:28:59 -05:00
|
|
|
//~^ ERROR attribute should be applied to a foreign function or static
|
2022-08-02 22:30:27 -05:00
|
|
|
struct Foo {}
|
|
|
|
|
|
|
|
#[link_ordinal(123)]
|
2022-08-03 20:28:59 -05:00
|
|
|
//~^ ERROR attribute should be applied to a foreign function or static
|
2022-08-02 22:30:27 -05:00
|
|
|
fn test() {}
|
|
|
|
|
2022-08-03 20:28:59 -05:00
|
|
|
#[link_ordinal(42)]
|
|
|
|
//~^ ERROR attribute should be applied to a foreign function or static
|
|
|
|
static mut imported_val: i32 = 123;
|
|
|
|
|
2022-08-02 22:30:27 -05:00
|
|
|
#[link(name = "exporter", kind = "raw-dylib")]
|
|
|
|
extern {
|
|
|
|
#[link_ordinal(13)]
|
|
|
|
fn imported_function();
|
2022-08-03 20:28:59 -05:00
|
|
|
|
|
|
|
#[link_ordinal(42)]
|
|
|
|
static mut imported_variable: i32;
|
2022-08-02 22:30:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|