diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-23 10:37:30 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-23 10:37:30 +0000 |
commit | fd1fcf2c2e90ab04103a6aa9d033ec64dcc8d555 (patch) | |
tree | 31b5facb6a7a24a113e32fd6afa76f326ab8e3a2 /crates/hir_def/src | |
parent | b0d81d98dbc4cea6920793c7e2952a0d38ec543e (diff) | |
parent | bdd8c0b68f097c7d1a65a5b85b94f0a79affa506 (diff) |
Merge #7010
7010: Update ungrammar for const block patterns r=matklad a=Veykril
Fixes #6848
Adds const blocks and const block patterns to the AST and parses them.
Blocked on https://github.com/rust-analyzer/ungrammar/pull/17/, will merge that PR there once this one gets the OK so I can remove the local ungrammar dependency path and fix the Cargo.lock.
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/hir_def/src')
-rw-r--r-- | crates/hir_def/src/body/lower.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/hir_def/src/body/lower.rs b/crates/hir_def/src/body/lower.rs index 0f404be1b..978c3a324 100644 --- a/crates/hir_def/src/body/lower.rs +++ b/crates/hir_def/src/body/lower.rs | |||
@@ -933,7 +933,9 @@ impl ExprCollector<'_> { | |||
933 | Pat::Box { inner } | 933 | Pat::Box { inner } |
934 | } | 934 | } |
935 | // FIXME: implement | 935 | // FIXME: implement |
936 | ast::Pat::RangePat(_) | ast::Pat::MacroPat(_) => Pat::Missing, | 936 | ast::Pat::RangePat(_) | ast::Pat::MacroPat(_) | ast::Pat::ConstBlockPat(_) => { |
937 | Pat::Missing | ||
938 | } | ||
937 | }; | 939 | }; |
938 | let ptr = AstPtr::new(&pat); | 940 | let ptr = AstPtr::new(&pat); |
939 | self.alloc_pat(pattern, Either::Left(ptr)) | 941 | self.alloc_pat(pattern, Either::Left(ptr)) |