Skip to content

refactor(diag): Simplify adding of new diagnostics#17015

Merged
epage merged 17 commits into
rust-lang:masterfrom
epage:lint-pass
May 20, 2026
Merged

refactor(diag): Simplify adding of new diagnostics#17015
epage merged 17 commits into
rust-lang:masterfrom
epage:lint-pass

Conversation

@epage
Copy link
Copy Markdown
Contributor

@epage epage commented May 19, 2026

What does this PR try to resolve?

Adding a parse diagnostic went from

  1. Write the diagnostic (checking the level)
  2. Add the mod
  3. Add two uses
  4. Call the diagnostic

To

  1. Write the diagnostic
  2. Add the mod
  3. Add an entry to PARSE_PASS_RULES

This also adds the following correctness checks

How to test and review this PR?

This is the final step in the process started in #16975.

Note: a hack for missing_lints_features is introduced and then removed where it is first treated as a lint and then corrected to be a diagnostic

@rustbot rustbot added Command-fetch S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 19, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 19, 2026

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from ehuss, weihanglo

Comment on lines -232 to -235
// This is a short term hack to allow `blanket_hint_mostly_unused`
// to run without requiring `-Zcargo-lints`, which should hopefully
// improve the testing experience while we are collecting feedback
if workspace.gctx().cli_unstable().profile_hint_mostly_unused {
Copy link
Copy Markdown
Member

@Muscraft Muscraft May 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshtriplett, just wanted to make you aware of this change

View changes since the review

@Muscraft Muscraft added this pull request to the merge queue May 20, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 20, 2026
@epage epage added this pull request to the merge queue May 20, 2026
Merged via the queue into rust-lang:master with commit a6d3fec May 20, 2026
29 checks passed
@epage epage deleted the lint-pass branch May 20, 2026 10:06
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants