fork/rust

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

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
1.0 KiB35 linesraw
1error: extern items cannot be `const`
2  --> $DIR/foreign-const-semantic-fail.rs:4:11
3   |
4LL |     const A: isize;
5   |     ------^
6   |     |
7   |     help: try using a static value: `static`
8   |
9   = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
10
11error: extern items cannot be `const`
12  --> $DIR/foreign-const-semantic-fail.rs:6:11
13   |
14LL |     const B: isize = 42;
15   |     ------^
16   |     |
17   |     help: try using a static value: `static`
18   |
19   = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
20
21error: incorrect `static` inside `extern` block
22  --> $DIR/foreign-const-semantic-fail.rs:6:11
23   |
24LL | extern {
25   | ------ `extern` blocks define existing foreign statics and statics inside of them cannot have a body
26...
27LL |     const B: isize = 42;
28   |           ^          -- the invalid body
29   |           |
30   |           cannot have a body
31   |
32   = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
33
34error: aborting due to 3 previous errors
35