Skip to content

Commit 0a98d73

Browse files
committed
Do not span across nodes for E0004
1 parent b42a384 commit 0a98d73

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/librustc_const_eval/check_match.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,7 @@ fn check_expr(cx: &mut MatchCheckCtxt, ex: &hir::Expr) {
235235
.flat_map(|arm| &arm.0)
236236
.map(|pat| vec![wrap_pat(cx, &pat)])
237237
.collect();
238-
let match_span = Span {
239-
lo: ex.span.lo,
240-
hi: scrut.span.hi,
241-
expn_id: ex.span.expn_id
242-
};
243-
check_exhaustive(cx, match_span, &matrix, source);
238+
check_exhaustive(cx, scrut.span, &matrix, source);
244239
},
245240
_ => ()
246241
}

0 commit comments

Comments
 (0)