summaryrefslogtreecommitdiffstats
path: root/tests/ui/linkage-attr/linkage2.rs
blob: aa42874f7ba8a64767d80708e2282fb1e349d88c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// check-fail

#![feature(linkage)]

extern "C" {
    #[linkage = "extern_weak"]
    static foo: i32;
//~^ ERROR: invalid type for variable with `#[linkage]` attribute
}

fn main() {
    println!("{}", unsafe { foo });
}