Skip to content

Commit 71e3855

Browse files
committed
add tuple_type to possible dynamic types
1 parent 02da1b2 commit 71e3855

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

grammar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,7 @@ module.exports = grammar({
911911
$.scoped_type_identifier,
912912
$.generic_type,
913913
$.function_type,
914+
$.tuple_type,
914915
)),
915916
),
916917

test/corpus/declarations.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,6 +1623,35 @@ impl !Send for Foo {}
16231623
(type_identifier)
16241624
(declaration_list)))
16251625

1626+
================================================================================
1627+
Impl dyn with parentheses
1628+
================================================================================
1629+
1630+
pub unsafe trait Trait {}
1631+
1632+
unsafe impl Trait for dyn (::std::any::Any) + Send { }
1633+
1634+
--------------------------------------------------------------------------------
1635+
1636+
(source_file
1637+
(trait_item
1638+
(visibility_modifier)
1639+
(type_identifier)
1640+
(declaration_list))
1641+
(impl_item
1642+
(type_identifier)
1643+
(bounded_type
1644+
(dynamic_type
1645+
(tuple_type
1646+
(scoped_type_identifier
1647+
(scoped_identifier
1648+
(scoped_identifier
1649+
(identifier))
1650+
(identifier))
1651+
(type_identifier))))
1652+
(type_identifier))
1653+
(declaration_list)))
1654+
16261655
================================================================================
16271656
Trait impl signature
16281657
================================================================================

0 commit comments

Comments
 (0)