Skip to content

Fix attribute target checking for macro calls #145788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JonathanBrouwer
Copy link
Contributor

Fixes #145779

The system for target checking around macro calls is a little weird at the moment, I'll try to fix this in a better way in the near future but that is a bit more effort. But this PR fixes the bug, which is good enough for now.

The actual lint is still produced by the old target checking system, the new system tries to produce a lint (since MacroCalls are now specified with the Warn policy in all the places where they previously also were), but this lint is ignored since there currently is no way to produce lints from the early attribute parsing staged. I'll try to get early lints fixed in the near future as well.

r? @jdonszelmann

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 23, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 23, 2025

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 23, 2025
@JonathanBrouwer JonathanBrouwer changed the title Proper fix for macro call target Fix macro calls\ Aug 23, 2025
@JonathanBrouwer JonathanBrouwer changed the title Fix macro calls\ Fix target checking for macro calls Aug 23, 2025
@JonathanBrouwer JonathanBrouwer changed the title Fix target checking for macro calls Fix attribute target checking for macro calls Aug 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

itertools 0.9: error: '#[inline]' attribute cannot be used on macro calls
3 participants