mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
16 lines
747 B
Plaintext
16 lines
747 B
Plaintext
error[E0658]: referencing statics in constants is unstable
|
|
--> $DIR/issue-18118-2.rs:4:10
|
|
|
|
|
LL | &p
|
|
| ^
|
|
|
|
|
= 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
|
|
= 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.
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0658`.
|