mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
update grammer to support associated const equality
This commit is contained in:
parent
53afd2a707
commit
bdecd9374e
2 changed files with 2 additions and 1 deletions
|
@ -51,7 +51,7 @@ TypeArg =
|
|||
Type
|
||||
|
||||
AssocTypeArg =
|
||||
NameRef GenericParamList? (':' TypeBoundList | '=' Type)
|
||||
NameRef GenericParamList? (':' TypeBoundList | ('=' Type | ConstArg))
|
||||
|
||||
LifetimeArg =
|
||||
Lifetime
|
||||
|
|
|
@ -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)]
|
||||
|
|
Loading…
Reference in a new issue