-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-lint_reasons`#![feature(lint_reasons)]``#![feature(lint_reasons)]`T-clippyRelevant to the Clippy team.Relevant to the Clippy team.
Description
Some lints are emitted from a from a different from the area they are linted. e.g. clippy::ptr_arg is linting from check_body, but it can be allowed from the argument (fn foo(#[allow(clippy::ptr_arg)] x: &Vec<u32>) {}).
The following lints in clippy (and probably more) lint from different check_* functions:
needless_borrowref_binding_to_refduplicate_modmultiple_inherent_implmacro_use_importsmanual_non_exhaustivesame_name_methodasync_yields_asyncawait_holding_lockawait_holding_refcellawait_holding_invalid_typedefault_numeric_fallbackptr_argredundant_clonelogic_bugnonminimal_boolboxed_localimplicit_returnneedless_returnunnecessary_unwrappanicking_unwrap
Some of these don't actually work with allow at a narrower scope either, but some of them check to see if the lint has been allowed on the target item before emitting the lint.
cc #54503
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-lint_reasons`#![feature(lint_reasons)]``#![feature(lint_reasons)]`T-clippyRelevant to the Clippy team.Relevant to the Clippy team.