diff options
-rw-r--r-- | crates/ra_hir_def/src/body/lower.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/expr_extensions.rs | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index df560155c..4f23cb5c8 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs | |||
@@ -372,7 +372,7 @@ impl ExprCollector<'_> { | |||
372 | } | 372 | } |
373 | ast::Expr::RefExpr(e) => { | 373 | ast::Expr::RefExpr(e) => { |
374 | let expr = self.collect_expr_opt(e.expr()); | 374 | let expr = self.collect_expr_opt(e.expr()); |
375 | let mutability = Mutability::from_mutable(e.is_mut()); | 375 | let mutability = Mutability::from_mutable(e.mut_kw_token().is_some()); |
376 | self.alloc_expr(Expr::Ref { expr, mutability }, syntax_ptr) | 376 | self.alloc_expr(Expr::Ref { expr, mutability }, syntax_ptr) |
377 | } | 377 | } |
378 | ast::Expr::PrefixExpr(e) => { | 378 | ast::Expr::PrefixExpr(e) => { |
diff --git a/crates/ra_syntax/src/ast/expr_extensions.rs b/crates/ra_syntax/src/ast/expr_extensions.rs index 003ee00b3..5c5f19622 100644 --- a/crates/ra_syntax/src/ast/expr_extensions.rs +++ b/crates/ra_syntax/src/ast/expr_extensions.rs | |||
@@ -49,10 +49,6 @@ impl ast::IfExpr { | |||
49 | } | 49 | } |
50 | 50 | ||
51 | impl ast::RefExpr { | 51 | impl ast::RefExpr { |
52 | pub fn is_mut(&self) -> bool { | ||
53 | self.syntax().children_with_tokens().any(|n| n.kind() == T![mut]) | ||
54 | } | ||
55 | |||
56 | pub fn raw_token(&self) -> Option<SyntaxToken> { | 52 | pub fn raw_token(&self) -> Option<SyntaxToken> { |
57 | None // FIXME: implement &raw | 53 | None // FIXME: implement &raw |
58 | } | 54 | } |