diff options
author | Aleksey Kladov <[email protected]> | 2021-06-13 19:44:31 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-06-13 19:44:31 +0100 |
commit | b292e1b9da39813e2739cb450c263e7502c97c8d (patch) | |
tree | 92a09f547c7d7ca41f90ebdc68f0f81ac1805560 /crates/hir/src/lib.rs | |
parent | 3478897f86cc1b3e3f83e9d4e7cedff41721fb04 (diff) |
internal: refactor missing match arms diagnostics
Diffstat (limited to 'crates/hir/src/lib.rs')
-rw-r--r-- | crates/hir/src/lib.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index fc147ade3..2e794ff4a 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -1209,11 +1209,14 @@ impl Function { | |||
1209 | if let (Some(match_expr), Some(arms)) = | 1209 | if let (Some(match_expr), Some(arms)) = |
1210 | (match_expr.expr(), match_expr.match_arm_list()) | 1210 | (match_expr.expr(), match_expr.match_arm_list()) |
1211 | { | 1211 | { |
1212 | sink.push(MissingMatchArms { | 1212 | acc.push( |
1213 | file: source_ptr.file_id, | 1213 | MissingMatchArms { |
1214 | match_expr: AstPtr::new(&match_expr), | 1214 | file: source_ptr.file_id, |
1215 | arms: AstPtr::new(&arms), | 1215 | match_expr: AstPtr::new(&match_expr), |
1216 | }) | 1216 | arms: AstPtr::new(&arms), |
1217 | } | ||
1218 | .into(), | ||
1219 | ) | ||
1217 | } | 1220 | } |
1218 | } | 1221 | } |
1219 | } | 1222 | } |