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

Clippy does not respect inline #[allow(…)] attribute #2332

Closed
antoyo opened this issue Jan 6, 2018 · 1 comment · Fixed by #4007
Closed

Clippy does not respect inline #[allow(…)] attribute #2332

antoyo opened this issue Jan 6, 2018 · 1 comment · Fixed by #4007
Labels
C-bug Category: Clippy is not doing the correct thing E-medium Call for participation: Medium difficulty level problem and requires some initial experience. T-macros Type: Issues with macros and macro expansion

Comments

@antoyo
Copy link

antoyo commented Jan 6, 2018

Hello.
It seems that clippy does not respect the inline #[allow(…)] attributes.
For instance, the following code still triggers a warning:

    #[allow(toplevel_ref_arg)]
    let ref mut x = 1234543;

Thanks to fix this issue.

@oli-obk oli-obk added E-medium Call for participation: Medium difficulty level problem and requires some initial experience. C-bug Category: Clippy is not doing the correct thing labels Jan 8, 2018
@oli-obk
Copy link
Contributor

oli-obk commented Jan 8, 2018

We allow it on some lints. Not sure what's happening with this one. It might be a rustc issue.

@phansch phansch added the T-macros Type: Issues with macros and macro expansion label Apr 4, 2018
bors added a commit that referenced this issue Apr 20, 2019
Allow allowing of toplevel_ref_arg lint

I'm not sure why some lints need the `HirId` to be able to recognize the
lint level attributes, but this commit makes the lint level attributes
work for `toplevel_ref_arg`.

Fixes #2332

changelog: Allow allowing of `toplevel_ref_arg` lint
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 E-medium Call for participation: Medium difficulty level problem and requires some initial experience. T-macros Type: Issues with macros and macro expansion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants