about summary refs log tree commit diff
path: root/tests/ui/linkage-attr/linkage2.rs
blob: b1e64dabac7f80f144919ab93c30b5c3eabe90ea (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 });
}