rust/tests/ui/consts/issue-52060.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
785 B
Plaintext
Raw Normal View History

error[E0658]: referencing statics in constants is unstable
2018-08-29 15:45:55 +00:00
--> $DIR/issue-52060.rs:4:26
|
LL | static B: [u32; 1] = [0; A.len()];
| ^
2020-01-10 13:31:36 +00:00
|
= note: see issue #119618 <https://github.com/rust-lang/rust/issues/119618> for more information
= help: add `#![feature(const_refs_to_static)]` to the crate attributes to enable
2024-02-05 20:24:32 +00:00
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
= note: `static` and `const` variables can refer to other `const` variables. A `const` variable, however, cannot refer to a `static` variable.
= help: to fix this, the value can be extracted to a `const` and then used.
2018-08-29 15:45:55 +00:00
error: aborting due to 1 previous error
2018-08-29 15:45:55 +00:00
For more information about this error, try `rustc --explain E0658`.