]> git.proxmox.com Git - rustc.git/blob - src/test/ui/linkage-attr/linkage2.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / linkage-attr / linkage2.rs
1 // FIXME https://github.com/rust-lang/rust/issues/59774
2
3 // build-fail
4 // normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
5 // normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
6 // ignore-sgx no weak linkages permitted
7
8 #![feature(linkage)]
9
10 extern "C" {
11 #[linkage = "extern_weak"]
12 static foo: i32;
13 //~^ ERROR: must have type `*const T` or `*mut T` due to `#[linkage]` attribute
14 }
15
16 fn main() {
17 println!("{}", unsafe { foo });
18 }