mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-17 06:26:55 +00:00
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
This commit is contained in:
commit
8a4641bbdf
@ -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);
|
||||
},
|
||||
_ => ()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user