From 879693e63c19b474153473e11f96ab9c321739db Mon Sep 17 00:00:00 2001 From: Matthew Jasper Date: Thu, 11 Jun 2020 18:14:57 +0100 Subject: Move complex inline test to own file --- .../parser/inline/ok/0003_where_pred_for.rast | 252 +-------------------- .../parser/inline/ok/0003_where_pred_for.rs | 16 -- 2 files changed, 1 insertion(+), 267 deletions(-) (limited to 'crates/ra_syntax/test_data/parser/inline') diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast index 4f88bfe43..cd0892451 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast @@ -1,4 +1,4 @@ -SOURCE_FILE@0..292 +SOURCE_FILE@0..54 FN_DEF@0..53 FN_KW@0..2 "fn" WHITESPACE@2..3 " " @@ -58,253 +58,3 @@ SOURCE_FILE@0..292 WHITESPACE@51..52 " " R_CURLY@52..53 "}" WHITESPACE@53..54 "\n" - FN_DEF@54..103 - FN_KW@54..56 "fn" - WHITESPACE@56..57 " " - NAME@57..64 - IDENT@57..64 "for_ref" - TYPE_PARAM_LIST@64..67 - L_ANGLE@64..65 "<" - TYPE_PARAM@65..66 - NAME@65..66 - IDENT@65..66 "F" - R_ANGLE@66..67 ">" - PARAM_LIST@67..69 - L_PAREN@67..68 "(" - R_PAREN@68..69 ")" - WHITESPACE@69..70 "\n" - WHERE_CLAUSE@70..99 - WHERE_KW@70..75 "where" - WHITESPACE@75..79 "\n " - WHERE_PRED@79..99 - FOR_KW@79..82 "for" - TYPE_PARAM_LIST@82..86 - L_ANGLE@82..83 "<" - LIFETIME_PARAM@83..85 - LIFETIME@83..85 "\'a" - R_ANGLE@85..86 ">" - WHITESPACE@86..87 " " - REFERENCE_TYPE@87..92 - AMP@87..88 "&" - LIFETIME@88..90 "\'a" - WHITESPACE@90..91 " " - PATH_TYPE@91..92 - PATH@91..92 - PATH_SEGMENT@91..92 - NAME_REF@91..92 - IDENT@91..92 "F" - COLON@92..93 ":" - WHITESPACE@93..94 " " - TYPE_BOUND_LIST@94..99 - TYPE_BOUND@94..99 - PATH_TYPE@94..99 - PATH@94..99 - PATH_SEGMENT@94..99 - NAME_REF@94..99 - IDENT@94..99 "Debug" - WHITESPACE@99..100 "\n" - BLOCK_EXPR@100..103 - L_CURLY@100..101 "{" - WHITESPACE@101..102 " " - R_CURLY@102..103 "}" - WHITESPACE@103..104 "\n" - FN_DEF@104..164 - FN_KW@104..106 "fn" - WHITESPACE@106..107 " " - NAME@107..117 - IDENT@107..117 "for_parens" - TYPE_PARAM_LIST@117..120 - L_ANGLE@117..118 "<" - TYPE_PARAM@118..119 - NAME@118..119 - IDENT@118..119 "F" - R_ANGLE@119..120 ">" - PARAM_LIST@120..122 - L_PAREN@120..121 "(" - R_PAREN@121..122 ")" - WHITESPACE@122..123 "\n" - WHERE_CLAUSE@123..160 - WHERE_KW@123..128 "where" - WHITESPACE@128..132 "\n " - WHERE_PRED@132..160 - FOR_KW@132..135 "for" - TYPE_PARAM_LIST@135..139 - L_ANGLE@135..136 "<" - LIFETIME_PARAM@136..138 - LIFETIME@136..138 "\'a" - R_ANGLE@138..139 ">" - WHITESPACE@139..140 " " - PAREN_TYPE@140..147 - L_PAREN@140..141 "(" - REFERENCE_TYPE@141..146 - AMP@141..142 "&" - LIFETIME@142..144 "\'a" - WHITESPACE@144..145 " " - PATH_TYPE@145..146 - PATH@145..146 - PATH_SEGMENT@145..146 - NAME_REF@145..146 - IDENT@145..146 "F" - R_PAREN@146..147 ")" - COLON@147..148 ":" - WHITESPACE@148..149 " " - TYPE_BOUND_LIST@149..160 - TYPE_BOUND@149..160 - PATH_TYPE@149..160 - PATH@149..160 - PATH_SEGMENT@149..160 - NAME_REF@149..151 - IDENT@149..151 "Fn" - PARAM_LIST@151..160 - L_PAREN@151..152 "(" - PARAM@152..159 - REFERENCE_TYPE@152..159 - AMP@152..153 "&" - LIFETIME@153..155 "\'a" - WHITESPACE@155..156 " " - PATH_TYPE@156..159 - PATH@156..159 - PATH_SEGMENT@156..159 - NAME_REF@156..159 - IDENT@156..159 "str" - R_PAREN@159..160 ")" - WHITESPACE@160..161 "\n" - BLOCK_EXPR@161..164 - L_CURLY@161..162 "{" - WHITESPACE@162..163 " " - R_CURLY@163..164 "}" - WHITESPACE@164..165 "\n" - FN_DEF@165..215 - FN_KW@165..167 "fn" - WHITESPACE@167..168 " " - NAME@168..177 - IDENT@168..177 "for_slice" - TYPE_PARAM_LIST@177..180 - L_ANGLE@177..178 "<" - TYPE_PARAM@178..179 - NAME@178..179 - IDENT@178..179 "F" - R_ANGLE@179..180 ">" - PARAM_LIST@180..182 - L_PAREN@180..181 "(" - R_PAREN@181..182 ")" - WHITESPACE@182..183 "\n" - WHERE_CLAUSE@183..211 - WHERE_KW@183..188 "where" - WHITESPACE@188..192 "\n " - WHERE_PRED@192..211 - FOR_KW@192..195 "for" - TYPE_PARAM_LIST@195..199 - L_ANGLE@195..196 "<" - LIFETIME_PARAM@196..198 - LIFETIME@196..198 "\'a" - R_ANGLE@198..199 ">" - WHITESPACE@199..200 " " - SLICE_TYPE@200..207 - L_BRACK@200..201 "[" - REFERENCE_TYPE@201..206 - AMP@201..202 "&" - LIFETIME@202..204 "\'a" - WHITESPACE@204..205 " " - PATH_TYPE@205..206 - PATH@205..206 - PATH_SEGMENT@205..206 - NAME_REF@205..206 - IDENT@205..206 "F" - R_BRACK@206..207 "]" - COLON@207..208 ":" - WHITESPACE@208..209 " " - TYPE_BOUND_LIST@209..211 - TYPE_BOUND@209..211 - PATH_TYPE@209..211 - PATH@209..211 - PATH_SEGMENT@209..211 - NAME_REF@209..211 - IDENT@209..211 "Eq" - WHITESPACE@211..212 "\n" - BLOCK_EXPR@212..215 - L_CURLY@212..213 "{" - WHITESPACE@213..214 " " - R_CURLY@214..215 "}" - WHITESPACE@215..216 "\n" - FN_DEF@216..291 - FN_KW@216..218 "fn" - WHITESPACE@218..219 " " - NAME@219..228 - IDENT@219..228 "for_qpath" - TYPE_PARAM_LIST@228..231 - L_ANGLE@228..229 "<" - TYPE_PARAM@229..230 - NAME@229..230 - IDENT@229..230 "T" - R_ANGLE@230..231 ">" - PARAM_LIST@231..239 - L_PAREN@231..232 "(" - PARAM@232..238 - BIND_PAT@232..234 - NAME@232..234 - IDENT@232..234 "_t" - COLON@234..235 ":" - WHITESPACE@235..236 " " - REFERENCE_TYPE@236..238 - AMP@236..237 "&" - PATH_TYPE@237..238 - PATH@237..238 - PATH_SEGMENT@237..238 - NAME_REF@237..238 - IDENT@237..238 "T" - R_PAREN@238..239 ")" - WHITESPACE@239..240 "\n" - WHERE_CLAUSE@240..287 - WHERE_KW@240..245 "where" - WHITESPACE@245..250 "\n " - WHERE_PRED@250..287 - FOR_KW@250..253 "for" - TYPE_PARAM_LIST@253..257 - L_ANGLE@253..254 "<" - LIFETIME_PARAM@254..256 - LIFETIME@254..256 "\'a" - R_ANGLE@256..257 ">" - WHITESPACE@257..258 " " - PATH_TYPE@258..277 - PATH@258..277 - PATH@258..272 - PATH_SEGMENT@258..272 - L_ANGLE@258..259 "<" - REFERENCE_TYPE@259..264 - AMP@259..260 "&" - LIFETIME@260..262 "\'a" - WHITESPACE@262..263 " " - PATH_TYPE@263..264 - PATH@263..264 - PATH_SEGMENT@263..264 - NAME_REF@263..264 - IDENT@263..264 "T" - WHITESPACE@264..265 " " - AS_KW@265..267 "as" - WHITESPACE@267..268 " " - PATH_TYPE@268..271 - PATH@268..271 - PATH_SEGMENT@268..271 - NAME_REF@268..271 - IDENT@268..271 "Baz" - R_ANGLE@271..272 ">" - COLON2@272..274 "::" - PATH_SEGMENT@274..277 - NAME_REF@274..277 - IDENT@274..277 "Foo" - COLON@277..278 ":" - WHITESPACE@278..279 " " - TYPE_BOUND_LIST@279..287 - TYPE_BOUND@279..287 - PATH_TYPE@279..287 - PATH@279..287 - PATH_SEGMENT@279..287 - NAME_REF@279..287 - IDENT@279..287 "Iterator" - WHITESPACE@287..288 "\n" - BLOCK_EXPR@288..291 - L_CURLY@288..289 "{" - WHITESPACE@289..290 " " - R_CURLY@290..291 "}" - WHITESPACE@291..292 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rs b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rs index 2d47596be..423bc105b 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rs @@ -2,19 +2,3 @@ fn for_trait() where for<'a> F: Fn(&'a str) { } -fn for_ref() -where - for<'a> &'a F: Debug -{ } -fn for_parens() -where - for<'a> (&'a F): Fn(&'a str) -{ } -fn for_slice() -where - for<'a> [&'a F]: Eq -{ } -fn for_qpath(_t: &T) -where - for<'a> <&'a T as Baz>::Foo: Iterator -{ } -- cgit v1.2.3