]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/foreign-const-semantic-fail.stderr
parse extern consts
[rust.git] / src / test / ui / parser / foreign-const-semantic-fail.stderr
1 error: extern items cannot be `const`
2   --> $DIR/foreign-const-semantic-fail.rs:4:11
3    |
4 LL | extern {
5    | ------ in this `extern` block
6 LL |     const A: isize;
7    |     ------^
8    |     |
9    |     help: try using a static value: `static`
10    |
11    = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
12
13 error: extern items cannot be `const`
14   --> $DIR/foreign-const-semantic-fail.rs:6:11
15    |
16 LL | extern {
17    | ------ in this `extern` block
18 ...
19 LL |     const B: isize = 42;
20    |     ------^
21    |     |
22    |     help: try using a static value: `static`
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