diff options
Diffstat (limited to 'tests/ui/linkage-attr/linkage2.rs')
-rw-r--r-- | tests/ui/linkage-attr/linkage2.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/linkage-attr/linkage2.rs b/tests/ui/linkage-attr/linkage2.rs new file mode 100644 index 000000000..aa42874f7 --- /dev/null +++ b/tests/ui/linkage-attr/linkage2.rs @@ -0,0 +1,13 @@ +// 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 }); +} |