rust/tests/ui/extern/issue-116203.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
413 B
Rust
Raw Normal View History

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() {}