Do not span across nodes for E0004
This commit is contained in:
parent
b42a384a80
commit
0a98d73136
1 changed files with 1 additions and 6 deletions
|
|
@ -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);
|
||||
},
|
||||
_ => ()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue