-
-
Notifications
You must be signed in to change notification settings - Fork 15k
The meaning of an "item" in E0121 should be elaborated on #86005
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: Confusing error or lint; hard to understand for new users.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: Confusing error or lint; hard to understand for new users.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code:
I expected to see this happen: an error which explains why this doesn't work with
consteven though it does work withlet, like what would happen with the code:Instead, this happened: E0121, which doesn't explain that the problem is that const's need to be explicitly typed, but instead refers to an "item signature", which is an unexplained term of art. The explanation in
rustc --explain E0121does not elaborate on what an "item signature" means either.Meta
rustc --version --verbose:Occurs on 1.52.1 stable and on 1.54.0 nightly.