Skip to content

Support lowercase error codes in --explain #86518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Skalman opened this issue Jun 21, 2021 · 2 comments · Fixed by #86533
Closed

Support lowercase error codes in --explain #86518

Skalman opened this issue Jun 21, 2021 · 2 comments · Fixed by #86533
Assignees
Labels
A-driver Area: rustc_driver that ties everything together into the `rustc` compiler A-error-codes Area: Explanation of an error code (--explain) C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Skalman
Copy link

Skalman commented Jun 21, 2021

It would be nice if rustc --explain supported lowercase error codes:

The current output is:

$ rustc --explain e0106
error: e0106 is not a valid error code

Ideally, the command would work regardless of whether you enter e0106 or E0106:

$ rustc --explain e0106

This error indicates that a lifetime is missing from a type. If it is an error
inside a function signature, the problem may be with failing to adhere to the
lifetime elision rules (see below).

[...]
@inquisitivecrystal
Copy link
Contributor

inquisitivecrystal commented Jun 21, 2021

@rustbot label +A-driver +A-error-codes +C-enhancement +T-compiler
@rustbot claim

@rustbot rustbot added A-driver Area: rustc_driver that ties everything together into the `rustc` compiler C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 21, 2021
@rustbot rustbot added the A-error-codes Area: Explanation of an error code (--explain) label Jun 21, 2021
@inquisitivecrystal
Copy link
Contributor

I'm just about to open a pull request for this. Thank you for bringing it up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-driver Area: rustc_driver that ties everything together into the `rustc` compiler A-error-codes Area: Explanation of an error code (--explain) C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants