Skip to content

Commit

Permalink
Workaround #43081
Browse files Browse the repository at this point in the history
  • Loading branch information
HMPerson1 committed Dec 21, 2018
1 parent 88564b7 commit 05ae391
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions clippy_lints/src/formatting.rs
Expand Up @@ -156,6 +156,11 @@ fn check_else(cx: &EarlyContext<'_>, expr: &ast::Expr) {
&& !differing_macro_contexts(then.span, else_.span)
&& !in_macro(then.span)
{
// workaround for rust-lang/rust#43081
if expr.span.lo().0 == 0 && expr.span.hi().0 == 0 {
return;
}

// this will be a span from the closing ‘}’ of the “then” block (excluding) to
// the
// “if” of the “else if” block (excluding)
Expand Down

0 comments on commit 05ae391

Please sign in to comment.