summaryrefslogtreecommitdiffstats
path: root/tests/ui/extern/issue-116203.rs
blob: f8212841644950dc1e83de1a7fc902ace3e71610 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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() {}