@@ -8,7 +8,7 @@ use clippy_utils::{
8
8
use core:: iter;
9
9
use rustc_errors:: Applicability ;
10
10
use rustc_hir:: intravisit;
11
- use rustc_hir:: { BinOpKind , Block , Expr , ExprKind , HirId , QPath , Stmt , StmtKind } ;
11
+ use rustc_hir:: { BinOpKind , Block , Expr , ExprKind , HirId , Stmt , StmtKind } ;
12
12
use rustc_lint:: { LateContext , LateLintPass } ;
13
13
use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
14
14
use rustc_span:: hygiene:: walk_chain;
@@ -389,13 +389,11 @@ fn contains_acceptable_macro(cx: &LateContext<'_>, block: &Block<'_>) -> bool {
389
389
}
390
390
391
391
fn acceptable_macro ( cx : & LateContext < ' _ > , expr : & Expr < ' _ > ) -> bool {
392
- if let ExprKind :: Call ( call_expr, _) = expr. kind
393
- && let ExprKind :: Path ( QPath :: Resolved ( None , path) ) = call_expr. kind
394
- && macro_backtrace ( path. span ) . last ( ) . map_or ( false , |macro_call|
395
- matches ! (
396
- & cx. tcx. get_diagnostic_name( macro_call. def_id) ,
397
- Some ( sym:: todo_macro | sym:: unimplemented_macro)
398
- )
392
+ if macro_backtrace ( expr. span ) . last ( ) . map_or ( false , |macro_call|
393
+ matches ! (
394
+ & cx. tcx. get_diagnostic_name( macro_call. def_id) ,
395
+ Some ( sym:: todo_macro | sym:: unimplemented_macro)
396
+ )
399
397
) {
400
398
return true ;
401
399
}
0 commit comments