Skip to content

Commit bdecd93

Browse files
committed
update grammer to support associated const equality
1 parent 53afd2a commit bdecd93

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

crates/syntax/rust.ungram

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ TypeArg =
5151
Type
5252

5353
AssocTypeArg =
54-
NameRef GenericParamList? (':' TypeBoundList | '=' Type)
54+
NameRef GenericParamList? (':' TypeBoundList | ('=' Type | ConstArg))
5555

5656
LifetimeArg =
5757
Lifetime

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ impl AssocTypeArg {
123123
pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) }
124124
pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
125125
pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
126+
pub fn const_arg(&self) -> Option<ConstArg> { support::child(&self.syntax) }
126127
}
127128

128129
#[derive(Debug, Clone, PartialEq, Eq, Hash)]

0 commit comments

Comments
 (0)