mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 13:33:31 +00:00
Update grammar
Bounds are CONSTNESS ASYNCNESS POLARITY
This commit is contained in:
parent
3e4deab3d8
commit
36020bb512
2 changed files with 3 additions and 2 deletions
|
@ -614,7 +614,7 @@ TypeBoundList =
|
|||
|
||||
TypeBound =
|
||||
Lifetime
|
||||
| ('?' | '~' 'const')? Type
|
||||
| ('~' 'const' | 'const')? 'async'? '?'? Type
|
||||
|
||||
//************************//
|
||||
// Patterns //
|
||||
|
|
|
@ -1410,9 +1410,10 @@ pub struct TypeBound {
|
|||
}
|
||||
impl TypeBound {
|
||||
pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
|
||||
pub fn question_mark_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![?]) }
|
||||
pub fn tilde_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![~]) }
|
||||
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 question_mark_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![?]) }
|
||||
pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue