Skip to content

Commit

Permalink
Update grammar
Browse files Browse the repository at this point in the history
Bounds are CONSTNESS ASYNCNESS POLARITY
  • Loading branch information
compiler-errors committed Feb 16, 2024
1 parent 3e4deab commit 36020bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/syntax/rust.ungram
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ TypeBoundList =

TypeBound =
Lifetime
| ('?' | '~' 'const')? Type
| ('~' 'const' | 'const')? 'async'? '?'? Type

//************************//
// Patterns //
Expand Down
3 changes: 2 additions & 1 deletion crates/syntax/src/ast/generated/nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
}

Expand Down

0 comments on commit 36020bb

Please sign in to comment.