internal: refactor missing match arms diagnostics

This commit is contained in:
Aleksey Kladov 2021-06-13 21:44:31 +03:00
parent 3478897f86
commit b292e1b9da
4 changed files with 935 additions and 930 deletions

View file

@ -1209,11 +1209,14 @@ impl Function {
if let (Some(match_expr), Some(arms)) =
(match_expr.expr(), match_expr.match_arm_list())
{
sink.push(MissingMatchArms {
file: source_ptr.file_id,
match_expr: AstPtr::new(&match_expr),
arms: AstPtr::new(&arms),
})
acc.push(
MissingMatchArms {
file: source_ptr.file_id,
match_expr: AstPtr::new(&match_expr),
arms: AstPtr::new(&arms),
}
.into(),
)
}
}
}