rust/tests/ui/linkage-attr/linkage2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
221 B
Rust
Raw Normal View History

// check-fail
2019-04-09 15:08:57 -05:00
#![feature(linkage)]
2020-09-01 16:12:52 -05:00
extern "C" {
#[linkage = "extern_weak"]
static foo: i32;
//~^ ERROR: invalid type for variable with `#[linkage]` attribute
}
fn main() {
println!("{}", unsafe { foo });
}