aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-12-08 11:50:49 +0000
committerFlorian Diebold <[email protected]>2019-12-08 12:03:13 +0000
commit5e096def15e992938b0e2838ae6c344939aa10f2 (patch)
tree3e8c410735959fcf35d4346710e4d78b52924c8a /crates/ra_hir_def
parent2223620313e94deb04d1565a75004579aa1a9e07 (diff)
Expand macros in blocks to expressions for now
Expanding to statements isn't handled properly yet and breaks things.
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r--crates/ra_hir_def/src/body/lower.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs
index 71c08f024..cc068ff94 100644
--- a/crates/ra_hir_def/src/body/lower.rs
+++ b/crates/ra_hir_def/src/body/lower.rs
@@ -437,9 +437,7 @@ where
437 None => self.alloc_expr(Expr::Missing, syntax_ptr), 437 None => self.alloc_expr(Expr::Missing, syntax_ptr),
438 } 438 }
439 } 439 }
440 440 // FIXME expand to statements in statement position
441 // FIXME implement HIR for these:
442 ast::Expr::Label(_e) => self.alloc_expr(Expr::Missing, syntax_ptr),
443 ast::Expr::MacroCall(e) => match self.expander.enter_expand(self.db, e) { 441 ast::Expr::MacroCall(e) => match self.expander.enter_expand(self.db, e) {
444 Some((mark, expansion)) => { 442 Some((mark, expansion)) => {
445 let id = self.collect_expr(expansion); 443 let id = self.collect_expr(expansion);
@@ -448,6 +446,9 @@ where
448 } 446 }
449 None => self.alloc_expr(Expr::Missing, syntax_ptr), 447 None => self.alloc_expr(Expr::Missing, syntax_ptr),
450 }, 448 },
449
450 // FIXME implement HIR for these:
451 ast::Expr::Label(_e) => self.alloc_expr(Expr::Missing, syntax_ptr),
451 } 452 }
452 } 453 }
453 454