mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
14 lines
222 B
Rust
14 lines
222 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 });
|
|
}
|