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
222 B
Rust
Raw Normal View History

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