mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-29 10:58:02 +00:00
add syntax validation test for &impl 'a
This commit is contained in:
parent
4389c43313
commit
df56707f35
2 changed files with 30 additions and 0 deletions
|
|
@ -0,0 +1,29 @@
|
||||||
|
SOURCE_FILE@0..20
|
||||||
|
FN@0..20
|
||||||
|
FN_KW@0..2 "fn"
|
||||||
|
WHITESPACE@2..3 " "
|
||||||
|
NAME@3..4
|
||||||
|
IDENT@3..4 "f"
|
||||||
|
PARAM_LIST@4..17
|
||||||
|
L_PAREN@4..5 "("
|
||||||
|
PARAM@5..16
|
||||||
|
WILDCARD_PAT@5..6
|
||||||
|
UNDERSCORE@5..6 "_"
|
||||||
|
COLON@6..7 ":"
|
||||||
|
WHITESPACE@7..8 " "
|
||||||
|
REF_TYPE@8..16
|
||||||
|
AMP@8..9 "&"
|
||||||
|
IMPL_TRAIT_TYPE@9..16
|
||||||
|
IMPL_KW@9..13 "impl"
|
||||||
|
WHITESPACE@13..14 " "
|
||||||
|
TYPE_BOUND_LIST@14..16
|
||||||
|
TYPE_BOUND@14..16
|
||||||
|
LIFETIME@14..16
|
||||||
|
LIFETIME_IDENT@14..16 "'a"
|
||||||
|
R_PAREN@16..17 ")"
|
||||||
|
WHITESPACE@17..18 " "
|
||||||
|
BLOCK_EXPR@18..20
|
||||||
|
STMT_LIST@18..20
|
||||||
|
L_CURLY@18..19 "{"
|
||||||
|
R_CURLY@19..20 "}"
|
||||||
|
error 9..16: At least one trait must be specified
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
fn f(_: &impl 'a) {}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue