Skip to content

Commit 36020bb

Browse files
Update grammar
Bounds are CONSTNESS ASYNCNESS POLARITY
1 parent 3e4deab commit 36020bb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

crates/syntax/rust.ungram

+1-1
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ TypeBoundList =
614614

615615
TypeBound =
616616
Lifetime
617-
| ('?' | '~' 'const')? Type
617+
| ('~' 'const' | 'const')? 'async'? '?'? Type
618618

619619
//************************//
620620
// Patterns //

crates/syntax/src/ast/generated/nodes.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1410,9 +1410,10 @@ pub struct TypeBound {
14101410
}
14111411
impl TypeBound {
14121412
pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
1413-
pub fn question_mark_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![?]) }
14141413
pub fn tilde_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![~]) }
14151414
pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
1415+
pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
1416+
pub fn question_mark_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![?]) }
14161417
pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
14171418
}
14181419

0 commit comments

Comments
 (0)