Skip to content

fix(lints): Improve ill_formed_attribute_input with better help message#154722

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
JayanAXHF:fix/update-ignore-error-message
Apr 6, 2026
Merged

fix(lints): Improve ill_formed_attribute_input with better help message#154722
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
JayanAXHF:fix/update-ignore-error-message

Conversation

@JayanAXHF
Copy link
Copy Markdown
Member

@JayanAXHF JayanAXHF commented Apr 2, 2026

View all comments

Add a better help message to ill_formed_attribute_input for the cases where it matches the usage of #![allow].

For further details see #154667

closes #154667

cc: @Zalathar

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 2, 2026

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

@rustbot rustbot added 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. labels Apr 2, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 2, 2026

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 69 candidates
  • Random selection from 12 candidates

@jdonszelmann
Copy link
Copy Markdown
Contributor

r? me

@rustbot rustbot assigned jdonszelmann and unassigned petrochenkov Apr 2, 2026
@jdonszelmann
Copy link
Copy Markdown
Contributor

This change seems to have no tests. Did no tests change or do we not have a test for this new behavior yet?

@jdonszelmann
Copy link
Copy Markdown
Contributor

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 2, 2026
@JayanAXHF JayanAXHF force-pushed the fix/update-ignore-error-message branch from d60f71d to 94b8874 Compare April 2, 2026 18:10
@JayanAXHF
Copy link
Copy Markdown
Member Author

Oops forgot about that. @jdonszelmann I've added a test for this, lmk if there are any more changes to be made

@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 Apr 2, 2026
Copy link
Copy Markdown
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.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 2, 2026

📌 Commit 94b8874 has been approved by jdonszelmann

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Apr 2, 2026
rust-bors bot pushed a commit that referenced this pull request Apr 2, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #154444 (rustdoc ICE fix: When collecting `Deref` impls with their targets, skip the negative ones)
 - #154590 (Make #[cfg] suggest any or all on #[cfg(a, b)])
 - #154691 (core: Update the feature gate on `TryFrom<integer> for bool`)
 - #154697 (rustdoc: fix href of extern crates in search results)

Failed merges:

 - #154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message)
rust-bors bot pushed a commit that referenced this pull request Apr 3, 2026
Rollup of 6 pull requests

Successful merges:

 - #154444 (rustdoc ICE fix: When collecting `Deref` impls with their targets, skip the negative ones)
 - #154590 (Make #[cfg] suggest any or all on #[cfg(a, b)])
 - #154691 (core: Update the feature gate on `TryFrom<integer> for bool`)
 - #154697 (rustdoc: fix href of extern crates in search results)
 - #154728 (rustdoc: Improve internal function name)
 - #154732 (fix(std): avoid AT_MINSIGSTKSZ on uclibc targets)

Failed merges:

 - #154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message)
@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 3, 2026
@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 5, 2026

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.

@rust-log-analyzer

This comment has been minimized.

@JayanAXHF JayanAXHF force-pushed the fix/update-ignore-error-message branch from 62f8cca to 65b88ea Compare April 5, 2026 08:24
@JayanAXHF
Copy link
Copy Markdown
Member 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 Apr 5, 2026
ArgParser::List(_) => {
cx.adcx().warn_ill_formed_attribute_input(ILL_FORMED_ATTRIBUTE_INPUT);
ArgParser::List(list) => {
let help = list.single().and_then(|item| item.meta_item()).and_then(|item| {
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.

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

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 5, 2026

📌 Commit 65b88ea has been approved by jdonszelmann

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Apr 5, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 5, 2026
…message, r=jdonszelmann

fix(lints): Improve `ill_formed_attribute_input` with better help message

Add a better help message to `ill_formed_attribute_input` for the cases where it matches the usage of `#![allow]`.

For further details see rust-lang#154667

closes rust-lang#154667

cc: @Zalathar
rust-bors bot pushed a commit that referenced this pull request Apr 5, 2026
…uwer

Rollup of 3 pull requests

Successful merges:

 - #154657 (Fix pattern assignment suggestions for uninitialized bindings)
 - #154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message)
 - #154808 (Post-attribute ports cleanup pt. 1)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 5, 2026
…message, r=jdonszelmann

fix(lints): Improve `ill_formed_attribute_input` with better help message

Add a better help message to `ill_formed_attribute_input` for the cases where it matches the usage of `#![allow]`.

For further details see rust-lang#154667

closes rust-lang#154667

cc: @Zalathar
rust-bors bot pushed a commit that referenced this pull request Apr 5, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #153440 (Various LTO cleanups)
 - #154561 (Suggest similar keyword when visibility is not followed by an item)
 - #154657 (Fix pattern assignment suggestions for uninitialized bindings)
 - #154717 (Fix ICE in unsafe binder discriminant helpers)
 - #154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message)
 - #154808 (Post-attribute ports cleanup pt. 1)
 - #154849 (Promote `char::is_case_ignorable` from perma-unstable to unstable)
 - #154850 (ast_validation: scalable vectors okay for rustdoc)
rust-bors bot pushed a commit that referenced this pull request Apr 5, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #153440 (Various LTO cleanups)
 - #154561 (Suggest similar keyword when visibility is not followed by an item)
 - #154657 (Fix pattern assignment suggestions for uninitialized bindings)
 - #154717 (Fix ICE in unsafe binder discriminant helpers)
 - #154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message)
 - #154808 (Post-attribute ports cleanup pt. 1)
 - #154849 (Promote `char::is_case_ignorable` from perma-unstable to unstable)
 - #154850 (ast_validation: scalable vectors okay for rustdoc)
rust-bors bot pushed a commit that referenced this pull request Apr 6, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #153440 (Various LTO cleanups)
 - #154561 (Suggest similar keyword when visibility is not followed by an item)
 - #154657 (Fix pattern assignment suggestions for uninitialized bindings)
 - #154717 (Fix ICE in unsafe binder discriminant helpers)
 - #154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message)
 - #154808 (Post-attribute ports cleanup pt. 1)
 - #154849 (Promote `char::is_case_ignorable` from perma-unstable to unstable)
 - #154850 (ast_validation: scalable vectors okay for rustdoc)
@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@bors try jobs=i686-msvc-2

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Apr 6, 2026
…<try>

fix(lints): Improve `ill_formed_attribute_input` with better help message


try-job: i686-msvc-2
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 6, 2026

☀️ Try build successful (CI)
Build commit: 2e626a4 (2e626a408c62ecc6c3dc3d5f918978fde8fbc685, parent: 9602bda1dd0c1bbf5787e398385bbac81fd532f8)

rust-bors bot pushed a commit that referenced this pull request Apr 6, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #153440 (Various LTO cleanups)
 - #151899 (Constify fold, reduce and last for iterator)
 - #154561 (Suggest similar keyword when visibility is not followed by an item)
 - #154657 (Fix pattern assignment suggestions for uninitialized bindings)
 - #154717 (Fix ICE in unsafe binder discriminant helpers)
 - #154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message)
 - #154777 (`#[cfg]`: suggest alternative `target_` name when the value does not match)
 - #154849 (Promote `char::is_case_ignorable` from perma-unstable to unstable)
 - #154850 (ast_validation: scalable vectors okay for rustdoc)
@rust-bors rust-bors bot merged commit 9a9ea5d into rust-lang:main Apr 6, 2026
12 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Apr 6, 2026
rust-timer added a commit that referenced this pull request Apr 6, 2026
Rollup merge of #154722 - JayanAXHF:fix/update-ignore-error-message, r=jdonszelmann

fix(lints): Improve `ill_formed_attribute_input` with better help message

Add a better help message to `ill_formed_attribute_input` for the cases where it matches the usage of `#![allow]`.

For further details see #154667

closes #154667

cc: @Zalathar
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Apr 7, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#153440 (Various LTO cleanups)
 - rust-lang/rust#151899 (Constify fold, reduce and last for iterator)
 - rust-lang/rust#154561 (Suggest similar keyword when visibility is not followed by an item)
 - rust-lang/rust#154657 (Fix pattern assignment suggestions for uninitialized bindings)
 - rust-lang/rust#154717 (Fix ICE in unsafe binder discriminant helpers)
 - rust-lang/rust#154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message)
 - rust-lang/rust#154777 (`#[cfg]`: suggest alternative `target_` name when the value does not match)
 - rust-lang/rust#154849 (Promote `char::is_case_ignorable` from perma-unstable to unstable)
 - rust-lang/rust#154850 (ast_validation: scalable vectors okay for rustdoc)
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.

#[ignore(lint_name)] errors should suggest using #[allow(lint_name)] instead

6 participants