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

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

37 lines
1.8 KiB
Plaintext
Raw Normal View History

error[E0658]: referencing statics in constants is unstable
2019-11-19 23:16:58 +00:00
--> $DIR/issue-17718-references.rs:9:29
2018-07-15 21:11:54 +00:00
|
2019-03-09 12:03:44 +00:00
LL | const T2: &'static usize = &S;
2019-11-19 23:16:58 +00:00
| ^
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
= 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-07-15 21:11:54 +00:00
error[E0658]: referencing statics in constants is unstable
2018-12-25 15:56:47 +00:00
--> $DIR/issue-17718-references.rs:14:19
2018-07-15 21:11:54 +00:00
|
2019-03-09 12:03:44 +00:00
LL | const T6: usize = S;
2018-07-15 21:11:54 +00:00
| ^
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
= 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-07-15 21:11:54 +00:00
error[E0658]: referencing statics in constants is unstable
2018-12-25 15:56:47 +00:00
--> $DIR/issue-17718-references.rs:19:33
2018-07-15 21:11:54 +00:00
|
LL | const T10: Struct = Struct { a: S };
| ^
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
= 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-07-15 21:11:54 +00:00
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0658`.