Rollup merge of #35532 - KiChjang:e0004-follow-up, r=jonathandturner

Do not span across nodes for E0004

Part of #35233.
Fixes #35529.

r? @arielb1
This commit is contained in:
Jonathan Turner 2016-08-11 06:33:59 -07:00 committed by GitHub
commit d0922f6dc1

View File

@ -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);
},
_ => ()
}