File tree Expand file tree Collapse file tree 5 files changed +70777
-67984
lines changed Expand file tree Collapse file tree 5 files changed +70777
-67984
lines changed Original file line number Diff line number Diff line change @@ -970,6 +970,31 @@ unsafe impl Foo {
970970
971971(source_file (impl_item (type_identifier) (declaration_list)))
972972
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+
973998===========================================
974999Impls with default functions
9751000===========================================
Original file line number Diff line number Diff line change @@ -464,7 +464,7 @@ module.exports = grammar({
464464 ) ) ,
465465 field ( 'type' , $ . _type ) ,
466466 optional ( $ . where_clause ) ,
467- field ( 'body' , $ . declaration_list )
467+ choice ( field ( 'body' , $ . declaration_list ) , ';' )
468468 ) ,
469469
470470 trait_item : $ => seq (
Original file line number Diff line number Diff line change 26022602 ]
26032603 },
26042604 {
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+ ]
26112620 }
26122621 ]
26132622 },
Original file line number Diff line number Diff line change 21132113 "fields" : {
21142114 "body" : {
21152115 "multiple" : false ,
2116- "required" : true ,
2116+ "required" : false ,
21172117 "types" : [
21182118 {
21192119 "type" : " declaration_list" ,
You can’t perform that action at this time.
0 commit comments