rust/tests/run-make/linkage-attr-on-static/bar.rs
2023-03-30 07:34:55 -05:00

17 lines
225 B
Rust

#![feature(linkage)]
#[no_mangle]
#[linkage = "external"]
static BAZ: i32 = 21;
#[link(name = "foo", kind = "static")]
extern "C" {
fn what() -> i32;
}
fn main() {
unsafe {
assert_eq!(what(), BAZ);
}
}