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

Add unnecessary_clippy_cfg lint #12303

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Feb 16, 2024

Follow-up of #12292.

r? @flip1995

changelog: Add unnecessary_clippy_cfg lint

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 16, 2024
clippy_lints/src/attrs.rs Outdated Show resolved Hide resolved
tests/ui/unneedeed_clippy_cfg_attr.rs Outdated Show resolved Hide resolved
clippy_lints/src/attrs.rs Outdated Show resolved Hide resolved
clippy_lints/src/attrs.rs Outdated Show resolved Hide resolved
clippy_lints/src/attrs.rs Outdated Show resolved Hide resolved
@GuillaumeGomez GuillaumeGomez changed the title Add unneeded_clippy_cfg_attr lint Add unnecessary_clippy_cfg lint Feb 17, 2024
@GuillaumeGomez GuillaumeGomez force-pushed the unneedeed_clippy_cfg_attr branch 2 times, most recently from 545b65f to f83d3a8 Compare February 17, 2024 21:23
@GuillaumeGomez
Copy link
Member Author

Fixed CI.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 18, 2024
…=Nadrieril

Extend Level API

I need this API for rust-lang/rust-clippy#12303: I have a nested `cfg` attribute (so a `MetaItem`) and I'd like to still be able to match against all possible kind of `Level`s.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 19, 2024
…=Nadrieril

Extend Level API

I need this API for rust-lang/rust-clippy#12303: I have a nested `cfg` attribute (so a `MetaItem`) and I'd like to still be able to match against all possible kind of `Level`s.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 19, 2024
…=Nadrieril

Extend Level API

I need this API for rust-lang/rust-clippy#12303: I have a nested `cfg` attribute (so a `MetaItem`) and I'd like to still be able to match against all possible kind of `Level`s.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 19, 2024
Rollup merge of rust-lang#121230 - GuillaumeGomez:extend-level-api, r=Nadrieril

Extend Level API

I need this API for rust-lang/rust-clippy#12303: I have a nested `cfg` attribute (so a `MetaItem`) and I'd like to still be able to match against all possible kind of `Level`s.
Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, 2 NITs left.

clippy_lints/src/attrs.rs Outdated Show resolved Hide resolved
Comment on lines +1003 to +1004
// FIXME: replace with `from_symbol` once https://github.com/rust-lang/rust/pull/121230
// is merged.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR got merged. I will update this during the sync today.

tests/ui/unnecessary_clippy_cfg.rs Show resolved Hide resolved
@GuillaumeGomez
Copy link
Member Author

GuillaumeGomez commented Feb 22, 2024

Fixed nit and added new test case as suggested.

@flip1995
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Feb 22, 2024

📌 Commit cf6a14c has been approved by flip1995

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Feb 22, 2024

⌛ Testing commit cf6a14c with merge d554bca...

@bors
Copy link
Contributor

bors commented Feb 22, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing d554bca to master...

@bors bors merged commit d554bca into rust-lang:master Feb 22, 2024
8 checks passed
@GuillaumeGomez GuillaumeGomez deleted the unneedeed_clippy_cfg_attr branch February 22, 2024 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants