about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-02-16 16:16:34 +0000
committerMichael Goulet <michael@errs.io>2024-02-16 16:16:37 +0000
commit36020bb51253fbe098450ddd8112cd939e1ca473 (patch)
tree434f215c87bcacf30301734bcfe6264c32b67a3f
parent3e4deab3d869787e2e9b5020e6061d23735c944c (diff)
downloadrust-36020bb51253fbe098450ddd8112cd939e1ca473.tar.gz
rust-36020bb51253fbe098450ddd8112cd939e1ca473.zip
Update grammar
Bounds are CONSTNESS ASYNCNESS POLARITY
-rw-r--r--crates/syntax/rust.ungram2
-rw-r--r--crates/syntax/src/ast/generated/nodes.rs3
2 files changed, 3 insertions, 2 deletions
diff --git a/crates/syntax/rust.ungram b/crates/syntax/rust.ungram
index 36d677e151f..c3d8e97c436 100644
--- a/crates/syntax/rust.ungram
+++ b/crates/syntax/rust.ungram
@@ -614,7 +614,7 @@ TypeBoundList =
 
 TypeBound =
   Lifetime
-| ('?' | '~' 'const')? Type
+| ('~' 'const' | 'const')? 'async'? '?'? Type
 
 //************************//
 //        Patterns        //
diff --git a/crates/syntax/src/ast/generated/nodes.rs b/crates/syntax/src/ast/generated/nodes.rs
index affcdc94d07..75971861aa8 100644
--- a/crates/syntax/src/ast/generated/nodes.rs
+++ b/crates/syntax/src/ast/generated/nodes.rs
@@ -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) }
 }