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

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

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