diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/hir_ty/src/diagnostics/pattern/deconstruct_pat.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/hir_ty/src/diagnostics/pattern/deconstruct_pat.rs b/crates/hir_ty/src/diagnostics/pattern/deconstruct_pat.rs index 393d99997..d3513c406 100644 --- a/crates/hir_ty/src/diagnostics/pattern/deconstruct_pat.rs +++ b/crates/hir_ty/src/diagnostics/pattern/deconstruct_pat.rs | |||
@@ -811,8 +811,13 @@ impl Fields { | |||
811 | pats: impl IntoIterator<Item = Pat>, | 811 | pats: impl IntoIterator<Item = Pat>, |
812 | ) -> Self { | 812 | ) -> Self { |
813 | let pats = { | 813 | let pats = { |
814 | let mut arena = cx.pattern_arena.borrow_mut(); | 814 | let tys: SmallVec<[Ty; 2]> = match self { |
815 | pats.into_iter().map(move |pat| /* arena.alloc(pat) */ todo!()).collect() | 815 | Fields::Vec(pats) => pats.iter().copied().map(|pat| cx.type_of(pat)).collect(), |
816 | }; | ||
817 | pats.into_iter() | ||
818 | .zip(tys.into_iter()) | ||
819 | .map(move |(pat, ty)| cx.alloc_pat(pat, &ty)) | ||
820 | .collect() | ||
816 | }; | 821 | }; |
817 | 822 | ||
818 | match self { | 823 | match self { |