internal: Parse const trait bounds

This commit is contained in:
Lukas Wirth 2021-10-19 14:15:47 +02:00
parent 401daa5f77
commit b219a4c465
8 changed files with 45 additions and 19 deletions

View file

@ -1271,6 +1271,8 @@ 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 ty(&self) -> Option<Type> { support::child(&self.syntax) }
}