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() {}
|