File tree 5 files changed +70777
-67984
lines changed 5 files changed +70777
-67984
lines changed Original file line number Diff line number Diff line change @@ -970,6 +970,31 @@ unsafe impl Foo {
970
970
971
971
(source_file (impl_item (type_identifier) (declaration_list)))
972
972
973
+ ===========================================
974
+ Trait impl signature
975
+ ===========================================
976
+
977
+ impl<K: Debug + Ord> Debug for OccupiedError<K>;
978
+ impl<K: Debug + Ord> Display for OccupiedError<K>;
979
+
980
+ ---
981
+
982
+ (source_file
983
+ (impl_item
984
+ (type_parameters
985
+ (constrained_type_parameter
986
+ (type_identifier)
987
+ (trait_bounds (type_identifier) (type_identifier))))
988
+ (type_identifier)
989
+ (generic_type (type_identifier) (type_arguments (type_identifier))))
990
+ (impl_item
991
+ (type_parameters
992
+ (constrained_type_parameter
993
+ (type_identifier)
994
+ (trait_bounds (type_identifier) (type_identifier))))
995
+ (type_identifier)
996
+ (generic_type (type_identifier) (type_arguments (type_identifier)))))
997
+
973
998
===========================================
974
999
Impls with default functions
975
1000
===========================================
Original file line number Diff line number Diff line change @@ -464,7 +464,7 @@ module.exports = grammar({
464
464
) ) ,
465
465
field ( 'type' , $ . _type ) ,
466
466
optional ( $ . where_clause ) ,
467
- field ( 'body' , $ . declaration_list )
467
+ choice ( field ( 'body' , $ . declaration_list ) , ';' )
468
468
) ,
469
469
470
470
trait_item : $ => seq (
Original file line number Diff line number Diff line change 2602
2602
]
2603
2603
},
2604
2604
{
2605
- "type" : " FIELD" ,
2606
- "name" : " body" ,
2607
- "content" : {
2608
- "type" : " SYMBOL" ,
2609
- "name" : " declaration_list"
2610
- }
2605
+ "type" : " CHOICE" ,
2606
+ "members" : [
2607
+ {
2608
+ "type" : " FIELD" ,
2609
+ "name" : " body" ,
2610
+ "content" : {
2611
+ "type" : " SYMBOL" ,
2612
+ "name" : " declaration_list"
2613
+ }
2614
+ },
2615
+ {
2616
+ "type" : " STRING" ,
2617
+ "value" : " ;"
2618
+ }
2619
+ ]
2611
2620
}
2612
2621
]
2613
2622
},
Original file line number Diff line number Diff line change 2113
2113
"fields" : {
2114
2114
"body" : {
2115
2115
"multiple" : false ,
2116
- "required" : true ,
2116
+ "required" : false ,
2117
2117
"types" : [
2118
2118
{
2119
2119
"type" : " declaration_list" ,
You can’t perform that action at this time.
0 commit comments