diff options
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/src/expr.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs index 52af2af45..3f2689781 100644 --- a/crates/ra_hir/src/expr.rs +++ b/crates/ra_hir/src/expr.rs | |||
@@ -649,10 +649,9 @@ impl ExprCollector { | |||
649 | let exprs = e.exprs().map(|expr| self.collect_expr(expr)).collect(); | 649 | let exprs = e.exprs().map(|expr| self.collect_expr(expr)).collect(); |
650 | self.alloc_expr(Expr::Tuple { exprs }, syntax_ptr) | 650 | self.alloc_expr(Expr::Tuple { exprs }, syntax_ptr) |
651 | } | 651 | } |
652 | ast::ExprKind::Literal(e) => { | 652 | ast::ExprKind::LiteralExpr(e) => { |
653 | let child = e.syntax().children().next(); | 653 | if let Some(child) = e.literal() { |
654 | 654 | let c = child.syntax(); | |
655 | if let Some(c) = child { | ||
656 | let lit = match c.kind() { | 655 | let lit = match c.kind() { |
657 | SyntaxKind::INT_NUMBER => { | 656 | SyntaxKind::INT_NUMBER => { |
658 | let text = c.text().to_string(); | 657 | let text = c.text().to_string(); |