summaryrefslogtreecommitdiffstats
path: root/tests/run-make/linkage-attr-on-static/bar.rs
blob: 68607cbb6572108b0e5013533ada08ebc0c4cd92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![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);
    }
}