Merge Trait and TraitAlias handling

This commit is contained in:
Deadbeef 2025-08-04 16:11:51 +08:00
parent a9450ebba3
commit 82f174fbd9
74 changed files with 68 additions and 577 deletions

View file

@ -154,7 +154,6 @@ Item =
| Static
| Struct
| Trait
| TraitAlias
| TypeAlias
| Union
| Use
@ -306,11 +305,8 @@ Trait =
Attr* Visibility?
'unsafe'? 'auto'?
'trait' Name GenericParamList?
(':' TypeBoundList?)? WhereClause? AssocItemList
TraitAlias =
Attr* Visibility?
'trait' Name GenericParamList? '=' TypeBoundList? WhereClause? ';'
(((':' TypeBoundList?)? WhereClause? AssocItemList) |
('=' TypeBoundList? WhereClause? ';'))
AssocItemList =
'{' Attr* AssocItem* '}'