mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +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() {}
|