From a6527ed92cb7a1156b8a118f5790d8c5fd69ab41 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Jul 2020 14:40:28 +0200 Subject: "Finalize" Types grammar Note that `for` type is rust-analyzer's own invention. Both the reference and syn allow `for` only for fnptr types, and we allow them everywhere. This needs to be checked with respect to type bounds grammar... --- crates/ra_syntax/src/ast/generated/nodes.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/ra_syntax/src') diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 465cb3202..afa37f227 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs @@ -605,8 +605,10 @@ pub struct FnPointerType { pub(crate) syntax: SyntaxNode, } impl FnPointerType { - pub fn abi(&self) -> Option { support::child(&self.syntax) } + pub fn const_token(&self) -> Option { support::token(&self.syntax, T![const]) } + pub fn async_token(&self) -> Option { support::token(&self.syntax, T![async]) } pub fn unsafe_token(&self) -> Option { support::token(&self.syntax, T![unsafe]) } + pub fn abi(&self) -> Option { support::child(&self.syntax) } pub fn fn_token(&self) -> Option { support::token(&self.syntax, T![fn]) } pub fn param_list(&self) -> Option { support::child(&self.syntax) } pub fn ret_type(&self) -> Option { support::child(&self.syntax) } -- cgit v1.2.3