Workaround rustc bug

This commit is contained in:
Jason Newcomb 2022-10-02 17:11:10 -04:00
parent 38236a7135
commit 26bb36636c

View file

@ -861,10 +861,12 @@ impl<'tcx> FormatArgsExpn<'tcx> {
let e_ctxt = e.span.ctxt();
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)
{
ControlFlow::Break(args)
} else if e_ctxt.outer_expn().is_descendant_of(expn_id) {
if let Some(args) = FormatArgsExpn::parse(cx, e) {
ControlFlow::Break(args)
} else {
ControlFlow::Continue(Descend::No)
}
} else {
ControlFlow::Continue(Descend::No)
}