From 7e9c74d20bb8b33889179315f82160285469c5f6 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 27 Dec 2021 21:26:02 +0300 Subject: [PATCH] drop dead code --- crates/ide_ssr/src/parsing.rs | 1 - crates/syntax/src/lib.rs | 7 -- crates/syntax/src/tests.rs | 18 ----- .../expr/err/0000_truncated_add.rast | 1 - .../fragments/expr/err/0000_truncated_add.rs | 1 - .../parser/fragments/expr/ok/0000_add.rast | 8 --- .../parser/fragments/expr/ok/0000_add.rs | 1 - .../parser/fragments/stmt/err/0000_attr.rast | 1 - .../parser/fragments/stmt/err/0000_attr.rs | 1 - .../stmt/err/0000_multiple_stmts.rast | 1 - .../fragments/stmt/err/0000_multiple_stmts.rs | 1 - .../stmt/err/0000_open_parenthesis.rast | 1 - .../stmt/err/0000_open_parenthesis.rs | 1 - .../fragments/stmt/err/0000_semicolon.rast | 1 - .../fragments/stmt/err/0000_semicolon.rs | 1 - .../stmt/err/0000_unterminated_expr.rast | 1 - .../stmt/err/0000_unterminated_expr.rs | 1 - .../parser/fragments/stmt/ok/0000_expr.rast | 9 --- .../parser/fragments/stmt/ok/0000_expr.rs | 1 - .../fragments/stmt/ok/0000_expr_block.rast | 70 ------------------- .../fragments/stmt/ok/0000_expr_block.rs | 5 -- .../fragments/stmt/ok/0000_fn_call.rast | 11 --- .../parser/fragments/stmt/ok/0000_fn_call.rs | 1 - .../fragments/stmt/ok/0000_let_stmt.rast | 12 ---- .../parser/fragments/stmt/ok/0000_let_stmt.rs | 1 - .../stmt/ok/0000_macro_let_stmt.rast | 21 ------ .../fragments/stmt/ok/0000_macro_let_stmt.rs | 1 - .../ok/0000_macro_unterminated_let_stmt.rast | 21 ------ .../ok/0000_macro_unterminated_let_stmt.rs | 1 - .../fragments/stmt/ok/0000_struct_item.rast | 22 ------ .../fragments/stmt/ok/0000_struct_item.rs | 3 - .../stmt/ok/0000_unterminated_fn_call.rast | 10 --- .../stmt/ok/0000_unterminated_fn_call.rs | 1 - .../stmt/ok/0000_unterminated_let_stmt.rast | 11 --- .../stmt/ok/0000_unterminated_let_stmt.rs | 1 - 35 files changed, 249 deletions(-) delete mode 100644 crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rast delete mode 100644 crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rs delete mode 100644 crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rast delete mode 100644 crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rs delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/err/0000_attr.rast delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/err/0000_attr.rs delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/err/0000_multiple_stmts.rast delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/err/0000_multiple_stmts.rs delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/err/0000_open_parenthesis.rast delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/err/0000_open_parenthesis.rs delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/err/0000_semicolon.rast delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/err/0000_semicolon.rs delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/err/0000_unterminated_expr.rast delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/err/0000_unterminated_expr.rs delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr.rast delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr.rs delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr_block.rast delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr_block.rs delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_fn_call.rast delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_fn_call.rs delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_let_stmt.rast delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_let_stmt.rs delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_let_stmt.rast delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_let_stmt.rs delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_unterminated_let_stmt.rast delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_unterminated_let_stmt.rs delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_struct_item.rast delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_struct_item.rs delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_fn_call.rast delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_fn_call.rs delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_let_stmt.rast delete mode 100644 crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_let_stmt.rs diff --git a/crates/ide_ssr/src/parsing.rs b/crates/ide_ssr/src/parsing.rs index 7d1947dda8..d70823403e 100644 --- a/crates/ide_ssr/src/parsing.rs +++ b/crates/ide_ssr/src/parsing.rs @@ -81,7 +81,6 @@ impl ParsedRule { } builder.try_add2(fragments::ty(&raw_pattern), raw_template.map(fragments::ty)); builder.try_add2(fragments::item(&raw_pattern), raw_template.map(fragments::item)); - builder.try_add(ast::Path::parse(&raw_pattern), raw_template.map(ast::Path::parse)); builder.try_add(ast::Pat::parse(&raw_pattern), raw_template.map(ast::Pat::parse)); builder.try_add2(fragments::stmt(&raw_pattern), raw_template_stmt); builder.build() diff --git a/crates/syntax/src/lib.rs b/crates/syntax/src/lib.rs index a495e4aff1..912bf4d1da 100644 --- a/crates/syntax/src/lib.rs +++ b/crates/syntax/src/lib.rs @@ -201,13 +201,6 @@ impl ast::Attr { } } -impl ast::Stmt { - /// Returns `text`, parsed as statement, but only if it has no errors. - pub fn parse(text: &str) -> Result { - parsing::parse_text_as(text, parser::ParserEntryPoint::StatementOptionalSemi) - } -} - /// Matches a `SyntaxNode` against an `ast` type. /// /// # Example: diff --git a/crates/syntax/src/tests.rs b/crates/syntax/src/tests.rs index a1f35aab68..58c4b5b8fc 100644 --- a/crates/syntax/src/tests.rs +++ b/crates/syntax/src/tests.rs @@ -59,15 +59,6 @@ fn validation_tests() { }); } -#[test] -fn expr_parser_tests() { - fragment_parser_dir_test( - &["parser/fragments/expr/ok"], - &["parser/fragments/expr/err"], - crate::ast::Expr::parse, - ); -} - #[test] fn path_parser_tests() { fragment_parser_dir_test( @@ -86,15 +77,6 @@ fn pattern_parser_tests() { ); } -#[test] -fn stmt_parser_tests() { - fragment_parser_dir_test( - &["parser/fragments/stmt/ok"], - &["parser/fragments/stmt/err"], - crate::ast::Stmt::parse, - ); -} - #[test] fn parser_fuzz_tests() { for (_, text) in collect_rust_files(&test_data_dir(), &["parser/fuzz-failures"]) { diff --git a/crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rast b/crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rast deleted file mode 100644 index 5df7507e2d..0000000000 --- a/crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rast +++ /dev/null @@ -1 +0,0 @@ -ERROR diff --git a/crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rs b/crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rs deleted file mode 100644 index ca49acb079..0000000000 --- a/crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rs +++ /dev/null @@ -1 +0,0 @@ -1 + diff --git a/crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rast b/crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rast deleted file mode 100644 index fa78a02a6b..0000000000 --- a/crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rast +++ /dev/null @@ -1,8 +0,0 @@ -BIN_EXPR@0..5 - LITERAL@0..1 - INT_NUMBER@0..1 "1" - WHITESPACE@1..2 " " - PLUS@2..3 "+" - WHITESPACE@3..4 " " - LITERAL@4..5 - INT_NUMBER@4..5 "2" diff --git a/crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rs b/crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rs deleted file mode 100644 index e0ef584020..0000000000 --- a/crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rs +++ /dev/null @@ -1 +0,0 @@ -1 + 2 diff --git a/crates/syntax/test_data/parser/fragments/stmt/err/0000_attr.rast b/crates/syntax/test_data/parser/fragments/stmt/err/0000_attr.rast deleted file mode 100644 index 5df7507e2d..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/err/0000_attr.rast +++ /dev/null @@ -1 +0,0 @@ -ERROR diff --git a/crates/syntax/test_data/parser/fragments/stmt/err/0000_attr.rs b/crates/syntax/test_data/parser/fragments/stmt/err/0000_attr.rs deleted file mode 100644 index 988df07059..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/err/0000_attr.rs +++ /dev/null @@ -1 +0,0 @@ -#[foo] diff --git a/crates/syntax/test_data/parser/fragments/stmt/err/0000_multiple_stmts.rast b/crates/syntax/test_data/parser/fragments/stmt/err/0000_multiple_stmts.rast deleted file mode 100644 index 5df7507e2d..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/err/0000_multiple_stmts.rast +++ /dev/null @@ -1 +0,0 @@ -ERROR diff --git a/crates/syntax/test_data/parser/fragments/stmt/err/0000_multiple_stmts.rs b/crates/syntax/test_data/parser/fragments/stmt/err/0000_multiple_stmts.rs deleted file mode 100644 index 7e3b2fd493..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/err/0000_multiple_stmts.rs +++ /dev/null @@ -1 +0,0 @@ -a(); b(); c() diff --git a/crates/syntax/test_data/parser/fragments/stmt/err/0000_open_parenthesis.rast b/crates/syntax/test_data/parser/fragments/stmt/err/0000_open_parenthesis.rast deleted file mode 100644 index 5df7507e2d..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/err/0000_open_parenthesis.rast +++ /dev/null @@ -1 +0,0 @@ -ERROR diff --git a/crates/syntax/test_data/parser/fragments/stmt/err/0000_open_parenthesis.rs b/crates/syntax/test_data/parser/fragments/stmt/err/0000_open_parenthesis.rs deleted file mode 100644 index 2d06f37663..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/err/0000_open_parenthesis.rs +++ /dev/null @@ -1 +0,0 @@ -( diff --git a/crates/syntax/test_data/parser/fragments/stmt/err/0000_semicolon.rast b/crates/syntax/test_data/parser/fragments/stmt/err/0000_semicolon.rast deleted file mode 100644 index 5df7507e2d..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/err/0000_semicolon.rast +++ /dev/null @@ -1 +0,0 @@ -ERROR diff --git a/crates/syntax/test_data/parser/fragments/stmt/err/0000_semicolon.rs b/crates/syntax/test_data/parser/fragments/stmt/err/0000_semicolon.rs deleted file mode 100644 index 092bc2b041..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/err/0000_semicolon.rs +++ /dev/null @@ -1 +0,0 @@ -; diff --git a/crates/syntax/test_data/parser/fragments/stmt/err/0000_unterminated_expr.rast b/crates/syntax/test_data/parser/fragments/stmt/err/0000_unterminated_expr.rast deleted file mode 100644 index 5df7507e2d..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/err/0000_unterminated_expr.rast +++ /dev/null @@ -1 +0,0 @@ -ERROR diff --git a/crates/syntax/test_data/parser/fragments/stmt/err/0000_unterminated_expr.rs b/crates/syntax/test_data/parser/fragments/stmt/err/0000_unterminated_expr.rs deleted file mode 100644 index ca49acb079..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/err/0000_unterminated_expr.rs +++ /dev/null @@ -1 +0,0 @@ -1 + diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr.rast b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr.rast deleted file mode 100644 index 274fdf16de..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr.rast +++ /dev/null @@ -1,9 +0,0 @@ -EXPR_STMT@0..5 - BIN_EXPR@0..5 - LITERAL@0..1 - INT_NUMBER@0..1 "1" - WHITESPACE@1..2 " " - PLUS@2..3 "+" - WHITESPACE@3..4 " " - LITERAL@4..5 - INT_NUMBER@4..5 "1" diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr.rs b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr.rs deleted file mode 100644 index 8d2f0971e2..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr.rs +++ /dev/null @@ -1 +0,0 @@ -1 + 1 diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr_block.rast b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr_block.rast deleted file mode 100644 index a2d4f18988..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr_block.rast +++ /dev/null @@ -1,70 +0,0 @@ -EXPR_STMT@0..55 - BLOCK_EXPR@0..55 - STMT_LIST@0..55 - L_CURLY@0..1 "{" - WHITESPACE@1..6 "\n " - LET_STMT@6..20 - LET_KW@6..9 "let" - WHITESPACE@9..10 " " - IDENT_PAT@10..11 - NAME@10..11 - IDENT@10..11 "x" - WHITESPACE@11..12 " " - EQ@12..13 "=" - WHITESPACE@13..14 " " - CALL_EXPR@14..19 - PATH_EXPR@14..17 - PATH@14..17 - PATH_SEGMENT@14..17 - NAME_REF@14..17 - IDENT@14..17 "foo" - ARG_LIST@17..19 - L_PAREN@17..18 "(" - R_PAREN@18..19 ")" - SEMICOLON@19..20 ";" - WHITESPACE@20..25 "\n " - LET_STMT@25..39 - LET_KW@25..28 "let" - WHITESPACE@28..29 " " - IDENT_PAT@29..30 - NAME@29..30 - IDENT@29..30 "y" - WHITESPACE@30..31 " " - EQ@31..32 "=" - WHITESPACE@32..33 " " - CALL_EXPR@33..38 - PATH_EXPR@33..36 - PATH@33..36 - PATH_SEGMENT@33..36 - NAME_REF@33..36 - IDENT@33..36 "bar" - ARG_LIST@36..38 - L_PAREN@36..37 "(" - R_PAREN@37..38 ")" - SEMICOLON@38..39 ";" - WHITESPACE@39..44 "\n " - CALL_EXPR@44..53 - PATH_EXPR@44..46 - PATH@44..46 - PATH_SEGMENT@44..46 - NAME_REF@44..46 - IDENT@44..46 "Ok" - ARG_LIST@46..53 - L_PAREN@46..47 "(" - BIN_EXPR@47..52 - PATH_EXPR@47..48 - PATH@47..48 - PATH_SEGMENT@47..48 - NAME_REF@47..48 - IDENT@47..48 "x" - WHITESPACE@48..49 " " - PLUS@49..50 "+" - WHITESPACE@50..51 " " - PATH_EXPR@51..52 - PATH@51..52 - PATH_SEGMENT@51..52 - NAME_REF@51..52 - IDENT@51..52 "y" - R_PAREN@52..53 ")" - WHITESPACE@53..54 "\n" - R_CURLY@54..55 "}" diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr_block.rs b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr_block.rs deleted file mode 100644 index ffa5c1e66e..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_expr_block.rs +++ /dev/null @@ -1,5 +0,0 @@ -{ - let x = foo(); - let y = bar(); - Ok(x + y) -} diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_fn_call.rast b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_fn_call.rast deleted file mode 100644 index 8c186da93e..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_fn_call.rast +++ /dev/null @@ -1,11 +0,0 @@ -EXPR_STMT@0..6 - CALL_EXPR@0..5 - PATH_EXPR@0..3 - PATH@0..3 - PATH_SEGMENT@0..3 - NAME_REF@0..3 - IDENT@0..3 "foo" - ARG_LIST@3..5 - L_PAREN@3..4 "(" - R_PAREN@4..5 ")" - SEMICOLON@5..6 ";" diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_fn_call.rs b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_fn_call.rs deleted file mode 100644 index a280f9a5cc..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_fn_call.rs +++ /dev/null @@ -1 +0,0 @@ -foo(); diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_let_stmt.rast b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_let_stmt.rast deleted file mode 100644 index 8ab38da21c..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_let_stmt.rast +++ /dev/null @@ -1,12 +0,0 @@ -LET_STMT@0..11 - LET_KW@0..3 "let" - WHITESPACE@3..4 " " - IDENT_PAT@4..5 - NAME@4..5 - IDENT@4..5 "x" - WHITESPACE@5..6 " " - EQ@6..7 "=" - WHITESPACE@7..8 " " - LITERAL@8..10 - INT_NUMBER@8..10 "10" - SEMICOLON@10..11 ";" diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_let_stmt.rs b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_let_stmt.rs deleted file mode 100644 index de8a7f1fc6..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_let_stmt.rs +++ /dev/null @@ -1 +0,0 @@ -let x = 10; diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_let_stmt.rast b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_let_stmt.rast deleted file mode 100644 index 81d6df29a5..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_let_stmt.rast +++ /dev/null @@ -1,21 +0,0 @@ -EXPR_STMT@0..18 - MACRO_CALL@0..17 - PATH@0..2 - PATH_SEGMENT@0..2 - NAME_REF@0..2 - IDENT@0..2 "m1" - BANG@2..3 "!" - TOKEN_TREE@3..17 - L_CURLY@3..4 "{" - WHITESPACE@4..5 " " - LET_KW@5..8 "let" - WHITESPACE@8..9 " " - IDENT@9..10 "a" - WHITESPACE@10..11 " " - EQ@11..12 "=" - WHITESPACE@12..13 " " - INT_NUMBER@13..14 "0" - SEMICOLON@14..15 ";" - WHITESPACE@15..16 " " - R_CURLY@16..17 "}" - SEMICOLON@17..18 ";" diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_let_stmt.rs b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_let_stmt.rs deleted file mode 100644 index 075f30159b..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_let_stmt.rs +++ /dev/null @@ -1 +0,0 @@ -m1!{ let a = 0; }; diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_unterminated_let_stmt.rast b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_unterminated_let_stmt.rast deleted file mode 100644 index 81d6df29a5..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_unterminated_let_stmt.rast +++ /dev/null @@ -1,21 +0,0 @@ -EXPR_STMT@0..18 - MACRO_CALL@0..17 - PATH@0..2 - PATH_SEGMENT@0..2 - NAME_REF@0..2 - IDENT@0..2 "m1" - BANG@2..3 "!" - TOKEN_TREE@3..17 - L_CURLY@3..4 "{" - WHITESPACE@4..5 " " - LET_KW@5..8 "let" - WHITESPACE@8..9 " " - IDENT@9..10 "a" - WHITESPACE@10..11 " " - EQ@11..12 "=" - WHITESPACE@12..13 " " - INT_NUMBER@13..14 "0" - SEMICOLON@14..15 ";" - WHITESPACE@15..16 " " - R_CURLY@16..17 "}" - SEMICOLON@17..18 ";" diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_unterminated_let_stmt.rs b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_unterminated_let_stmt.rs deleted file mode 100644 index 075f30159b..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_macro_unterminated_let_stmt.rs +++ /dev/null @@ -1 +0,0 @@ -m1!{ let a = 0; }; diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_struct_item.rast b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_struct_item.rast deleted file mode 100644 index 64c5d29691..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_struct_item.rast +++ /dev/null @@ -1,22 +0,0 @@ -STRUCT@0..28 - STRUCT_KW@0..6 "struct" - WHITESPACE@6..7 " " - NAME@7..10 - IDENT@7..10 "Foo" - WHITESPACE@10..11 " " - RECORD_FIELD_LIST@11..28 - L_CURLY@11..12 "{" - WHITESPACE@12..17 "\n " - RECORD_FIELD@17..25 - NAME@17..20 - IDENT@17..20 "bar" - COLON@20..21 ":" - WHITESPACE@21..22 " " - PATH_TYPE@22..25 - PATH@22..25 - PATH_SEGMENT@22..25 - NAME_REF@22..25 - IDENT@22..25 "u32" - COMMA@25..26 "," - WHITESPACE@26..27 "\n" - R_CURLY@27..28 "}" diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_struct_item.rs b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_struct_item.rs deleted file mode 100644 index e5473e3ac8..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_struct_item.rs +++ /dev/null @@ -1,3 +0,0 @@ -struct Foo { - bar: u32, -} diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_fn_call.rast b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_fn_call.rast deleted file mode 100644 index 9089906bce..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_fn_call.rast +++ /dev/null @@ -1,10 +0,0 @@ -EXPR_STMT@0..5 - CALL_EXPR@0..5 - PATH_EXPR@0..3 - PATH@0..3 - PATH_SEGMENT@0..3 - NAME_REF@0..3 - IDENT@0..3 "foo" - ARG_LIST@3..5 - L_PAREN@3..4 "(" - R_PAREN@4..5 ")" diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_fn_call.rs b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_fn_call.rs deleted file mode 100644 index eb28ef4401..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_fn_call.rs +++ /dev/null @@ -1 +0,0 @@ -foo() diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_let_stmt.rast b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_let_stmt.rast deleted file mode 100644 index 37663671fa..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_let_stmt.rast +++ /dev/null @@ -1,11 +0,0 @@ -LET_STMT@0..10 - LET_KW@0..3 "let" - WHITESPACE@3..4 " " - IDENT_PAT@4..5 - NAME@4..5 - IDENT@4..5 "x" - WHITESPACE@5..6 " " - EQ@6..7 "=" - WHITESPACE@7..8 " " - LITERAL@8..10 - INT_NUMBER@8..10 "10" diff --git a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_let_stmt.rs b/crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_let_stmt.rs deleted file mode 100644 index 78364b2a96..0000000000 --- a/crates/syntax/test_data/parser/fragments/stmt/ok/0000_unterminated_let_stmt.rs +++ /dev/null @@ -1 +0,0 @@ -let x = 10