mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
22 lines
413 B
Rust
22 lines
413 B
Rust
extern "C" {
|
|
thread_local! {
|
|
static FOO: u32 = 0;
|
|
//~^ error: extern items cannot be `const`
|
|
//~| error: incorrect `static` inside `extern` block
|
|
}
|
|
}
|
|
|
|
macro_rules! hello {
|
|
($name:ident) => {
|
|
const $name: () = ();
|
|
};
|
|
}
|
|
|
|
extern "C" {
|
|
hello! { yes }
|
|
//~^ error: extern items cannot be `const`
|
|
//~| error: incorrect `static` inside `extern` block
|
|
}
|
|
|
|
fn main() {}
|