mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Refactor hir::diagnostics::MissingMatchArms fields, better naming
This commit is contained in:
parent
8f189f62c6
commit
5e8c586f3b
3 changed files with 7 additions and 8 deletions
|
@ -1628,11 +1628,13 @@ impl DefWithBody {
|
|||
if let ast::Expr::MatchExpr(match_expr) =
|
||||
&source_ptr.value.to_node(&root)
|
||||
{
|
||||
if let Some(match_expr) = match_expr.expr() {
|
||||
if let Some(scrut_expr) = match_expr.expr() {
|
||||
acc.push(
|
||||
MissingMatchArms {
|
||||
file: source_ptr.file_id,
|
||||
match_expr: AstPtr::new(&match_expr),
|
||||
scrutinee_expr: InFile::new(
|
||||
source_ptr.file_id,
|
||||
AstPtr::new(&scrut_expr),
|
||||
),
|
||||
uncovered_patterns,
|
||||
}
|
||||
.into(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue