mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Rollup merge of #35532 - KiChjang:e0004-follow-up, r=jonathandturner
Do not span across nodes for E0004 Part of #35233. Fixes #35529. r? @arielb1
This commit is contained in:
commit
d0922f6dc1
@ -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…
Reference in New Issue
Block a user