-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
22 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,39 @@ | ||
error[E0013]: constants cannot refer to statics | ||
error[E0658]: referencing statics in constants is unstable | ||
--> $DIR/type-check-4.rs:25:25 | ||
| | ||
LL | global_asm!("{}", const S); | ||
| ^ | ||
| | ||
= help: consider extracting the value of the `static` to a `const`, and referring to that | ||
= 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[E0013]: constants cannot refer to statics | ||
error[E0658]: referencing statics in constants is unstable | ||
--> $DIR/type-check-4.rs:28:35 | ||
| | ||
LL | global_asm!("{}", const const_foo(S)); | ||
| ^ | ||
| | ||
= help: consider extracting the value of the `static` to a `const`, and referring to that | ||
= 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[E0013]: constants cannot refer to statics | ||
error[E0658]: referencing statics in constants is unstable | ||
--> $DIR/type-check-4.rs:31:35 | ||
| | ||
LL | global_asm!("{}", const const_bar(S)); | ||
| ^ | ||
| | ||
= help: consider extracting the value of the `static` to a `const`, and referring to that | ||
= 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 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0013`. | ||
For more information about this error, try `rustc --explain E0658`. |