Skip to content

Commit 2f17e5a

Browse files
committed
test: add array constraint in where clause
1 parent 70e0ef8 commit 2f17e5a

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

corpus/declarations.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,3 +2137,36 @@ struct A {
21372137
(scoped_type_identifier
21382138
(identifier)
21392139
(type_identifier))))))
2140+
2141+
================================================================================
2142+
Array Constraint in Where Clause
2143+
================================================================================
2144+
2145+
fn foo<D>(val: D)
2146+
where
2147+
[u8; 32]: From<D>,
2148+
2149+
{}
2150+
2151+
--------------------------------------------------------------------------------
2152+
2153+
(source_file
2154+
(function_item
2155+
(identifier)
2156+
(type_parameters
2157+
(type_identifier))
2158+
(parameters
2159+
(parameter
2160+
(identifier)
2161+
(type_identifier)))
2162+
(where_clause
2163+
(where_predicate
2164+
(array_type
2165+
(primitive_type)
2166+
(integer_literal))
2167+
(trait_bounds
2168+
(generic_type
2169+
(type_identifier)
2170+
(type_arguments
2171+
(type_identifier))))))
2172+
(block)))

0 commit comments

Comments
 (0)