rustc_resolve: move diagnostic attribute linting to attr parsing - #160499
Merged
rust-bors[bot] merged 1 commit intoAug 8, 2026
Merged
Conversation
Collaborator
|
Some changes occurred in compiler/rustc_attr_parsing |
Collaborator
|
r? @folkertdev rustbot has assigned @folkertdev. Use Why was this reviewer chosen?The reviewer was selected based on:
|
JonathanBrouwer
requested changes
Aug 5, 2026
Collaborator
|
Reminder, once the PR becomes ready for a review, use |
mejrs
force-pushed
the
move_diagnostic_attr_not_found_lint
branch
from
August 5, 2026 15:36
467a96d to
df6106e
Compare
Collaborator
|
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. |
It had to be in rustc_resolve because there was no general attribute parsing infra back then, but now there is, so it should be there
mejrs
force-pushed
the
move_diagnostic_attr_not_found_lint
branch
from
August 5, 2026 16:45
df6106e to
cd19505
Compare
Contributor
Author
|
I've addressed both comments as well as added a "this is an experimental diagnostic attribute" note. @rustbot ready |
JonathanBrouwer
approved these changes
Aug 7, 2026
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Aug 7, 2026
…nd_lint, r=JonathanBrouwer rustc_resolve: move diagnostic attribute linting to attr parsing It was in rustc_resolve because there was no general attribute parsing infra back then, but now there is, so it should be there. Also improves some spans. This change also makes it so that unknown diagnostic attributes are removed, rather than stay as unparsed attributes.
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 7, 2026
…uwer Rollup of 21 pull requests Successful merges: - #159784 (Hint that memchr returns an in-bounds index) - #150885 (Revive L4Re target) - #159643 (Add support for splatted function pointers) - #160433 (delegation: add support for wrapping of the return value with `From::from`) - #160530 (refactor handling of target features in Session) - #160606 (bootstrap: Store and use an explicit CheckKind in `check::Rustc`) - #160628 (fix ICE in `suggest_add_reference_to_arg` for non-callable items) - #160634 (miri subtree update) - #157641 (Do not promote extern statics) - #158904 (Fix FutureDropPoll shim for by-move async closures) - #160103 (Add regression test for GAT bound mismatched type error) - #160335 (dlopen offload) - #160445 (codegen: classify localized MSVC linker progress as linker_info) - #160499 (rustc_resolve: move diagnostic attribute linting to attr parsing) - #160504 (cleanup borrowck, improve c-variadic handling) - #160577 (expand: Feature gate AST-based attribute macros on expressions and statements) - #160587 (Add regression test for associated type outlives bound at call site) - #160625 (platform-support/netbsd.md: No longer mention 8.x, due to EoL.) - #160636 (derive(Diagnostic): link to proper docs) - #160644 (Clean up some manual debug impls) - #160649 (move naked function ui tests)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Aug 7, 2026
…nd_lint, r=JonathanBrouwer rustc_resolve: move diagnostic attribute linting to attr parsing It was in rustc_resolve because there was no general attribute parsing infra back then, but now there is, so it should be there. Also improves some spans. This change also makes it so that unknown diagnostic attributes are removed, rather than stay as unparsed attributes.
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 7, 2026
…uwer Rollup of 20 pull requests Successful merges: - #159784 (Hint that memchr returns an in-bounds index) - #150885 (Revive L4Re target) - #159643 (Add support for splatted function pointers) - #160433 (delegation: add support for wrapping of the return value with `From::from`) - #160530 (refactor handling of target features in Session) - #160606 (bootstrap: Store and use an explicit CheckKind in `check::Rustc`) - #160628 (fix ICE in `suggest_add_reference_to_arg` for non-callable items) - #160634 (miri subtree update) - #157641 (Do not promote extern statics) - #158904 (Fix FutureDropPoll shim for by-move async closures) - #160103 (Add regression test for GAT bound mismatched type error) - #160335 (dlopen offload) - #160445 (codegen: classify localized MSVC linker progress as linker_info) - #160499 (rustc_resolve: move diagnostic attribute linting to attr parsing) - #160504 (cleanup borrowck, improve c-variadic handling) - #160577 (expand: Feature gate AST-based attribute macros on expressions and statements) - #160587 (Add regression test for associated type outlives bound at call site) - #160625 (platform-support/netbsd.md: No longer mention 8.x, due to EoL.) - #160636 (derive(Diagnostic): link to proper docs) - #160644 (Clean up some manual debug impls)
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 7, 2026
…nd_lint, r=JonathanBrouwer rustc_resolve: move diagnostic attribute linting to attr parsing It was in rustc_resolve because there was no general attribute parsing infra back then, but now there is, so it should be there. Also improves some spans. This change also makes it so that unknown diagnostic attributes are removed, rather than stay as unparsed attributes.
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 7, 2026
…uwer Rollup of 28 pull requests Successful merges: - #159784 (Hint that memchr returns an in-bounds index) - #160673 (Improve `canonical_param_env_cache`) - #150885 (Revive L4Re target) - #159643 (Add support for splatted function pointers) - #160433 (delegation: add support for wrapping of the return value with `From::from`) - #160530 (refactor handling of target features in Session) - #160606 (bootstrap: Store and use an explicit CheckKind in `check::Rustc`) - #160628 (fix ICE in `suggest_add_reference_to_arg` for non-callable items) - #160683 (Add regression test for unknown feaeture name reported with other errors) - #157641 (Do not promote extern statics) - #158904 (Fix FutureDropPoll shim for by-move async closures) - #159816 (added note/help about iterator invalidation when mutating a collection inside a for loop) - #160103 (Add regression test for GAT bound mismatched type error) - #160335 (dlopen offload) - #160445 (codegen: classify localized MSVC linker progress as linker_info) - #160499 (rustc_resolve: move diagnostic attribute linting to attr parsing) - #160504 (cleanup borrowck, improve c-variadic handling) - #160577 (expand: Feature gate AST-based attribute macros on expressions and statements) - #160587 (Add regression test for associated type outlives bound at call site) - #160625 (platform-support/netbsd.md: No longer mention 8.x, due to EoL.) - #160633 (delegation: fix determining wrong `FnKind` when delegation is inside const arg) - #160636 (derive(Diagnostic): link to proper docs) - #160644 (Clean up some manual debug impls) - #160649 (move naked function ui tests) - #160672 (Improve `MaybeLiveLocals`) - #160693 (Add branch config for perf. unrolling in bors) - #160696 (rustc_codegen_llvm: handle sm_101* features being an alias) - #160706 (renovate: clarify that vulnerability PRs are opened automatically)
rust-timer
added a commit
that referenced
this pull request
Aug 8, 2026
Rollup merge of #160499 - mejrs:move_diagnostic_attr_not_found_lint, r=JonathanBrouwer rustc_resolve: move diagnostic attribute linting to attr parsing It was in rustc_resolve because there was no general attribute parsing infra back then, but now there is, so it should be there. Also improves some spans. This change also makes it so that unknown diagnostic attributes are removed, rather than stay as unparsed attributes.
pull Bot
pushed a commit
to LeeeeeeM/miri
that referenced
this pull request
Aug 8, 2026
…uwer Rollup of 28 pull requests Successful merges: - rust-lang/rust#159784 (Hint that memchr returns an in-bounds index) - rust-lang/rust#160673 (Improve `canonical_param_env_cache`) - rust-lang/rust#150885 (Revive L4Re target) - rust-lang/rust#159643 (Add support for splatted function pointers) - rust-lang/rust#160433 (delegation: add support for wrapping of the return value with `From::from`) - rust-lang/rust#160530 (refactor handling of target features in Session) - rust-lang/rust#160606 (bootstrap: Store and use an explicit CheckKind in `check::Rustc`) - rust-lang/rust#160628 (fix ICE in `suggest_add_reference_to_arg` for non-callable items) - rust-lang/rust#160683 (Add regression test for unknown feaeture name reported with other errors) - rust-lang/rust#157641 (Do not promote extern statics) - rust-lang/rust#158904 (Fix FutureDropPoll shim for by-move async closures) - rust-lang/rust#159816 (added note/help about iterator invalidation when mutating a collection inside a for loop) - rust-lang/rust#160103 (Add regression test for GAT bound mismatched type error) - rust-lang/rust#160335 (dlopen offload) - rust-lang/rust#160445 (codegen: classify localized MSVC linker progress as linker_info) - rust-lang/rust#160499 (rustc_resolve: move diagnostic attribute linting to attr parsing) - rust-lang/rust#160504 (cleanup borrowck, improve c-variadic handling) - rust-lang/rust#160577 (expand: Feature gate AST-based attribute macros on expressions and statements) - rust-lang/rust#160587 (Add regression test for associated type outlives bound at call site) - rust-lang/rust#160625 (platform-support/netbsd.md: No longer mention 8.x, due to EoL.) - rust-lang/rust#160633 (delegation: fix determining wrong `FnKind` when delegation is inside const arg) - rust-lang/rust#160636 (derive(Diagnostic): link to proper docs) - rust-lang/rust#160644 (Clean up some manual debug impls) - rust-lang/rust#160649 (move naked function ui tests) - rust-lang/rust#160672 (Improve `MaybeLiveLocals`) - rust-lang/rust#160693 (Add branch config for perf. unrolling in bors) - rust-lang/rust#160696 (rustc_codegen_llvm: handle sm_101* features being an alias) - rust-lang/rust#160706 (renovate: clarify that vulnerability PRs are opened automatically)
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.
It was in rustc_resolve because there was no general attribute parsing infra back then, but now there is, so it should be there.
Also improves some spans.
This change also makes it so that unknown diagnostic attributes are removed, rather than stay as unparsed attributes.