diff options
| author | bors <bors@rust-lang.org> | 2016-08-08 03:35:19 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-08 03:35:19 -0700 |
| commit | 8a4641bbdf6a032c354571f867f157c906066cad (patch) | |
| tree | 078e2ce1aabbb2422df57a0fbe97c78014422fbb | |
| parent | 6153bbbe38ea1a96834b1be4dc457a698c4713b3 (diff) | |
| parent | 06133c50f7dc9362875365b3f8cc38ec4bc8d86c (diff) | |
| download | rust-8a4641bbdf6a032c354571f867f157c906066cad.tar.gz rust-8a4641bbdf6a032c354571f867f157c906066cad.zip | |
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
| -rw-r--r-- | src/librustc_const_eval/check_match.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/librustc_const_eval/check_match.rs b/src/librustc_const_eval/check_match.rs index 2fe4ae627c1..599e3ec871a 100644 --- a/src/librustc_const_eval/check_match.rs +++ b/src/librustc_const_eval/check_match.rs @@ -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); }, _ => () } |
