diff --git a/clippy_utils/src/macros.rs b/clippy_utils/src/macros.rs index c0b87cd175ec..7fed140a6489 100644 --- a/clippy_utils/src/macros.rs +++ b/clippy_utils/src/macros.rs @@ -859,7 +859,7 @@ impl<'tcx> FormatArgsExpn<'tcx> { pub fn find_nested(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>, expn_id: ExpnId) -> Option { for_each_expr(expr, |e| { let e_ctxt = e.span.ctxt(); - if e_ctxt == expr.span.ctxt() { + let res = if e_ctxt == expr.span.ctxt() { ControlFlow::Continue(Descend::Yes) } else if e_ctxt.outer_expn().is_descendant_of(expn_id) && let Some(args) = FormatArgsExpn::parse(cx, e) @@ -867,7 +867,8 @@ impl<'tcx> FormatArgsExpn<'tcx> { ControlFlow::Break(args) } else { ControlFlow::Continue(Descend::No) - } + }; + res }) }