refactor(diag): Simplify adding of new diagnostics#17015
Merged
Conversation
Collaborator
|
r? @ehuss rustbot has assigned @ehuss. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Muscraft
approved these changes
May 20, 2026
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 { |
Member
There was a problem hiding this comment.
@joshtriplett, just wanted to make you aware of this change
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
May 27, 2026
Update cargo submodule 13 commits in 4d1f984518c77fad6eeef4f40153b002a659e662..fbb61be30e5f9ac3a6ad58e56a5c0f5db2d2b3ef 2026-05-15 17:12:01 +0000 to 2026-05-26 15:08:03 +0000 - fix(compiler): forward verbose flag to rustc for local crates (rust-lang/cargo#17006) - Fix CVE-2026-5222 and CVE-2026-5223 (rust-lang/cargo#17031) - Don't use the network for a publish dry-run test (rust-lang/cargo#17027) - feat: Break out `RegistryConfig` and `crate_url` for interpreting `RegistryConfig::dl` (rust-lang/cargo#17011) - refactor(diag): Sort the PARSE_PASS_RULES (rust-lang/cargo#17019) - fix(artifact)!: Remove compat mode from artifacts (rust-lang/cargo#17016) - refactor(diag): Simplify adding of new diagnostics (rust-lang/cargo#17015) - test(package): Mark a network test that timed out on me (rust-lang/cargo#17017) - refactor(diag): Pull in the parse pass (rust-lang/cargo#17008) - test(lints): Avoid compiling where possible (rust-lang/cargo#17007) - fix(diag): Report deferred diagnostics like other diagnostics (rust-lang/cargo#16994) - refactor: drop `-Zunstable-options` for `rustdoc --emit` (rust-lang/cargo#17002) - chore(deps): update msrv (1 version) to v1.95 (rust-lang/cargo#17001)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR try to resolve?
Adding a parse diagnostic went from
modusesTo
modPARSE_PASS_RULESThis also adds the following correctness checks
pub, so the compiler will warn if it isn't referencedPARSE_PASS_RULESlint rules are inLINTSas a secondary check for the "parse all of the rules to ensure they are inLINTS(see refactor(lints): Pull outunknown_lintslint logic andmissing_lints_featuresdiagnostic logic #16976 for why this could be helpful)How to test and review this PR?
This is the final step in the process started in #16975.
Note: a hack for
missing_lints_featuresis introduced and then removed where it is first treated as a lint and then corrected to be a diagnostic