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

len_without_is_empty will now consider multiple impl blocks #6853

Merged
merged 1 commit into from
Mar 7, 2021

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented Mar 5, 2021

fixes #1562

This also reverts #1559 as the #[allow] now works on the len method. A note has also been added to point out where the empty method is, if it exists.

changelog: len_without_is_empty will now consider multiple impl blocks
changelog: len_without_is_empty will now consider #[allow] on both the len method, and the type definition

@rust-highfive
Copy link

r? @Manishearth

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 5, 2021
clippy_lints/src/len_zero.rs Outdated Show resolved Hide resolved
@Jarcho Jarcho force-pushed the len_without_is_empty_fp branch 4 times, most recently from a585672 to 614637f Compare March 7, 2021 00:27
@bors
Copy link
Contributor

bors commented Mar 7, 2021

☔ The latest upstream changes (presumably #6823) made this pull request unmergeable. Please resolve the merge conflicts.

`len_without_is_empty` will now consider `#[allow]` on both the `len` method, and the type definition
@Jarcho Jarcho force-pushed the len_without_is_empty_fp branch from 614637f to 47145de Compare March 7, 2021 14:40
@Manishearth
Copy link
Member

@bors r+

thanks!

@bors
Copy link
Contributor

bors commented Mar 7, 2021

📌 Commit 47145de has been approved by Manishearth

@bors
Copy link
Contributor

bors commented Mar 7, 2021

⌛ Testing commit 47145de with merge e451d6e...

@bors
Copy link
Contributor

bors commented Mar 7, 2021

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

@bors bors merged commit e451d6e into rust-lang:master Mar 7, 2021
@Jarcho Jarcho deleted the len_without_is_empty_fp branch April 6, 2021 16:06
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.

len_without_is_empty lints if len and is_empty are in different impl blocks
4 participants