-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Trigger unused_attribute
lint on #[cfg_attr($pred,)]
#62047
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
R=me
--> $DIR/cfg-attr-empty-is-unused.rs:10:1 | ||
| | ||
LL | #[cfg_attr(TRUE,)] | ||
| ^^^^^^^^^^^^^^^^^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this one trigger?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whether it matches or not, it still has no effect because the list of attributes to expand to is empty. :)
@bors r+ rollup |
📌 Commit af710c9 has been approved by |
…bank Trigger `unused_attribute` lint on `#[cfg_attr($pred,)]` Lint on `#[cfg_attr($pred,)]` as decided in rust-lang#54881 (comment). Closes rust-lang#54881. r? @estebank
…bank Trigger `unused_attribute` lint on `#[cfg_attr($pred,)]` Lint on `#[cfg_attr($pred,)]` as decided in rust-lang#54881 (comment). Closes rust-lang#54881. r? @estebank
Rollup of 5 pull requests Successful merges: - #62047 (Trigger `unused_attribute` lint on `#[cfg_attr($pred,)]`) - #62049 (Fix one missing `dyn`.) - #62051 (Lint empty `#[derive()]` as unused attribute.) - #62057 (Deny explicit_outlives_requirements in the compiler) - #62068 (Fix meta-variable binding errors in macros) Failed merges: r? @ghost
Lint on
#[cfg_attr($pred,)]
as decided in #54881 (comment).Closes #54881.
r? @estebank