Skip to content

Commit 6ce1855

Browse files
committed
Workaround rustc bug
1 parent bc2de0b commit 6ce1855

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clippy_utils/src/macros.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -859,15 +859,16 @@ impl<'tcx> FormatArgsExpn<'tcx> {
859859
pub fn find_nested(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>, expn_id: ExpnId) -> Option<Self> {
860860
for_each_expr(expr, |e| {
861861
let e_ctxt = e.span.ctxt();
862-
if e_ctxt == expr.span.ctxt() {
862+
let res = if e_ctxt == expr.span.ctxt() {
863863
ControlFlow::Continue(Descend::Yes)
864864
} else if e_ctxt.outer_expn().is_descendant_of(expn_id)
865865
&& let Some(args) = FormatArgsExpn::parse(cx, e)
866866
{
867867
ControlFlow::Break(args)
868868
} else {
869869
ControlFlow::Continue(Descend::No)
870-
}
870+
};
871+
res
871872
})
872873
}
873874

0 commit comments

Comments
 (0)