mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 05:53:45 +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 =
|
TypeBound =
|
||||||
Lifetime
|
Lifetime
|
||||||
| ('?' | '~' 'const')? Type
|
| ('~' 'const' | 'const')? 'async'? '?'? Type
|
||||||
|
|
||||||
//************************//
|
//************************//
|
||||||
// Patterns //
|
// Patterns //
|
||||||
|
|
|
@ -1410,9 +1410,10 @@ pub struct TypeBound {
|
||||||
}
|
}
|
||||||
impl TypeBound {
|
impl TypeBound {
|
||||||
pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
|
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 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 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) }
|
pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue