Skip to content

Commit 26bb366

Browse files
committed
Workaround rustc bug
1 parent 38236a7 commit 26bb366

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

clippy_utils/src/macros.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -861,10 +861,12 @@ impl<'tcx> FormatArgsExpn<'tcx> {
861861
let e_ctxt = e.span.ctxt();
862862
if e_ctxt == expr.span.ctxt() {
863863
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)
864+
} else if e_ctxt.outer_expn().is_descendant_of(expn_id) {
865+
if let Some(args) = FormatArgsExpn::parse(cx, e) {
866+
ControlFlow::Break(args)
867+
} else {
868+
ControlFlow::Continue(Descend::No)
869+
}
868870
} else {
869871
ControlFlow::Continue(Descend::No)
870872
}

0 commit comments

Comments
 (0)