Skip to content

Commit

Permalink
Workaround rustc bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarcho committed Oct 2, 2022
1 parent 38236a7 commit 26bb366
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions clippy_utils/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 26bb366

Please sign in to comment.