From 367487fe88dca78cffad5138673d5259f7f7ba6b Mon Sep 17 00:00:00 2001 From: robojumper <robojumper@gmail.com> Date: Thu, 28 May 2020 21:42:22 +0200 Subject: Support raw_ref_op's raw reference operator --- crates/ra_syntax/src/ast/generated/nodes.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/ra_syntax/src/ast/generated') diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index cf6067e57..255402fbc 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs @@ -1235,6 +1235,8 @@ impl CastExpr { /// ``` /// ❰ &foo ❱; /// ❰ &mut bar ❱; +/// ❰ &raw const bar ❱; +/// ❰ &raw mut bar ❱; /// ``` /// /// [Reference](https://doc.rust-lang.org/reference/expressions/operator-expr.html#borrow-operators) @@ -1247,6 +1249,7 @@ impl RefExpr { pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) } pub fn raw_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![raw]) } pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } + pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } } /// Prefix operator call. This is either `!` or `*` or `-`. -- cgit v1.2.3 From 1cd78a3355ea70d3070cabb00c80a5d195499752 Mon Sep 17 00:00:00 2001 From: robojumper <robojumper@gmail.com> Date: Sun, 31 May 2020 10:59:40 +0200 Subject: correctly infer labelled breaks --- crates/ra_syntax/src/ast/generated/nodes.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/ra_syntax/src/ast/generated') diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 255402fbc..cb430ca01 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs @@ -1081,6 +1081,7 @@ pub struct BlockExpr { impl ast::AttrsOwner for BlockExpr {} impl ast::ModuleItemOwner for BlockExpr {} impl BlockExpr { + pub fn label(&self) -> Option<Label> { support::child(&self.syntax) } pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) } pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } -- cgit v1.2.3