Auto merge of #35485 - KiChjang:e0004-bonus, r=GuillaumeGomez

Lengthen the span label to include match and expr for E0004

Part of #35233.
Extension of #35191.

r? @GuillaumeGomez
This commit is contained in:
bors 2016-08-08 03:35:19 -07:00 committed by GitHub
commit 8a4641bbdf

View File

@ -235,7 +235,12 @@ fn check_expr(cx: &mut MatchCheckCtxt, ex: &hir::Expr) {
.flat_map(|arm| &arm.0)
.map(|pat| vec![wrap_pat(cx, &pat)])
.collect();
check_exhaustive(cx, ex.span, &matrix, source);
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);
},
_ => ()
}