Skip to content
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

Merged
merged 2 commits into from
Jun 23, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jun 22, 2019

Lint on #[cfg_attr($pred,)] as decided in #54881 (comment).

Closes #54881.

r? @estebank

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 22, 2019
Copy link
Contributor

@estebank estebank left a 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,)]
| ^^^^^^^^^^^^^^^^^^
Copy link
Contributor

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?

Copy link
Contributor Author

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. :)

@estebank
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 22, 2019

📌 Commit af710c9 has been approved by estebank

@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 Jun 22, 2019
Centril added a commit to Centril/rust that referenced this pull request Jun 22, 2019
…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
Centril added a commit to Centril/rust that referenced this pull request Jun 22, 2019
…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
bors added a commit that referenced this pull request Jun 23, 2019
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
@bors bors merged commit af710c9 into rust-lang:master Jun 23, 2019
@Centril Centril deleted the cfg-attr-empty-lint branch June 23, 2019 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issue for RFC 2539, "#[cfg_attr] expanding to multiple attributes"
4 participants