rust/tests/ui/linkage-attr/linkage2.rs
2023-01-11 09:32:08 +00:00

14 lines
221 B
Rust

// 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 });
}