-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
static FOO: u8 = 0;
const FOO_REF: &u8 = &FOO;
gives
error[E0013]: constants cannot refer to statics, use a constant instead
--> src/lib.rs:3:22
|
3 | const FOO_REF: &u8 = &FOO;
| ^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0013`.
error: could not compile `playground`.
The wording constants cannot refer to statics, use a constant instead
is confusing
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.