We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38236a7 commit 817dc11Copy full SHA for 817dc11
clippy_utils/src/macros.rs
@@ -859,15 +859,16 @@ impl<'tcx> FormatArgsExpn<'tcx> {
859
pub fn find_nested(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>, expn_id: ExpnId) -> Option<Self> {
860
for_each_expr(expr, |e| {
861
let e_ctxt = e.span.ctxt();
862
- if e_ctxt == expr.span.ctxt() {
+ let res = if e_ctxt == expr.span.ctxt() {
863
ControlFlow::Continue(Descend::Yes)
864
} else if e_ctxt.outer_expn().is_descendant_of(expn_id)
865
&& let Some(args) = FormatArgsExpn::parse(cx, e)
866
{
867
ControlFlow::Break(args)
868
} else {
869
ControlFlow::Continue(Descend::No)
870
- }
+ };
871
+ res
872
})
873
}
874
0 commit comments