use uniform accessor
This commit is contained in:
parent
046a021013
commit
00ec0c1066
@ -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) => {
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user