Skip to content

Commit df56707

Browse files
committed
add syntax validation test for &impl 'a
1 parent 4389c43 commit df56707

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
SOURCE_FILE@0..20
2+
FN@0..20
3+
FN_KW@0..2 "fn"
4+
WHITESPACE@2..3 " "
5+
NAME@3..4
6+
IDENT@3..4 "f"
7+
PARAM_LIST@4..17
8+
L_PAREN@4..5 "("
9+
PARAM@5..16
10+
WILDCARD_PAT@5..6
11+
UNDERSCORE@5..6 "_"
12+
COLON@6..7 ":"
13+
WHITESPACE@7..8 " "
14+
REF_TYPE@8..16
15+
AMP@8..9 "&"
16+
IMPL_TRAIT_TYPE@9..16
17+
IMPL_KW@9..13 "impl"
18+
WHITESPACE@13..14 " "
19+
TYPE_BOUND_LIST@14..16
20+
TYPE_BOUND@14..16
21+
LIFETIME@14..16
22+
LIFETIME_IDENT@14..16 "'a"
23+
R_PAREN@16..17 ")"
24+
WHITESPACE@17..18 " "
25+
BLOCK_EXPR@18..20
26+
STMT_LIST@18..20
27+
L_CURLY@18..19 "{"
28+
R_CURLY@19..20 "}"
29+
error 9..16: At least one trait must be specified
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fn f(_: &impl 'a) {}

0 commit comments

Comments
 (0)