mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
"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...
This commit is contained in:
parent
a6e45c6c69
commit
a6527ed92c
3 changed files with 4 additions and 3 deletions
|
@ -605,8 +605,10 @@ pub struct FnPointerType {
|
|||
pub(crate) syntax: SyntaxNode,
|
||||
}
|
||||
impl FnPointerType {
|
||||
pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
|
||||
pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
|
||||
pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
|
||||
pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
|
||||
pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
|
||||
pub fn fn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![fn]) }
|
||||
pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
|
||||
pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue