summaryrefslogtreecommitdiffstats
path: root/tests/ui/extern/issue-116203.stderr
blob: 86e4cc763bd6e4035885c69aed1206ded2f02c62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
error: extern items cannot be `const`
  --> $DIR/issue-116203.rs:3:14
   |
LL |       static FOO: u32 = 0;
   |              ^^^
   |
   = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html

error: extern items cannot be `const`
  --> $DIR/issue-116203.rs:16:14
   |
LL |     hello! { yes }
   |              ^^^
   |
   = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html

error: incorrect `static` inside `extern` block
  --> $DIR/issue-116203.rs:3:14
   |
LL |   extern "C" {
   |   ---------- `extern` blocks define existing foreign statics and statics inside of them cannot have a body
LL | /     thread_local! {
LL | |       static FOO: u32 = 0;
   | |              ^^^ cannot have a body
LL | |
LL | |
LL | |     }
   | |_____- the invalid body
   |
   = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html

error: incorrect `static` inside `extern` block
  --> $DIR/issue-116203.rs:16:14
   |
LL |         const $name: () = ();
   |                           -- the invalid body
...
LL | extern "C" {
   | ---------- `extern` blocks define existing foreign statics and statics inside of them cannot have a body
LL |     hello! { yes }
   |              ^^^ cannot have a body
   |
   = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html

error: aborting due to 4 previous errors