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

14 lines
194 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 = "foo"]
static foo: *const i32;
//~^ ERROR: invalid linkage specified
}
fn main() {
println!("{:?}", unsafe { foo });
}