This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 11use clippy_utils:: diagnostics:: span_lint_and_help;
22use clippy_utils:: ty:: { implements_trait, is_must_use_ty, match_type} ;
33use clippy_utils:: { is_from_proc_macro, is_must_use_func_call, paths} ;
4- use rustc_hir:: { Local , PatKind } ;
4+ use rustc_hir:: { Local , LocalSource , PatKind } ;
55use rustc_lint:: { LateContext , LateLintPass } ;
66use rustc_middle:: lint:: in_external_macro;
77use rustc_middle:: ty:: { GenericArgKind , IsSuggestable } ;
@@ -139,7 +139,8 @@ const SYNC_GUARD_PATHS: [&[&str]; 3] = [
139139
140140impl < ' tcx > LateLintPass < ' tcx > for LetUnderscore {
141141 fn check_local ( & mut self , cx : & LateContext < ' tcx > , local : & Local < ' tcx > ) {
142- if !in_external_macro ( cx. tcx . sess , local. span )
142+ if matches ! ( local. source, LocalSource :: Normal )
143+ && !in_external_macro ( cx. tcx . sess , local. span )
143144 && let PatKind :: Wild = local. pat . kind
144145 && let Some ( init) = local. init
145146 {
Original file line number Diff line number Diff line change @@ -73,3 +73,5 @@ fn main() {
7373 #[ allow( clippy:: let_underscore_untyped) ]
7474 let _ = a ( ) ;
7575}
76+
77+ async fn dont_lint_async_prototype ( _: u8 ) { }
You can’t perform that action at this time.
0 commit comments