summaryrefslogtreecommitdiffstats
path: root/src/test/ui/linkage-attr/linkage3.rs
blob: 112eb1d3bd9d28a1c372aaae5245d7d1fca8b397 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// FIXME https://github.com/rust-lang/rust/issues/59774

// check-fail
// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""

#![feature(linkage)]

extern "C" {
    #[linkage = "foo"]
    static foo: *const i32;
//~^ ERROR: invalid linkage specified
}

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