mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
add test for impl recovery
This commit is contained in:
parent
c2ab6ad73d
commit
e446316585
2 changed files with 70 additions and 0 deletions
|
@ -0,0 +1,4 @@
|
|||
impl<T: Clone>
|
||||
impl<T:Clone>
|
||||
!impl<T> OnceCell<T> {
|
||||
}
|
66
crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.txt
Normal file
66
crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.txt
Normal file
|
@ -0,0 +1,66 @@
|
|||
ROOT@[0; 54)
|
||||
IMPL_ITEM@[0; 14)
|
||||
IMPL_KW@[0; 4)
|
||||
TYPE_PARAM_LIST@[4; 14)
|
||||
L_ANGLE@[4; 5)
|
||||
TYPE_PARAM@[5; 13)
|
||||
NAME@[5; 6)
|
||||
IDENT@[5; 6) "T"
|
||||
COLON@[6; 7)
|
||||
WHITESPACE@[7; 8)
|
||||
PATH_TYPE@[8; 13)
|
||||
PATH@[8; 13)
|
||||
PATH_SEGMENT@[8; 13)
|
||||
NAME_REF@[8; 13)
|
||||
IDENT@[8; 13) "Clone"
|
||||
R_ANGLE@[13; 14)
|
||||
err: `expected type`
|
||||
err: `expected `{``
|
||||
WHITESPACE@[14; 15)
|
||||
IMPL_ITEM@[15; 30)
|
||||
IMPL_KW@[15; 19)
|
||||
TYPE_PARAM_LIST@[19; 28)
|
||||
L_ANGLE@[19; 20)
|
||||
TYPE_PARAM@[20; 27)
|
||||
NAME@[20; 21)
|
||||
IDENT@[20; 21) "T"
|
||||
COLON@[21; 22)
|
||||
PATH_TYPE@[22; 27)
|
||||
PATH@[22; 27)
|
||||
PATH_SEGMENT@[22; 27)
|
||||
NAME_REF@[22; 27)
|
||||
IDENT@[22; 27) "Clone"
|
||||
R_ANGLE@[27; 28)
|
||||
WHITESPACE@[28; 29)
|
||||
EXCL@[29; 30)
|
||||
err: `expected type`
|
||||
err: `expected `{``
|
||||
IMPL_ITEM@[30; 53)
|
||||
IMPL_KW@[30; 34)
|
||||
TYPE_PARAM_LIST@[34; 37)
|
||||
L_ANGLE@[34; 35)
|
||||
TYPE_PARAM@[35; 36)
|
||||
NAME@[35; 36)
|
||||
IDENT@[35; 36) "T"
|
||||
R_ANGLE@[36; 37)
|
||||
WHITESPACE@[37; 38)
|
||||
PATH_TYPE@[38; 49)
|
||||
PATH@[38; 49)
|
||||
PATH_SEGMENT@[38; 49)
|
||||
NAME_REF@[38; 46)
|
||||
IDENT@[38; 46) "OnceCell"
|
||||
TYPE_ARG_LIST@[46; 49)
|
||||
L_ANGLE@[46; 47)
|
||||
TYPE_ARG@[47; 48)
|
||||
PATH_TYPE@[47; 48)
|
||||
PATH@[47; 48)
|
||||
PATH_SEGMENT@[47; 48)
|
||||
NAME_REF@[47; 48)
|
||||
IDENT@[47; 48) "T"
|
||||
R_ANGLE@[48; 49)
|
||||
WHITESPACE@[49; 50)
|
||||
ITEM_LIST@[50; 53)
|
||||
L_CURLY@[50; 51)
|
||||
WHITESPACE@[51; 52)
|
||||
R_CURLY@[52; 53)
|
||||
WHITESPACE@[53; 54)
|
Loading…
Reference in a new issue