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 lints if len and is_empty are in different impl blocks #1562

Closed
oli-obk opened this issue Feb 21, 2017 · 0 comments · Fixed by #6853
Closed

len_without_is_empty lints if len and is_empty are in different impl blocks #1562

oli-obk opened this issue Feb 21, 2017 · 0 comments · Fixed by #6853
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Feb 21, 2017

The following code triggers the len_without_is_empty lint.

impl Foo {
    fn len(&self) -> usize { 0 }
}
impl Foo {
    fn is_empty(&self) -> bool { true }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants