mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 05:08:52 +00:00
Simplify trait gramamr
This commit is contained in:
parent
9818108798
commit
81359af733
3 changed files with 7 additions and 7 deletions
|
@ -267,7 +267,6 @@ impl Impl {
|
|||
pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
|
||||
pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) }
|
||||
pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
|
||||
pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
|
||||
pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
|
||||
pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
|
||||
pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) }
|
||||
|
|
|
@ -591,6 +591,8 @@ fn lower_rule(acc: &mut Vec<Field>, grammar: &Grammar, label: Option<&String>, r
|
|||
| "index"
|
||||
| "base"
|
||||
| "value"
|
||||
| "target_type"
|
||||
| "target_trait"
|
||||
);
|
||||
if manually_implemented {
|
||||
return;
|
||||
|
|
|
@ -194,12 +194,11 @@ AssocItem =
|
|||
| TypeAlias
|
||||
|
||||
Impl =
|
||||
Attr* Visibility?
|
||||
'default'? 'unsafe'? 'impl' 'const'? GenericParamList? (
|
||||
Type
|
||||
| '!'? Type 'for' Type
|
||||
) WhereClause?
|
||||
AssocItemList
|
||||
Attr* Visibility?
|
||||
'default'? 'unsafe'? 'impl' 'const'? GenericParamList?
|
||||
('!'? target_trait:Type 'for')? target_type:Type
|
||||
WhereClause?
|
||||
AssocItemList
|
||||
|
||||
ExternBlock =
|
||||
Attr* Abi ExternItemList
|
||||
|
|
Loading…
Reference in a new issue