diff options
Diffstat (limited to 'crates/hir_def/src/body')
-rw-r--r-- | crates/hir_def/src/body/lower.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/crates/hir_def/src/body/lower.rs b/crates/hir_def/src/body/lower.rs index 978c3a324..4492a7d77 100644 --- a/crates/hir_def/src/body/lower.rs +++ b/crates/hir_def/src/body/lower.rs | |||
@@ -932,10 +932,16 @@ impl ExprCollector<'_> { | |||
932 | let inner = self.collect_pat_opt(boxpat.pat()); | 932 | let inner = self.collect_pat_opt(boxpat.pat()); |
933 | Pat::Box { inner } | 933 | Pat::Box { inner } |
934 | } | 934 | } |
935 | // FIXME: implement | 935 | ast::Pat::ConstBlockPat(const_block_pat) => { |
936 | ast::Pat::RangePat(_) | ast::Pat::MacroPat(_) | ast::Pat::ConstBlockPat(_) => { | 936 | if let Some(expr) = const_block_pat.block_expr() { |
937 | Pat::Missing | 937 | let expr_id = self.collect_block(expr); |
938 | Pat::ConstBlock(expr_id) | ||
939 | } else { | ||
940 | Pat::Missing | ||
941 | } | ||
938 | } | 942 | } |
943 | // FIXME: implement | ||
944 | ast::Pat::RangePat(_) | ast::Pat::MacroPat(_) => Pat::Missing, | ||
939 | }; | 945 | }; |
940 | let ptr = AstPtr::new(&pat); | 946 | let ptr = AstPtr::new(&pat); |
941 | self.alloc_pat(pattern, Either::Left(ptr)) | 947 | self.alloc_pat(pattern, Either::Left(ptr)) |