Repository navigation
Duplicate attribute diagnostic cleanups - #165935
Open
petrak-at-canonical wants to merge 3 commits into
Open
petrak-at-canonical wants to merge 3 commits into
petrak-at-canonical wants to merge 3 commits into
Conversation
Collaborator
|
Some changes occurred in compiler/rustc_attr_parsing cc @jdonszelmann, @JonathanBrouwer Some changes occurred to diagnostic attributes. cc @mejrs |
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
I have the failures in Right now I cleverly have engineered a workflow where I have to create two versions of every patch |
…teAttribute` Currently, `UnusedDuplicate` is used when a duplicate attribute is a warning, and `UnusedMultiple` is used when it is an error. This commit removes the redundancy in favor of a new lint, `DuplicateAttribute`. The error messages now look like "duplicate `X` attributes", instead of "multiple `X` attributes" or "duplicate attribute". Thanks to @JonathanBrouwer for the suggestion to work on this
petrak-at-canonical
force-pushed
the
duplicate-attr-diagnostic
branch
from
November 13, 2026 21:06
39bed01 to
befd06d
Compare
JonathanBrouwer
requested changes
Nov 14, 2026
Collaborator
|
Reminder, once the PR becomes ready for a review, use |
JonathanBrouwer
approved these changes
Nov 16, 2026
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Nov 16, 2026
…-diagnostic, r=JonathanBrouwer Duplicate attribute diagnostic cleanups Currently there are two different diagnostics for when you can't have a duplicate attribute on an item, `UnusedDuplicate` and `UnusedMultiple`. This PR deduplicates their behavior into `UnusedMultiple`. In a separate commit, it renames `UnusedMultiple` to `DuplicateAttribute`, a more sensible name. Separately, the third commit fixes a small issue where diagnostics about attributes would be printed with `..` as a path separator instead of `::` Thanks to Jonathan Brouwer for the suggestion to work on this! r? @JonathanBrouwer
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Nov 16, 2026
…-diagnostic, r=JonathanBrouwer Duplicate attribute diagnostic cleanups Currently there are two different diagnostics for when you can't have a duplicate attribute on an item, `UnusedDuplicate` and `UnusedMultiple`. This PR deduplicates their behavior into `UnusedMultiple`. In a separate commit, it renames `UnusedMultiple` to `DuplicateAttribute`, a more sensible name. Separately, the third commit fixes a small issue where diagnostics about attributes would be printed with `..` as a path separator instead of `::` Thanks to Jonathan Brouwer for the suggestion to work on this! r? @JonathanBrouwer
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 16, 2026
…uwer Rollup of 13 pull requests Successful merges: - #166054 (stdarch subtree update) - #165289 (lexer: Update to Unicode 18) - #165960 (alloctests: use thread-local in `c_str_alloc_error`) - #166002 (#[optimize]: keep low opt levels unoptimized) - #166049 (rustc_target: Require altivec feature for ELFv2 powerpc64 targets) - #165200 (fix abi kind of thumb windows targets) - #165935 (Duplicate attribute diagnostic cleanups) - #165999 (Update TPDE submodule) - #166045 (rustdoc: Correctly filter deref impls on type aliases) - #166063 (Fix bad hyperlink) - #166066 (Update books) - #166072 (simplify Appearances iter) - #166075 (Remove dead code emitting `UnusedBuiltinAttribute`)
Member
|
Contributor
|
This pull request was unapproved. This PR was contained in a rollup (#166080), which was unapproved. |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 17, 2026
…, r=<try> Duplicate attribute diagnostic cleanups try-job: test-x86_64-mingw-1
Contributor
|
💔 Test for 0f4128d failed: CI. Failed job:
|
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
This branch has not been deployed
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.
Currently there are two different diagnostics for when you can't have a duplicate attribute on an item,
UnusedDuplicateandUnusedMultiple. This PR deduplicates their behavior intoUnusedMultiple. In a separate commit, it renamesUnusedMultipletoDuplicateAttribute, a more sensible name.Separately, the third commit fixes a small issue where diagnostics about attributes would be printed with
..as a path separator instead of::Thanks to Jonathan Brouwer for the suggestion to work on this!
r? @JonathanBrouwer