Skip to content

Trigger unused_attribute lint on #[cfg_attr($pred,)] - #62047

Merged
bors merged 2 commits into
rust-lang:masterfrom
Centril:cfg-attr-empty-lint
Jun 23, 2019
Merged

Trigger unused_attribute lint on #[cfg_attr($pred,)]#62047
bors merged 2 commits into
rust-lang:masterfrom
Centril:cfg-attr-empty-lint

Conversation

@Centril

Copy link
Copy Markdown
Contributor

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

Closes#54881.

r? @estebank

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

@estebankestebank 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.

R=me

--> $DIR/cfg-attr-empty-is-unused.rs:10:1
|
LL | #[cfg_attr(TRUE,)]
| ^^^^^^^^^^^^^^^^^^

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.

Why does this one trigger?

Copy link
Copy Markdown
ContributorAuthor

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

@bors r+ rollup

@bors

bors commented Jun 22, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit af710c9 has been approved by estebank

@borsbors 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).
Closesrust-lang#54881.
r? @estebank
@CentrilCentril mentioned this pull request 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).
Closesrust-lang#54881.
r? @estebank
@CentrilCentril mentioned this pull request Jun 22, 2019
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:masterJun 23, 2019
@Centril
Centril deleted the cfg-attr-empty-lint branch June 23, 2019 03:13
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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

@Centril@estebank@bors@rust-highfive