mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 12:33:33 +00:00
Update tests
This commit is contained in:
parent
2984da672e
commit
081f35fe1b
33 changed files with 40 additions and 40 deletions
|
@ -149,12 +149,12 @@ pub(crate) fn reparser(
|
|||
USE_TREE_LIST => items::use_tree_list,
|
||||
EXTERN_ITEM_LIST => items::extern_item_list,
|
||||
TOKEN_TREE if first_child? == T!['{'] => items::token_tree,
|
||||
ITEM_LIST => match parent? {
|
||||
ASSOC_ITEM_LIST => match parent? {
|
||||
IMPL_DEF => items::impl_item_list,
|
||||
TRAIT_DEF => items::trait_item_list,
|
||||
MODULE => items::mod_item_list,
|
||||
_ => return None,
|
||||
},
|
||||
ITEM_LIST => items::mod_item_list,
|
||||
_ => return None,
|
||||
};
|
||||
Some(res)
|
||||
|
|
|
@ -8,7 +8,7 @@ SOURCE_FILE@0..183
|
|||
NAME_REF@5..13
|
||||
IDENT@5..13 "FnScopes"
|
||||
WHITESPACE@13..14 " "
|
||||
ITEM_LIST@14..182
|
||||
ASSOC_ITEM_LIST@14..182
|
||||
L_CURLY@14..15 "{"
|
||||
WHITESPACE@15..20 "\n "
|
||||
FN_DEF@20..161
|
||||
|
|
|
@ -41,7 +41,7 @@ SOURCE_FILE@0..38
|
|||
IDENT@32..33 "T"
|
||||
R_ANGLE@33..34 ">"
|
||||
WHITESPACE@34..35 " "
|
||||
ITEM_LIST@35..37
|
||||
ASSOC_ITEM_LIST@35..37
|
||||
L_CURLY@35..36 "{"
|
||||
R_CURLY@36..37 "}"
|
||||
WHITESPACE@37..38 "\n"
|
||||
|
|
|
@ -14,7 +14,7 @@ SOURCE_FILE@0..118
|
|||
L_PAREN@11..12 "("
|
||||
R_PAREN@12..13 ")"
|
||||
WHITESPACE@13..14 " "
|
||||
ITEM_LIST@14..117
|
||||
ASSOC_ITEM_LIST@14..117
|
||||
L_CURLY@14..15 "{"
|
||||
WHITESPACE@15..20 "\n "
|
||||
FN_DEF@20..31
|
||||
|
|
|
@ -5,7 +5,7 @@ SOURCE_FILE@0..39
|
|||
NAME@6..7
|
||||
IDENT@6..7 "T"
|
||||
WHITESPACE@7..8 " "
|
||||
ITEM_LIST@8..38
|
||||
ASSOC_ITEM_LIST@8..38
|
||||
L_CURLY@8..9 "{"
|
||||
WHITESPACE@9..12 "\n "
|
||||
MACRO_CALL@12..19
|
||||
|
|
|
@ -8,7 +8,7 @@ SOURCE_FILE@0..87
|
|||
NAME_REF@5..9
|
||||
IDENT@5..9 "Type"
|
||||
WHITESPACE@9..10 " "
|
||||
ITEM_LIST@10..12
|
||||
ASSOC_ITEM_LIST@10..12
|
||||
L_CURLY@10..11 "{"
|
||||
R_CURLY@11..12 "}"
|
||||
WHITESPACE@12..13 "\n"
|
||||
|
@ -29,7 +29,7 @@ SOURCE_FILE@0..87
|
|||
NAME_REF@29..30
|
||||
IDENT@29..30 "T"
|
||||
WHITESPACE@30..31 " "
|
||||
ITEM_LIST@31..33
|
||||
ASSOC_ITEM_LIST@31..33
|
||||
L_CURLY@31..32 "{"
|
||||
R_CURLY@32..33 "}"
|
||||
WHITESPACE@33..34 "\n"
|
||||
|
@ -45,7 +45,7 @@ SOURCE_FILE@0..87
|
|||
NAME_REF@44..51
|
||||
IDENT@44..51 "NotType"
|
||||
WHITESPACE@51..52 " "
|
||||
ITEM_LIST@52..54
|
||||
ASSOC_ITEM_LIST@52..54
|
||||
L_CURLY@52..53 "{"
|
||||
R_CURLY@53..54 "}"
|
||||
WHITESPACE@54..55 "\n"
|
||||
|
@ -69,7 +69,7 @@ SOURCE_FILE@0..87
|
|||
NAME_REF@76..83
|
||||
IDENT@76..83 "NotType"
|
||||
WHITESPACE@83..84 " "
|
||||
ITEM_LIST@84..86
|
||||
ASSOC_ITEM_LIST@84..86
|
||||
L_CURLY@84..85 "{"
|
||||
R_CURLY@85..86 "}"
|
||||
WHITESPACE@86..87 "\n"
|
||||
|
|
|
@ -5,7 +5,7 @@ SOURCE_FILE@0..62
|
|||
NAME@6..7
|
||||
IDENT@6..7 "T"
|
||||
WHITESPACE@7..8 " "
|
||||
ITEM_LIST@8..61
|
||||
ASSOC_ITEM_LIST@8..61
|
||||
L_CURLY@8..9 "{"
|
||||
WHITESPACE@9..14 "\n "
|
||||
MACRO_CALL@14..21
|
||||
|
|
|
@ -8,7 +8,7 @@ SOURCE_FILE@0..83
|
|||
NAME_REF@5..6
|
||||
IDENT@5..6 "F"
|
||||
WHITESPACE@6..7 " "
|
||||
ITEM_LIST@7..82
|
||||
ASSOC_ITEM_LIST@7..82
|
||||
L_CURLY@7..8 "{"
|
||||
WHITESPACE@8..13 "\n "
|
||||
TYPE_ALIAS_DEF@13..27
|
||||
|
|
|
@ -8,7 +8,7 @@ SOURCE_FILE@0..128
|
|||
NAME_REF@5..6
|
||||
IDENT@5..6 "S"
|
||||
WHITESPACE@6..7 " "
|
||||
ITEM_LIST@7..127
|
||||
ASSOC_ITEM_LIST@7..127
|
||||
L_CURLY@7..8 "{"
|
||||
WHITESPACE@8..13 "\n "
|
||||
FN_DEF@13..26
|
||||
|
|
|
@ -7,7 +7,7 @@ SOURCE_FILE@0..18
|
|||
NAME@13..14
|
||||
IDENT@13..14 "T"
|
||||
WHITESPACE@14..15 " "
|
||||
ITEM_LIST@15..17
|
||||
ASSOC_ITEM_LIST@15..17
|
||||
L_CURLY@15..16 "{"
|
||||
R_CURLY@16..17 "}"
|
||||
WHITESPACE@17..18 "\n"
|
||||
|
|
|
@ -8,7 +8,7 @@ SOURCE_FILE@0..69
|
|||
NAME_REF@5..6
|
||||
IDENT@5..6 "S"
|
||||
WHITESPACE@6..7 " "
|
||||
ITEM_LIST@7..68
|
||||
ASSOC_ITEM_LIST@7..68
|
||||
L_CURLY@7..8 "{"
|
||||
WHITESPACE@8..13 "\n "
|
||||
FN_DEF@13..33
|
||||
|
|
|
@ -8,7 +8,7 @@ SOURCE_FILE@0..89
|
|||
NAME_REF@5..6
|
||||
IDENT@5..6 "F"
|
||||
WHITESPACE@6..7 " "
|
||||
ITEM_LIST@7..88
|
||||
ASSOC_ITEM_LIST@7..88
|
||||
L_CURLY@7..8 "{"
|
||||
WHITESPACE@8..13 "\n "
|
||||
TYPE_ALIAS_DEF@13..26
|
||||
|
|
|
@ -48,7 +48,7 @@ SOURCE_FILE@0..101
|
|||
NAME_REF@34..38
|
||||
IDENT@34..38 "Copy"
|
||||
WHITESPACE@38..39 " "
|
||||
ITEM_LIST@39..41
|
||||
ASSOC_ITEM_LIST@39..41
|
||||
L_CURLY@39..40 "{"
|
||||
R_CURLY@40..41 "}"
|
||||
WHITESPACE@41..42 "\n"
|
||||
|
@ -119,7 +119,7 @@ SOURCE_FILE@0..101
|
|||
NAME_REF@93..97
|
||||
IDENT@93..97 "Copy"
|
||||
WHITESPACE@97..98 " "
|
||||
ITEM_LIST@98..100
|
||||
ASSOC_ITEM_LIST@98..100
|
||||
L_CURLY@98..99 "{"
|
||||
R_CURLY@99..100 "}"
|
||||
WHITESPACE@100..101 "\n"
|
||||
|
|
|
@ -12,7 +12,7 @@ SOURCE_FILE@0..27
|
|||
NAME_REF@20..23
|
||||
IDENT@20..23 "Foo"
|
||||
WHITESPACE@23..24 " "
|
||||
ITEM_LIST@24..26
|
||||
ASSOC_ITEM_LIST@24..26
|
||||
L_CURLY@24..25 "{"
|
||||
R_CURLY@25..26 "}"
|
||||
WHITESPACE@26..27 "\n"
|
||||
|
|
|
@ -5,7 +5,7 @@ SOURCE_FILE@0..22
|
|||
NAME@6..7
|
||||
IDENT@6..7 "T"
|
||||
WHITESPACE@7..8 " "
|
||||
ITEM_LIST@8..21
|
||||
ASSOC_ITEM_LIST@8..21
|
||||
L_CURLY@8..9 "{"
|
||||
WHITESPACE@9..10 " "
|
||||
FN_DEF@10..19
|
||||
|
|
|
@ -17,7 +17,7 @@ SOURCE_FILE@0..20
|
|||
NAME_REF@15..16
|
||||
IDENT@15..16 "X"
|
||||
WHITESPACE@16..17 " "
|
||||
ITEM_LIST@17..19
|
||||
ASSOC_ITEM_LIST@17..19
|
||||
L_CURLY@17..18 "{"
|
||||
R_CURLY@18..19 "}"
|
||||
WHITESPACE@19..20 "\n"
|
||||
|
|
|
@ -8,7 +8,7 @@ SOURCE_FILE@0..12
|
|||
NAME_REF@5..8
|
||||
IDENT@5..8 "Foo"
|
||||
WHITESPACE@8..9 " "
|
||||
ITEM_LIST@9..11
|
||||
ASSOC_ITEM_LIST@9..11
|
||||
L_CURLY@9..10 "{"
|
||||
R_CURLY@10..11 "}"
|
||||
WHITESPACE@11..12 "\n"
|
||||
|
|
|
@ -10,7 +10,7 @@ SOURCE_FILE@0..19
|
|||
NAME_REF@12..15
|
||||
IDENT@12..15 "Foo"
|
||||
WHITESPACE@15..16 " "
|
||||
ITEM_LIST@16..18
|
||||
ASSOC_ITEM_LIST@16..18
|
||||
L_CURLY@16..17 "{"
|
||||
R_CURLY@17..18 "}"
|
||||
WHITESPACE@18..19 "\n"
|
||||
|
|
|
@ -7,7 +7,7 @@ SOURCE_FILE@0..16
|
|||
NAME@11..12
|
||||
IDENT@11..12 "T"
|
||||
WHITESPACE@12..13 " "
|
||||
ITEM_LIST@13..15
|
||||
ASSOC_ITEM_LIST@13..15
|
||||
L_CURLY@13..14 "{"
|
||||
R_CURLY@14..15 "}"
|
||||
WHITESPACE@15..16 "\n"
|
||||
|
|
|
@ -9,7 +9,7 @@ SOURCE_FILE@0..23
|
|||
NAME@18..19
|
||||
IDENT@18..19 "T"
|
||||
WHITESPACE@19..20 " "
|
||||
ITEM_LIST@20..22
|
||||
ASSOC_ITEM_LIST@20..22
|
||||
L_CURLY@20..21 "{"
|
||||
R_CURLY@21..22 "}"
|
||||
WHITESPACE@22..23 "\n"
|
||||
|
|
|
@ -10,7 +10,7 @@ SOURCE_FILE@0..20
|
|||
NAME_REF@13..16
|
||||
IDENT@13..16 "Foo"
|
||||
WHITESPACE@16..17 " "
|
||||
ITEM_LIST@17..19
|
||||
ASSOC_ITEM_LIST@17..19
|
||||
L_CURLY@17..18 "{"
|
||||
R_CURLY@18..19 "}"
|
||||
WHITESPACE@19..20 "\n"
|
||||
|
|
|
@ -17,7 +17,7 @@ SOURCE_FILE@0..94
|
|||
NAME_REF@14..15
|
||||
IDENT@14..15 "F"
|
||||
WHITESPACE@15..16 " "
|
||||
ITEM_LIST@16..93
|
||||
ASSOC_ITEM_LIST@16..93
|
||||
L_CURLY@16..17 "{"
|
||||
WHITESPACE@17..23 "\n "
|
||||
COMMENT@23..48 "//! This is a doc com ..."
|
||||
|
|
|
@ -16,7 +16,7 @@ SOURCE_FILE@0..69
|
|||
NAME_REF@11..14
|
||||
IDENT@11..14 "Foo"
|
||||
WHITESPACE@14..15 " "
|
||||
ITEM_LIST@15..68
|
||||
ASSOC_ITEM_LIST@15..68
|
||||
L_CURLY@15..16 "{"
|
||||
WHITESPACE@16..21 "\n "
|
||||
TYPE_ALIAS_DEF@21..42
|
||||
|
|
|
@ -32,7 +32,7 @@ SOURCE_FILE@0..29
|
|||
IDENT@23..24 "N"
|
||||
R_ANGLE@24..25 ">"
|
||||
WHITESPACE@25..26 " "
|
||||
ITEM_LIST@26..28
|
||||
ASSOC_ITEM_LIST@26..28
|
||||
L_CURLY@26..27 "{"
|
||||
R_CURLY@27..28 "}"
|
||||
WHITESPACE@28..29 "\n"
|
||||
|
|
|
@ -16,7 +16,7 @@ SOURCE_FILE@0..50
|
|||
NAME_REF@11..14
|
||||
IDENT@11..14 "Foo"
|
||||
WHITESPACE@14..15 " "
|
||||
ITEM_LIST@15..49
|
||||
ASSOC_ITEM_LIST@15..49
|
||||
L_CURLY@15..16 "{"
|
||||
WHITESPACE@16..21 "\n "
|
||||
FN_DEF@21..47
|
||||
|
|
|
@ -12,7 +12,7 @@ SOURCE_FILE@0..27
|
|||
NAME_REF@20..23
|
||||
IDENT@20..23 "Foo"
|
||||
WHITESPACE@23..24 " "
|
||||
ITEM_LIST@24..26
|
||||
ASSOC_ITEM_LIST@24..26
|
||||
L_CURLY@24..25 "{"
|
||||
R_CURLY@25..26 "}"
|
||||
WHITESPACE@26..27 "\n"
|
||||
|
|
|
@ -5,7 +5,7 @@ SOURCE_FILE@0..96
|
|||
NAME@6..14
|
||||
IDENT@6..14 "Runnable"
|
||||
WHITESPACE@14..15 " "
|
||||
ITEM_LIST@15..36
|
||||
ASSOC_ITEM_LIST@15..36
|
||||
L_CURLY@15..16 "{"
|
||||
WHITESPACE@16..21 "\n "
|
||||
FN_DEF@21..34
|
||||
|
@ -26,7 +26,7 @@ SOURCE_FILE@0..96
|
|||
NAME@44..57
|
||||
IDENT@44..57 "TraitWithExpr"
|
||||
WHITESPACE@57..58 " "
|
||||
ITEM_LIST@58..95
|
||||
ASSOC_ITEM_LIST@58..95
|
||||
L_CURLY@58..59 "{"
|
||||
WHITESPACE@59..64 "\n "
|
||||
FN_DEF@64..93
|
||||
|
|
|
@ -17,7 +17,7 @@ SOURCE_FILE@0..199
|
|||
NAME_REF@80..83
|
||||
IDENT@80..83 "Foo"
|
||||
WHITESPACE@83..84 " "
|
||||
ITEM_LIST@84..141
|
||||
ASSOC_ITEM_LIST@84..141
|
||||
L_CURLY@84..85 "{"
|
||||
WHITESPACE@85..90 "\n "
|
||||
FN_DEF@90..139
|
||||
|
|
|
@ -98,7 +98,7 @@ SOURCE_FILE@0..686
|
|||
NAME_REF@529..537
|
||||
IDENT@529..537 "Whatever"
|
||||
WHITESPACE@537..538 " "
|
||||
ITEM_LIST@538..685
|
||||
ASSOC_ITEM_LIST@538..685
|
||||
L_CURLY@538..539 "{"
|
||||
WHITESPACE@539..544 "\n "
|
||||
FN_DEF@544..683
|
||||
|
|
|
@ -192,7 +192,7 @@ SOURCE_FILE@0..519
|
|||
NAME@180..183
|
||||
IDENT@180..183 "Foo"
|
||||
WHITESPACE@183..184 " "
|
||||
ITEM_LIST@184..236
|
||||
ASSOC_ITEM_LIST@184..236
|
||||
L_CURLY@184..185 "{"
|
||||
WHITESPACE@185..190 "\n "
|
||||
FN_DEF@190..234
|
||||
|
@ -260,7 +260,7 @@ SOURCE_FILE@0..519
|
|||
NAME_REF@243..244
|
||||
IDENT@243..244 "S"
|
||||
WHITESPACE@244..245 " "
|
||||
ITEM_LIST@245..519
|
||||
ASSOC_ITEM_LIST@245..519
|
||||
L_CURLY@245..246 "{"
|
||||
WHITESPACE@246..252 "\n "
|
||||
FN_DEF@252..277
|
||||
|
|
|
@ -5,7 +5,7 @@ SOURCE_FILE@0..170
|
|||
NAME@6..7
|
||||
IDENT@6..7 "T"
|
||||
WHITESPACE@7..8 " "
|
||||
ITEM_LIST@8..169
|
||||
ASSOC_ITEM_LIST@8..169
|
||||
L_CURLY@8..9 "{"
|
||||
WHITESPACE@9..14 "\n "
|
||||
FN_DEF@14..46
|
||||
|
|
|
@ -8,7 +8,7 @@ SOURCE_FILE@0..137
|
|||
NAME_REF@5..6
|
||||
IDENT@5..6 "U"
|
||||
WHITESPACE@6..7 " "
|
||||
ITEM_LIST@7..136
|
||||
ASSOC_ITEM_LIST@7..136
|
||||
L_CURLY@7..8 "{"
|
||||
WHITESPACE@8..13 "\n "
|
||||
FN_DEF@13..45
|
||||
|
|
|
@ -16,7 +16,7 @@ SOURCE_FILE@0..46
|
|||
NAME_REF@11..14
|
||||
IDENT@11..14 "Foo"
|
||||
WHITESPACE@14..15 " "
|
||||
ITEM_LIST@15..45
|
||||
ASSOC_ITEM_LIST@15..45
|
||||
L_CURLY@15..16 "{"
|
||||
WHITESPACE@16..19 "\n "
|
||||
CONST_DEF@19..43
|
||||
|
|
Loading…
Reference in a new issue