Skip to content

E0013 confusing diagnostic #68038

Closed

Description

@RustyYato
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

Activity

  1. added
    D-confusingDiagnostics: Confusing error or lint that should be reworked.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    A-diagnosticsArea: Messages for errors, warnings, and lints
    on Jan 9, 2020
  2. added 2 commits that reference this issue on Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsD-confusingDiagnostics: Confusing error or lint that should be reworked.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions