Skip to content

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

Merged
bors merged 1 commit into
rust-lang:masterfrom
JonathanBrouwer:ignore_parser
Jul 6, 2025
Merged

Port #[ignore] to the new attribute parsing infrastructure#143238
bors merged 1 commit into
rust-lang:masterfrom
JonathanBrouwer:ignore_parser

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
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

bors commented Jul 1, 2025

Copy link
Copy Markdown
Collaborator

☔ 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

rustbot commented Jul 4, 2025

Copy link
Copy Markdown
Collaborator

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

rustbot commented Jul 4, 2025

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Contributor Author

^ Rebased on master
@rustbot ready
r? @jdonszelmann

@rustbot rustbot assigned jdonszelmann and unassigned petrochenkov Jul 4, 2025
@rustbot

rustbot commented Jul 4, 2025

Copy link
Copy Markdown
Collaborator

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

@bors

bors commented Jul 5, 2025

Copy link
Copy Markdown
Collaborator

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

@JonathanBrouwer

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
@JonathanBrouwer

Copy link
Copy Markdown
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

@jdonszelmann jdonszelmann left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Jul 5, 2025

Copy link
Copy Markdown
Collaborator

📌 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
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
bors added a commit that referenced this pull request Jul 6, 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
@bors bors merged commit 9a921a3 into rust-lang:master Jul 6, 2025
11 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 6, 2025
rust-timer added a commit that referenced this pull request Jul 6, 2025
Rollup merge of #143238 - JonathanBrouwer:ignore_parser, r=jdonszelmann

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

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

This PR duplicates a change from #143237
Draft until that one is merged
github-actions Bot pushed a commit to devnexen/miri that referenced this pull request Jul 7, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#143238 (Port `#[ignore]` to the new attribute parsing infrastructure)
 - rust-lang/rust#143441 (Stop using `Key` trait unnecessarily)
 - rust-lang/rust#143478 (Miri subtree update)
 - rust-lang/rust#143486 (remove armv5te-unknown-linux-gnueabi target maintainer)
 - rust-lang/rust#143489 (Complete rustc_ast::mut_visit for spans.)
 - rust-lang/rust#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