@@ -8,7 +8,7 @@ use clippy_utils::{
88use core:: iter;
99use rustc_errors:: Applicability ;
1010use 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 } ;
1212use rustc_lint:: { LateContext , LateLintPass } ;
1313use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
1414use rustc_span:: hygiene:: walk_chain;
@@ -389,13 +389,11 @@ fn contains_acceptable_macro(cx: &LateContext<'_>, block: &Block<'_>) -> bool {
389389}
390390
391391fn 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+ )
399397 ) {
400398 return true ;
401399 }
0 commit comments