From 642a3392d94b85cf5802cef9ceaa3de7e4571680 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 2 May 2020 01:18:35 +0200 Subject: Update test data --- .../inline/err/0002_misplaced_label_err.rast | 25 +++--- .../inline/err/0006_unsafe_block_in_mod.rast | 10 +-- .../inline/err/0007_async_without_semicolon.rast | 37 +++++---- .../test_data/parser/inline/err/0008_pub_expr.rast | 25 +++--- .../inline/err/0009_attr_on_expr_not_allowed.rast | 92 +++++++++++----------- .../inline/err/0010_bad_tuple_index_expr.rast | 77 +++++++++--------- .../parser/inline/err/0010_wrong_order_fns.rast | 10 +-- .../parser/inline/err/0014_default_fn_type.rast | 5 +- ...14_record_literal_before_ellipsis_recovery.rast | 71 ++++++++--------- 9 files changed, 170 insertions(+), 182 deletions(-) (limited to 'crates/ra_syntax/test_data/parser/inline/err') diff --git a/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast b/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast index 85bf276a0..75668c818 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast @@ -9,19 +9,18 @@ SOURCE_FILE@0..30 R_PAREN@8..9 ")" WHITESPACE@9..10 " " BLOCK_EXPR@10..29 - BLOCK@10..29 - L_CURLY@10..11 "{" - WHITESPACE@11..16 "\n " - EXPR_STMT@16..22 - ERROR@16..22 - LABEL@16..22 - LIFETIME@16..21 "\'loop" - COLON@21..22 ":" - WHITESPACE@22..23 " " - IMPL_DEF@23..27 - IMPL_KW@23..27 "impl" - WHITESPACE@27..28 "\n" - R_CURLY@28..29 "}" + L_CURLY@10..11 "{" + WHITESPACE@11..16 "\n " + EXPR_STMT@16..22 + ERROR@16..22 + LABEL@16..22 + LIFETIME@16..21 "\'loop" + COLON@21..22 ":" + WHITESPACE@22..23 " " + IMPL_DEF@23..27 + IMPL_KW@23..27 "impl" + WHITESPACE@27..28 "\n" + R_CURLY@28..29 "}" WHITESPACE@29..30 "\n" error 22..22: expected a loop error 22..22: expected SEMICOLON diff --git a/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast b/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast index b901c17f7..c789e8d82 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast @@ -8,9 +8,8 @@ SOURCE_FILE@0..33 L_PAREN@6..7 "(" R_PAREN@7..8 ")" BLOCK_EXPR@8..10 - BLOCK@8..10 - L_CURLY@8..9 "{" - R_CURLY@9..10 "}" + L_CURLY@8..9 "{" + R_CURLY@9..10 "}" WHITESPACE@10..11 " " ERROR@11..17 UNSAFE_KW@11..17 "unsafe" @@ -29,9 +28,8 @@ SOURCE_FILE@0..33 L_PAREN@28..29 "(" R_PAREN@29..30 ")" BLOCK_EXPR@30..32 - BLOCK@30..32 - L_CURLY@30..31 "{" - R_CURLY@31..32 "}" + L_CURLY@30..31 "{" + R_CURLY@31..32 "}" WHITESPACE@32..33 "\n" error 11..11: expected an item error 18..18: expected an item diff --git a/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast b/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast index 3f48b86ed..cd24313d4 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast @@ -9,24 +9,23 @@ SOURCE_FILE@0..30 R_PAREN@7..8 ")" WHITESPACE@8..9 " " BLOCK_EXPR@9..29 - BLOCK@9..29 - L_CURLY@9..10 "{" - WHITESPACE@10..11 " " - LET_STMT@11..27 - LET_KW@11..14 "let" - WHITESPACE@14..15 " " - PLACEHOLDER_PAT@15..16 - UNDERSCORE@15..16 "_" - WHITESPACE@16..17 " " - EQ@17..18 "=" - WHITESPACE@18..19 " " - BLOCK_EXPR@19..27 - ASYNC_KW@19..24 "async" - WHITESPACE@24..25 " " - BLOCK@25..27 - L_CURLY@25..26 "{" - R_CURLY@26..27 "}" - WHITESPACE@27..28 " " - R_CURLY@28..29 "}" + L_CURLY@9..10 "{" + WHITESPACE@10..11 " " + LET_STMT@11..27 + LET_KW@11..14 "let" + WHITESPACE@14..15 " " + PLACEHOLDER_PAT@15..16 + UNDERSCORE@15..16 "_" + WHITESPACE@16..17 " " + EQ@17..18 "=" + WHITESPACE@18..19 " " + EFFECT_EXPR@19..27 + ASYNC_KW@19..24 "async" + WHITESPACE@24..25 " " + BLOCK_EXPR@25..27 + L_CURLY@25..26 "{" + R_CURLY@26..27 "}" + WHITESPACE@27..28 " " + R_CURLY@28..29 "}" WHITESPACE@29..30 "\n" error 27..27: expected SEMICOLON diff --git a/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rast b/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rast index be02eaeeb..c5fa7a404 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rast @@ -9,18 +9,17 @@ SOURCE_FILE@0..21 R_PAREN@7..8 ")" WHITESPACE@8..9 " " BLOCK_EXPR@9..20 - BLOCK@9..20 - L_CURLY@9..10 "{" - WHITESPACE@10..11 " " - ERROR@11..14 - VISIBILITY@11..14 - PUB_KW@11..14 "pub" - WHITESPACE@14..15 " " - EXPR_STMT@15..18 - LITERAL@15..17 - INT_NUMBER@15..17 "92" - SEMICOLON@17..18 ";" - WHITESPACE@18..19 " " - R_CURLY@19..20 "}" + L_CURLY@9..10 "{" + WHITESPACE@10..11 " " + ERROR@11..14 + VISIBILITY@11..14 + PUB_KW@11..14 "pub" + WHITESPACE@14..15 " " + EXPR_STMT@15..18 + LITERAL@15..17 + INT_NUMBER@15..17 "92" + SEMICOLON@17..18 ";" + WHITESPACE@18..19 " " + R_CURLY@19..20 "}" WHITESPACE@20..21 "\n" error 14..14: expected an item diff --git a/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast b/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast index b344e4f7f..0656fdf73 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast @@ -9,53 +9,51 @@ SOURCE_FILE@0..48 R_PAREN@7..8 ")" WHITESPACE@8..9 " " BLOCK_EXPR@9..47 - BLOCK@9..47 - L_CURLY@9..10 "{" - WHITESPACE@10..14 "\n " - EXPR_STMT@14..25 - ATTR@14..18 - POUND@14..15 "#" - L_BRACK@15..16 "[" - PATH@16..17 - PATH_SEGMENT@16..17 - NAME_REF@16..17 - IDENT@16..17 "A" - R_BRACK@17..18 "]" - WHITESPACE@18..19 " " - BIN_EXPR@19..24 - LITERAL@19..20 - INT_NUMBER@19..20 "1" - WHITESPACE@20..21 " " - PLUS@21..22 "+" - WHITESPACE@22..23 " " - LITERAL@23..24 - INT_NUMBER@23..24 "2" - SEMICOLON@24..25 ";" - WHITESPACE@25..29 "\n " - EXPR_STMT@29..45 - ATTR@29..33 - POUND@29..30 "#" - L_BRACK@30..31 "[" - PATH@31..32 - PATH_SEGMENT@31..32 - NAME_REF@31..32 - IDENT@31..32 "B" - R_BRACK@32..33 "]" - WHITESPACE@33..34 " " - IF_EXPR@34..44 - IF_KW@34..36 "if" - WHITESPACE@36..37 " " - CONDITION@37..41 - LITERAL@37..41 - TRUE_KW@37..41 "true" - WHITESPACE@41..42 " " - BLOCK_EXPR@42..44 - BLOCK@42..44 - L_CURLY@42..43 "{" - R_CURLY@43..44 "}" - SEMICOLON@44..45 ";" - WHITESPACE@45..46 "\n" - R_CURLY@46..47 "}" + L_CURLY@9..10 "{" + WHITESPACE@10..14 "\n " + EXPR_STMT@14..25 + ATTR@14..18 + POUND@14..15 "#" + L_BRACK@15..16 "[" + PATH@16..17 + PATH_SEGMENT@16..17 + NAME_REF@16..17 + IDENT@16..17 "A" + R_BRACK@17..18 "]" + WHITESPACE@18..19 " " + BIN_EXPR@19..24 + LITERAL@19..20 + INT_NUMBER@19..20 "1" + WHITESPACE@20..21 " " + PLUS@21..22 "+" + WHITESPACE@22..23 " " + LITERAL@23..24 + INT_NUMBER@23..24 "2" + SEMICOLON@24..25 ";" + WHITESPACE@25..29 "\n " + EXPR_STMT@29..45 + ATTR@29..33 + POUND@29..30 "#" + L_BRACK@30..31 "[" + PATH@31..32 + PATH_SEGMENT@31..32 + NAME_REF@31..32 + IDENT@31..32 "B" + R_BRACK@32..33 "]" + WHITESPACE@33..34 " " + IF_EXPR@34..44 + IF_KW@34..36 "if" + WHITESPACE@36..37 " " + CONDITION@37..41 + LITERAL@37..41 + TRUE_KW@37..41 "true" + WHITESPACE@41..42 " " + BLOCK_EXPR@42..44 + L_CURLY@42..43 "{" + R_CURLY@43..44 "}" + SEMICOLON@44..45 ";" + WHITESPACE@45..46 "\n" + R_CURLY@46..47 "}" WHITESPACE@47..48 "\n" error 24..24: attributes are not allowed on BIN_EXPR error 44..44: attributes are not allowed on IF_EXPR diff --git a/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast b/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast index 5339a84d7..e1abc5633 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast @@ -9,45 +9,44 @@ SOURCE_FILE@0..47 R_PAREN@7..8 ")" WHITESPACE@8..9 " " BLOCK_EXPR@9..46 - BLOCK@9..46 - L_CURLY@9..10 "{" - WHITESPACE@10..15 "\n " - EXPR_STMT@15..20 - FIELD_EXPR@15..19 - PATH_EXPR@15..16 - PATH@15..16 - PATH_SEGMENT@15..16 - NAME_REF@15..16 - IDENT@15..16 "x" - DOT@16..17 "." - FLOAT_NUMBER@17..19 "0." - SEMICOLON@19..20 ";" - WHITESPACE@20..25 "\n " - EXPR_STMT@25..32 - FIELD_EXPR@25..31 - PATH_EXPR@25..26 - PATH@25..26 - PATH_SEGMENT@25..26 - NAME_REF@25..26 - IDENT@25..26 "x" - DOT@26..27 "." - NAME_REF@27..31 - INT_NUMBER@27..31 "1i32" - SEMICOLON@31..32 ";" - WHITESPACE@32..37 "\n " - EXPR_STMT@37..44 - FIELD_EXPR@37..43 - PATH_EXPR@37..38 - PATH@37..38 - PATH_SEGMENT@37..38 - NAME_REF@37..38 - IDENT@37..38 "x" - DOT@38..39 "." - NAME_REF@39..43 - INT_NUMBER@39..43 "0x01" - SEMICOLON@43..44 ";" - WHITESPACE@44..45 "\n" - R_CURLY@45..46 "}" + L_CURLY@9..10 "{" + WHITESPACE@10..15 "\n " + EXPR_STMT@15..20 + FIELD_EXPR@15..19 + PATH_EXPR@15..16 + PATH@15..16 + PATH_SEGMENT@15..16 + NAME_REF@15..16 + IDENT@15..16 "x" + DOT@16..17 "." + FLOAT_NUMBER@17..19 "0." + SEMICOLON@19..20 ";" + WHITESPACE@20..25 "\n " + EXPR_STMT@25..32 + FIELD_EXPR@25..31 + PATH_EXPR@25..26 + PATH@25..26 + PATH_SEGMENT@25..26 + NAME_REF@25..26 + IDENT@25..26 "x" + DOT@26..27 "." + NAME_REF@27..31 + INT_NUMBER@27..31 "1i32" + SEMICOLON@31..32 ";" + WHITESPACE@32..37 "\n " + EXPR_STMT@37..44 + FIELD_EXPR@37..43 + PATH_EXPR@37..38 + PATH@37..38 + PATH_SEGMENT@37..38 + NAME_REF@37..38 + IDENT@37..38 "x" + DOT@38..39 "." + NAME_REF@39..43 + INT_NUMBER@39..43 "0x01" + SEMICOLON@43..44 ";" + WHITESPACE@44..45 "\n" + R_CURLY@45..46 "}" WHITESPACE@46..47 "\n" error 27..31: Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix error 39..43: Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix diff --git a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast index 20ed39046..9be441110 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast @@ -14,9 +14,8 @@ SOURCE_FILE@0..50 R_PAREN@20..21 ")" WHITESPACE@21..22 " " BLOCK_EXPR@22..24 - BLOCK@22..24 - L_CURLY@22..23 "{" - R_CURLY@23..24 "}" + L_CURLY@22..23 "{" + R_CURLY@23..24 "}" WHITESPACE@24..25 "\n" ERROR@25..31 UNSAFE_KW@25..31 "unsafe" @@ -33,9 +32,8 @@ SOURCE_FILE@0..50 R_PAREN@45..46 ")" WHITESPACE@46..47 " " BLOCK_EXPR@47..49 - BLOCK@47..49 - L_CURLY@47..48 "{" - R_CURLY@48..49 "}" + L_CURLY@47..48 "{" + R_CURLY@48..49 "}" WHITESPACE@49..50 "\n" error 6..6: expected existential, fn, trait or impl error 31..31: expected existential, fn, trait or impl diff --git a/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast index 88567263e..b8cd0587d 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast @@ -45,9 +45,8 @@ SOURCE_FILE@0..62 R_PAREN@55..56 ")" WHITESPACE@56..57 " " BLOCK_EXPR@57..59 - BLOCK@57..59 - L_CURLY@57..58 "{" - R_CURLY@58..59 "}" + L_CURLY@57..58 "{" + R_CURLY@58..59 "}" WHITESPACE@59..60 "\n" R_CURLY@60..61 "}" WHITESPACE@61..62 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast b/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast index 578befa56..a9de44b57 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast @@ -9,41 +9,40 @@ SOURCE_FILE@0..45 R_PAREN@8..9 ")" WHITESPACE@9..10 " " BLOCK_EXPR@10..44 - BLOCK@10..44 - L_CURLY@10..11 "{" - WHITESPACE@11..16 "\n " - RECORD_LIT@16..42 - PATH@16..17 - PATH_SEGMENT@16..17 - NAME_REF@16..17 - IDENT@16..17 "S" - WHITESPACE@17..18 " " - RECORD_FIELD_LIST@18..42 - L_CURLY@18..19 "{" - WHITESPACE@19..20 " " - RECORD_FIELD@20..40 - NAME_REF@20..25 - IDENT@20..25 "field" - WHITESPACE@25..26 " " - RANGE_EXPR@26..40 - DOT2@26..28 ".." - CALL_EXPR@28..40 - PATH_EXPR@28..38 - PATH@28..38 - PATH@28..29 - PATH_SEGMENT@28..29 - NAME_REF@28..29 - IDENT@28..29 "S" - COLON2@29..31 "::" - PATH_SEGMENT@31..38 - NAME_REF@31..38 - IDENT@31..38 "default" - ARG_LIST@38..40 - L_PAREN@38..39 "(" - R_PAREN@39..40 ")" - WHITESPACE@40..41 " " - R_CURLY@41..42 "}" - WHITESPACE@42..43 "\n" - R_CURLY@43..44 "}" + L_CURLY@10..11 "{" + WHITESPACE@11..16 "\n " + RECORD_LIT@16..42 + PATH@16..17 + PATH_SEGMENT@16..17 + NAME_REF@16..17 + IDENT@16..17 "S" + WHITESPACE@17..18 " " + RECORD_FIELD_LIST@18..42 + L_CURLY@18..19 "{" + WHITESPACE@19..20 " " + RECORD_FIELD@20..40 + NAME_REF@20..25 + IDENT@20..25 "field" + WHITESPACE@25..26 " " + RANGE_EXPR@26..40 + DOT2@26..28 ".." + CALL_EXPR@28..40 + PATH_EXPR@28..38 + PATH@28..38 + PATH@28..29 + PATH_SEGMENT@28..29 + NAME_REF@28..29 + IDENT@28..29 "S" + COLON2@29..31 "::" + PATH_SEGMENT@31..38 + NAME_REF@31..38 + IDENT@31..38 "default" + ARG_LIST@38..40 + L_PAREN@38..39 "(" + R_PAREN@39..40 ")" + WHITESPACE@40..41 " " + R_CURLY@41..42 "}" + WHITESPACE@42..43 "\n" + R_CURLY@43..44 "}" WHITESPACE@44..45 "\n" error 25..25: expected COLON -- cgit v1.2.3