fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
963 B27 linesraw
1error: incorrect `static` inside `extern` block
2  --> $DIR/foreign-static-semantic-fail.rs:6:12
3   |
4LL | extern {
5   | ------ `extern` blocks define existing foreign statics and statics inside of them cannot have a body
6LL |     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
13error: incorrect `static` inside `extern` block
14  --> $DIR/foreign-static-semantic-fail.rs:7:16
15   |
16LL | extern {
17   | ------ `extern` blocks define existing foreign statics and statics inside of them cannot have a body
18LL |     static X: u8 = 0;
19LL |     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
26error: aborting due to 2 previous errors
27