Skip to content

Port #[ignore] to the new attribute parsing infrastructure #143238

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 1 commit into
base: master
Choose a base branch
from

Conversation

JonathanBrouwer
Copy link
Contributor

Ports ignore to the new attribute parsing infrastructure for #131229 (comment)

This PR duplicates a change from #143237
Draft until that one is merged

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 30, 2025
@bors
Copy link
Collaborator

bors commented Jul 1, 2025

☔ The latest upstream changes (presumably #143287) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 1, 2025
@JonathanBrouwer JonathanBrouwer marked this pull request as ready for review July 4, 2025 10:53
@rustbot
Copy link
Collaborator

rustbot commented Jul 4, 2025

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 4, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 4, 2025

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann

Some changes occurred in compiler/rustc_attr_data_structures

cc @jdonszelmann

@JonathanBrouwer
Copy link
Contributor Author

^ Rebased on master
@rustbot ready
r? @jdonszelmann

@rustbot rustbot assigned jdonszelmann and unassigned petrochenkov Jul 4, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 4, 2025

jdonszelmann is currently at their maximum review capacity.
They may take a while to respond.

@bors
Copy link
Collaborator

bors commented Jul 5, 2025

☔ The latest upstream changes (presumably #143459) made this pull request unmergeable. Please resolve the merge conflicts.

@JonathanBrouwer
Copy link
Contributor Author

^ @jdonszelmann rebased

span: cx.attr_span,
reason: match args {
ArgParser::NoArgs => None,
ArgParser::NameValue(name_value) => name_value.value_as_str(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I guess error when it's not a string right? Not ignore it. If it didn't error before that might be a breaking change so we could do a warning first. @oli-obk could you help with some intuition for whether introducing a new error for something like this is acceptable despite being breaking?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Emitting the same lint as below wouldn't be so bad

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdonszelmann Good spot, thanks! Fixed
Also added a test case for it to the ever growing malformed-attrs.rs test

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 5, 2025
@JonathanBrouwer
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 5, 2025
Copy link
Contributor

@jdonszelmann jdonszelmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors r+ rollup

@jdonszelmann
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 5, 2025

📌 Commit 2d8ffff has been approved by jdonszelmann

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 5, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 5, 2025
…donszelmann

Port `#[ignore]` to the new attribute parsing infrastructure

Ports `ignore` to the new attribute parsing infrastructure for rust-lang#131229 (comment)

This PR duplicates a change from rust-lang#143237
Draft until that one is merged
bors added a commit that referenced this pull request Jul 5, 2025
Rollup of 6 pull requests

Successful merges:

 - #143238 (Port `#[ignore]` to the new attribute parsing infrastructure)
 - #143441 (Stop using `Key` trait unnecessarily)
 - #143478 (Miri subtree update)
 - #143486 (remove armv5te-unknown-linux-gnueabi target maintainer)
 - #143489 (Complete rustc_ast::mut_visit for spans.)
 - #143494 (Remove yields_in_scope from the scope tree.)

r? `@ghost`
`@rustbot` modify labels: rollup
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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants