use uniform accessor

This commit is contained in:
Aleksey Kladov 2020-04-09 23:19:51 +02:00
parent 046a021013
commit 00ec0c1066
2 changed files with 1 additions and 5 deletions

View File

@ -372,7 +372,7 @@ fn collect_expr(&mut self, expr: ast::Expr) -> ExprId {
}
ast::Expr::RefExpr(e) => {
let expr = self.collect_expr_opt(e.expr());
let mutability = Mutability::from_mutable(e.is_mut());
let mutability = Mutability::from_mutable(e.mut_kw_token().is_some());
self.alloc_expr(Expr::Ref { expr, mutability }, syntax_ptr)
}
ast::Expr::PrefixExpr(e) => {

View File

@ -49,10 +49,6 @@ fn blocks(&self) -> AstChildren<ast::BlockExpr> {
}
impl ast::RefExpr {
pub fn is_mut(&self) -> bool {
self.syntax().children_with_tokens().any(|n| n.kind() == T![mut])
}
pub fn raw_token(&self) -> Option<SyntaxToken> {
None // FIXME: implement &raw
}