Unnamed repository; edit this file 'description' to name the repository.
update grammer to support associated const equality
XFFXFF 2022-04-17
parent 53afd2a · commit bdecd93
-rw-r--r--crates/syntax/rust.ungram2
-rw-r--r--crates/syntax/src/ast/generated/nodes.rs1
2 files changed, 2 insertions, 1 deletions
diff --git a/crates/syntax/rust.ungram b/crates/syntax/rust.ungram
index 19e642968c..62aa478399 100644
--- a/crates/syntax/rust.ungram
+++ b/crates/syntax/rust.ungram
@@ -51,7 +51,7 @@ TypeArg =
Type
AssocTypeArg =
- NameRef GenericParamList? (':' TypeBoundList | '=' Type)
+ NameRef GenericParamList? (':' TypeBoundList | ('=' Type | ConstArg))
LifetimeArg =
Lifetime
diff --git a/crates/syntax/src/ast/generated/nodes.rs b/crates/syntax/src/ast/generated/nodes.rs
index 92d793e0fd..cf90ba64cf 100644
--- a/crates/syntax/src/ast/generated/nodes.rs
+++ b/crates/syntax/src/ast/generated/nodes.rs
@@ -123,6 +123,7 @@ impl AssocTypeArg {
pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) }
pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+ pub fn const_arg(&self) -> Option<ConstArg> { support::child(&self.syntax) }
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]