Skip to content

Commit 24adbb7

Browse files
committed
fix: allow tuple types in abstract types
1 parent 2166365 commit 24adbb7

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

grammar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,7 @@ module.exports = grammar({
867867
$.removed_trait_bound,
868868
$.generic_type,
869869
$.function_type,
870+
$.tuple_type,
870871
)),
871872
),
872873

test/corpus/declarations.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,7 @@ Type aliases
10381038

10391039
type Inch = u64;
10401040
type Name<T> = Vec<T>;
1041+
type LazyResolve = impl (FnOnce() -> Capture) + Send + Sync + UnwindSafe;
10411042

10421043
--------------------------------------------------------------------------------
10431044

@@ -1052,7 +1053,21 @@ type Name<T> = Vec<T>;
10521053
(generic_type
10531054
(type_identifier)
10541055
(type_arguments
1055-
(type_identifier)))))
1056+
(type_identifier))))
1057+
(type_item
1058+
(type_identifier)
1059+
(bounded_type
1060+
(bounded_type
1061+
(bounded_type
1062+
(abstract_type
1063+
(tuple_type
1064+
(function_type
1065+
(type_identifier)
1066+
(parameters)
1067+
(type_identifier))))
1068+
(type_identifier))
1069+
(type_identifier))
1070+
(type_identifier))))
10561071

10571072
================================================================================
10581073
Empty statements

0 commit comments

Comments
 (0)