rust-lang / rust-lang/rust

Always show the lint name involved in a diagnostic?

Open
#134,634 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-diagnostics A-lints C-discussion T-compiler WG-diagnostics
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Description

After the first occurrence of a lint, the name of the lint is not displayed anymore.

That is a real annoyance:

  • When the diagnostics are shown in a console, one has to find out the first occurrence of the error.
  • When the diagnostics are shown in an IDE, there is not such a thing as the first diagnostics so it is almost impossible to find out the name of the lint.

I do not see any good reason to optimize one line of such a useful information. (Or maybe there are still hobbyist using teleprinter and Altair 8800???).

Version

Additional Labels

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the diagnostic output described for console and IDE use, then trace the Rust compiler's lint diagnostic formatting and identify where repeated lint names are omitted. Done means each diagnostic visibly identifies its lint without requiring the first occurrence, with coverage for both output contexts if the existing tests support them.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.