Skip to content

Commit

Permalink
Rollup merge of rust-lang#35532 - KiChjang:e0004-follow-up, r=jonatha…
Browse files Browse the repository at this point in the history
…ndturner

Do not span across nodes for E0004

Part of rust-lang#35233.
Fixes rust-lang#35529.

r? @arielb1
  • Loading branch information
Jonathan Turner authored Aug 11, 2016
2 parents c7513d7 + 0a98d73 commit d0922f6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/librustc_const_eval/check_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,7 @@ fn check_expr(cx: &mut MatchCheckCtxt, ex: &hir::Expr) {
.flat_map(|arm| &arm.0)
.map(|pat| vec![wrap_pat(cx, &pat)])
.collect();
let match_span = Span {
lo: ex.span.lo,
hi: scrut.span.hi,
expn_id: ex.span.expn_id
};
check_exhaustive(cx, match_span, &matrix, source);
check_exhaustive(cx, scrut.span, &matrix, source);
},
_ => ()
}
Expand Down

0 comments on commit d0922f6

Please sign in to comment.