]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/foreign-static-semantic-fail.stderr
Merge commit '4bdfb0741dbcecd5279a2635c3280726db0604b5' into clippyup
[rust.git] / src / test / ui / parser / foreign-static-semantic-fail.stderr
1 error: incorrect `static` inside `extern` block
2   --> $DIR/foreign-static-semantic-fail.rs:6:12
3    |
4 LL | extern "C" {
5    | ---------- `extern` blocks define existing foreign statics and statics inside of them cannot have a body
6 LL |     static X: u8 = 0;
7    |            ^       - the invalid body
8    |            |
9    |            cannot have a body
10    |
11    = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
12
13 error: incorrect `static` inside `extern` block
14   --> $DIR/foreign-static-semantic-fail.rs:7:16
15    |
16 LL | extern "C" {
17    | ---------- `extern` blocks define existing foreign statics and statics inside of them cannot have a body
18 LL |     static X: u8 = 0;
19 LL |     static mut Y: u8 = 0;
20    |                ^       - the invalid body
21    |                |
22    |                cannot have a body
23    |
24    = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
25
26 error: aborting due to 2 previous errors
27