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 requires allow in the wrong place. #1532

Closed
sgrif opened this issue Feb 12, 2017 · 2 comments
Closed

len_without_is_empty requires allow in the wrong place. #1532

sgrif opened this issue Feb 12, 2017 · 2 comments
Labels
C-bug Category: Clippy is not doing the correct thing good-first-issue These issues are a good way to get started with Clippy

Comments

@sgrif
Copy link

sgrif commented Feb 12, 2017

When a struct fails the len_without_is_empty lint, the error span shows the definition of the len method. However, adding #[allow(len_without_is_empty)] on the method does nothing. Clippy wants it on the struct itself. I'd expect that the place to add #[allow] is always on the span shown in the error.

@Manishearth Manishearth added good-first-issue These issues are a good way to get started with Clippy C-bug Category: Clippy is not doing the correct thing labels Feb 12, 2017
@theotherphil
Copy link
Contributor

I'm new to clippy, but I'd like to give this a go.

@mcarton
Copy link
Member

mcarton commented Feb 15, 2017

@theotherphil Great! Don't hesitate to open a PR even if it's not finished or to ask questions if you have any problem!

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 good-first-issue These issues are a good way to get started with Clippy
Projects
None yet
Development

No branches or pull requests

4 participants