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 22:08:57 +02:00
#![feature(linkage)]
2020-09-01 17:12:52 -04:00
extern "C" {
#[linkage = "extern_weak"]
static foo: i32;
//~^ ERROR: invalid type for variable with `#[linkage]` attribute
}
fn main() {
println!("{}", unsafe { foo });
}