Cleanups around attribute target checking#157120
Open
JonathanBrouwer wants to merge 2 commits into
Open
Conversation
Collaborator
|
Some changes occurred in compiler/rustc_attr_parsing |
mejrs
approved these changes
May 29, 2026
| // people about accidentally not using them on the crate. | ||
| if let &AllowedTargets::AllowList(&[Allow(Target::Crate)]) = allowed_targets { | ||
| Self::check_crate_level(target, cx); | ||
| Self::check_crate_level(cx.target, cx); |
Contributor
There was a problem hiding this comment.
Looks like this function can just take cx 🤷♂️. For another day, I suppose.
Contributor
Author
There was a problem hiding this comment.
Nah you're so right, I'll fix it
Contributor
a39011e to
4f2faec
Compare
Contributor
|
This pull request was unapproved. |
Contributor
Author
|
@bors r=mejrs |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
May 29, 2026
…ng, r=mejrs Cleanups around attribute target checking This is in preparation for a new approach I'm trying for rust-lang#156569 So r? @mejrs
rust-bors Bot
pushed a commit
that referenced
this pull request
May 29, 2026
…uwer Rollup of 16 pull requests Successful merges: - #149195 (resolve: Partially convert `ambiguous_glob_imports` lint into a hard error) - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering) - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`) - #157053 (Eagerly resolve delegations in late resolution) - #157068 (NVPTX: Remove the unstable ptx linker flavor) - #157076 (Various proc-macro related code cleanups) - #157106 (add ABI check logic for wasm) - #154835 (std::offload sharedmem) - #157065 (Stabilize `Path::is_empty`) - #157088 (Improve suggestions for malformed deprecated attribute) - #157098 (Add the `clflushopt` x86 target feature) - #157103 (Add reproducibly failing tests for parallel frontend) - #157111 (Update target maintainer for x86_64-unknown-linux-none) - #157116 (rustc_public: add `with_cx()` to `CompilerInterface`) - #157119 (ast_lowering: Simplify `resolve_pin_drop_sugar_impl_item`) - #157120 (Cleanups around attribute target checking) Failed merges: - #157100 (Some more per owner things)
rust-bors Bot
pushed a commit
that referenced
this pull request
May 29, 2026
…uwer Rollup of 16 pull requests Successful merges: - #149195 (resolve: Partially convert `ambiguous_glob_imports` lint into a hard error) - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering) - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`) - #157053 (Eagerly resolve delegations in late resolution) - #157068 (NVPTX: Remove the unstable ptx linker flavor) - #157076 (Various proc-macro related code cleanups) - #157106 (add ABI check logic for wasm) - #154835 (std::offload sharedmem) - #157065 (Stabilize `Path::is_empty`) - #157088 (Improve suggestions for malformed deprecated attribute) - #157098 (Add the `clflushopt` x86 target feature) - #157103 (Add reproducibly failing tests for parallel frontend) - #157111 (Update target maintainer for x86_64-unknown-linux-none) - #157116 (rustc_public: add `with_cx()` to `CompilerInterface`) - #157119 (ast_lowering: Simplify `resolve_pin_drop_sugar_impl_item`) - #157120 (Cleanups around attribute target checking) Failed merges: - #157100 (Some more per owner things)
rust-bors Bot
pushed a commit
that referenced
this pull request
May 29, 2026
…uwer Rollup of 16 pull requests Successful merges: - #149195 (resolve: Partially convert `ambiguous_glob_imports` lint into a hard error) - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering) - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`) - #157053 (Eagerly resolve delegations in late resolution) - #157068 (NVPTX: Remove the unstable ptx linker flavor) - #157076 (Various proc-macro related code cleanups) - #157106 (add ABI check logic for wasm) - #154835 (std::offload sharedmem) - #157065 (Stabilize `Path::is_empty`) - #157088 (Improve suggestions for malformed deprecated attribute) - #157098 (Add the `clflushopt` x86 target feature) - #157103 (Add reproducibly failing tests for parallel frontend) - #157111 (Update target maintainer for x86_64-unknown-linux-none) - #157116 (rustc_public: add `with_cx()` to `CompilerInterface`) - #157119 (ast_lowering: Simplify `resolve_pin_drop_sugar_impl_item`) - #157120 (Cleanups around attribute target checking) Failed merges: - #157100 (Some more per owner things)
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.
This is in preparation for a new approach I'm trying for #156569
So r? @mejrs