rust/tests/ui/consts/issue-17718-references.stderr

37 lines
1.8 KiB
Plaintext

error[E0658]: referencing statics in constants is unstable
--> $DIR/issue-17718-references.rs:9:29
|
LL | const T2: &'static usize = &S;
| ^
|
= 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: `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[E0658]: referencing statics in constants is unstable
--> $DIR/issue-17718-references.rs:14:19
|
LL | const T6: usize = S;
| ^
|
= 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: `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[E0658]: referencing statics in constants is unstable
--> $DIR/issue-17718-references.rs:19:33
|
LL | const T10: Struct = Struct { a: S };
| ^
|
= 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: `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 3 previous errors
For more information about this error, try `rustc --explain E0658`.