Skip to content

Commit

Permalink
Auto merge of #35485 - KiChjang:e0004-bonus, r=GuillaumeGomez
Browse files Browse the repository at this point in the history
Lengthen the span label to include match and expr for E0004

Part of #35233.
Extension of #35191.

r? @GuillaumeGomez
  • Loading branch information
bors authored Aug 8, 2016
2 parents 6153bbb + 06133c5 commit 8a4641b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/librustc_const_eval/check_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
_ => ()
}
Expand Down

0 comments on commit 8a4641b

Please sign in to comment.