diff --git a/crates/ra_hir_def/src/type_ref.rs b/crates/ra_hir_def/src/type_ref.rs index 524c033b8e..fe6619d9f4 100644 --- a/crates/ra_hir_def/src/type_ref.rs +++ b/crates/ra_hir_def/src/type_ref.rs @@ -1,6 +1,5 @@ //! HIR for references to types. Paths in these are not yet resolved. They can //! be directly created from an ast::TypeRef, without further queries. - use ra_syntax::ast::{self}; use crate::{body::LowerCtx, path::Path}; diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 465cb32025..afa37f2279 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) } diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 5dee85c2d7..4015e3890d 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -231,7 +231,7 @@ InferType = '_' FnPointerType = - Abi 'unsafe'? 'fn' ParamList RetType? + 'const'? 'async'? 'unsafe'? Abi? 'fn' ParamList RetType? ForType = 'for' GenericParamList Type