From 36020bb51253fbe098450ddd8112cd939e1ca473 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Fri, 16 Feb 2024 16:16:34 +0000 Subject: [PATCH] Update grammar Bounds are CONSTNESS ASYNCNESS POLARITY --- crates/syntax/rust.ungram | 2 +- crates/syntax/src/ast/generated/nodes.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/syntax/rust.ungram b/crates/syntax/rust.ungram index 36d677e151f6..c3d8e97c436c 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 affcdc94d078..75971861aa80 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 { support::child(&self.syntax) } - pub fn question_mark_token(&self) -> Option { support::token(&self.syntax, T![?]) } pub fn tilde_token(&self) -> Option { support::token(&self.syntax, T![~]) } pub fn const_token(&self) -> Option { support::token(&self.syntax, T![const]) } + pub fn async_token(&self) -> Option { support::token(&self.syntax, T![async]) } + pub fn question_mark_token(&self) -> Option { support::token(&self.syntax, T![?]) } pub fn ty(&self) -> Option { support::child(&self.syntax) } }