Repository navigation
Duplicate attribute diagnostic cleanups - #165935
rust-bors[bot] merged 3 commits into
Conversation
|
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.
|
I have the failures in Right now I cleverly have engineered a workflow where I have to create two versions of every patch |
39bed01 to
befd06d
Compare
|
Reminder, once the PR becomes ready for a review, use |
…-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
…-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
…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`)
|
|
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.
…, r=<try> Duplicate attribute diagnostic cleanups try-job: test-x86_64-mingw-1
|
💔 Test for 0f4128d failed: CI. Failed job:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…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
6de3ba1 to
3dc32c0
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Rebased, and fixed tests on |
…, r=<try> Duplicate attribute diagnostic cleanups try-job: test-x86_64-mingw-1 try-job: test-aarch64-apple-1
This comment has been minimized.
This comment has been minimized.
…uwer Rollup of 11 pull requests Successful merges: - #165913 (MirPatch: reduce new statement insertion complexity) - #166081 (test `feature(asm_const_ptr)` with a vtable) - #166094 (Chain the spans of qualified paths instead of having a first-to-last scheme ) - #166113 (Fix dead-code marking dead enum variants as live) - #166118 (rustc_target: catch up with LLVM 24 movement on ppc64le bsd data layout) - #166155 (windows seek_write: document interaction with append mode) - #165935 (Duplicate attribute diagnostic cleanups) - #165948 (lint: Avoid unused_parens warning for ref patterns binding an identifier) - #166018 (`rustc_mir_build`: de-duplicate `local_temp_lifetime()`) - #166111 (Add `cd` alias to `std::env::set_current_dir`) - #166157 (Don't recover invalid literals in attribute parsing)
…uwer Rollup of 11 pull requests Successful merges: - #165913 (MirPatch: reduce new statement insertion complexity) - #166081 (test `feature(asm_const_ptr)` with a vtable) - #166094 (Chain the spans of qualified paths instead of having a first-to-last scheme ) - #166113 (Fix dead-code marking dead enum variants as live) - #166118 (rustc_target: catch up with LLVM 24 movement on ppc64le bsd data layout) - #166155 (windows seek_write: document interaction with append mode) - #165935 (Duplicate attribute diagnostic cleanups) - #165948 (lint: Avoid unused_parens warning for ref patterns binding an identifier) - #166018 (`rustc_mir_build`: de-duplicate `local_temp_lifetime()`) - #166111 (Add `cd` alias to `std::env::set_current_dir`) - #166157 (Don't recover invalid literals in attribute parsing)
Rollup merge of #165935 - petrak-at-canonical:duplicate-attr-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
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