From a1c187eef3ba08076aedb5154929f7eda8d1b424 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 18:26:51 +0200 Subject: Rename ra_syntax -> syntax --- .gitattributes | 2 +- Cargo.lock | 68 +- crates/parser/src/grammar.rs | 2 +- crates/parser/src/lib.rs | 2 +- crates/ra_assists/Cargo.toml | 2 +- crates/ra_assists/src/assist_context.rs | 4 +- crates/ra_assists/src/ast_transform.rs | 22 +- crates/ra_assists/src/handlers/add_custom_impl.rs | 2 +- .../ra_assists/src/handlers/add_explicit_type.rs | 2 +- .../src/handlers/add_missing_impl_members.rs | 2 +- crates/ra_assists/src/handlers/add_turbo_fish.rs | 2 +- crates/ra_assists/src/handlers/apply_demorgan.rs | 2 +- crates/ra_assists/src/handlers/auto_import.rs | 4 +- .../src/handlers/change_return_type_to_result.rs | 2 +- .../ra_assists/src/handlers/change_visibility.rs | 2 +- crates/ra_assists/src/handlers/early_return.rs | 2 +- .../ra_assists/src/handlers/expand_glob_import.rs | 2 +- .../handlers/extract_struct_from_enum_variant.rs | 4 +- crates/ra_assists/src/handlers/extract_variable.rs | 4 +- crates/ra_assists/src/handlers/fill_match_arms.rs | 2 +- crates/ra_assists/src/handlers/fix_visibility.rs | 2 +- crates/ra_assists/src/handlers/flip_binexpr.rs | 2 +- crates/ra_assists/src/handlers/flip_comma.rs | 2 +- crates/ra_assists/src/handlers/flip_trait_bound.rs | 2 +- crates/ra_assists/src/handlers/generate_derive.rs | 2 +- .../src/handlers/generate_from_impl_for_enum.rs | 2 +- .../ra_assists/src/handlers/generate_function.rs | 4 +- crates/ra_assists/src/handlers/generate_impl.rs | 2 +- crates/ra_assists/src/handlers/generate_new.rs | 4 +- .../src/handlers/inline_local_variable.rs | 2 +- .../src/handlers/introduce_named_lifetime.rs | 4 +- crates/ra_assists/src/handlers/invert_if.rs | 2 +- crates/ra_assists/src/handlers/merge_imports.rs | 2 +- crates/ra_assists/src/handlers/merge_match_arms.rs | 2 +- crates/ra_assists/src/handlers/move_bounds.rs | 2 +- crates/ra_assists/src/handlers/move_guard.rs | 2 +- crates/ra_assists/src/handlers/raw_string.rs | 2 +- crates/ra_assists/src/handlers/remove_dbg.rs | 2 +- crates/ra_assists/src/handlers/remove_mut.rs | 2 +- crates/ra_assists/src/handlers/reorder_fields.rs | 2 +- .../src/handlers/replace_if_let_with_match.rs | 2 +- .../src/handlers/replace_let_with_if_let.rs | 2 +- .../handlers/replace_qualified_name_with_use.rs | 2 +- .../src/handlers/replace_unwrap_with_match.rs | 2 +- crates/ra_assists/src/handlers/split_import.rs | 2 +- crates/ra_assists/src/handlers/unwrap_block.rs | 2 +- crates/ra_assists/src/lib.rs | 2 +- crates/ra_assists/src/tests.rs | 2 +- crates/ra_assists/src/utils.rs | 4 +- crates/ra_assists/src/utils/insert_use.rs | 2 +- crates/ra_cfg/Cargo.toml | 2 +- crates/ra_cfg/src/cfg_expr.rs | 4 +- crates/ra_cfg/src/lib.rs | 2 +- crates/ra_db/Cargo.toml | 2 +- crates/ra_db/src/input.rs | 2 +- crates/ra_db/src/lib.rs | 2 +- crates/ra_fmt/Cargo.toml | 2 +- crates/ra_fmt/src/lib.rs | 2 +- crates/ra_hir/Cargo.toml | 2 +- crates/ra_hir/src/code_model.rs | 6 +- crates/ra_hir/src/has_source.rs | 2 +- crates/ra_hir/src/semantics.rs | 4 +- crates/ra_hir/src/semantics/source_to_def.rs | 6 +- crates/ra_hir/src/source_analyzer.rs | 2 +- crates/ra_hir_def/Cargo.toml | 2 +- crates/ra_hir_def/src/adt.rs | 2 +- crates/ra_hir_def/src/attr.rs | 2 +- crates/ra_hir_def/src/body.rs | 2 +- crates/ra_hir_def/src/body/lower.rs | 4 +- crates/ra_hir_def/src/body/scope.rs | 2 +- crates/ra_hir_def/src/data.rs | 2 +- crates/ra_hir_def/src/db.rs | 2 +- crates/ra_hir_def/src/diagnostics.rs | 2 +- crates/ra_hir_def/src/docs.rs | 2 +- crates/ra_hir_def/src/expr.rs | 4 +- crates/ra_hir_def/src/find_path.rs | 23 +- crates/ra_hir_def/src/generics.rs | 2 +- crates/ra_hir_def/src/import_map.rs | 2 +- crates/ra_hir_def/src/item_tree.rs | 2 +- crates/ra_hir_def/src/item_tree/lower.rs | 4 +- crates/ra_hir_def/src/item_tree/tests.rs | 62 +- crates/ra_hir_def/src/keys.rs | 2 +- crates/ra_hir_def/src/lang_item.rs | 2 +- crates/ra_hir_def/src/lib.rs | 2 +- crates/ra_hir_def/src/nameres.rs | 4 +- crates/ra_hir_def/src/nameres/collector.rs | 2 +- crates/ra_hir_def/src/nameres/mod_resolution.rs | 2 +- .../ra_hir_def/src/nameres/tests/mod_resolution.rs | 2 +- crates/ra_hir_def/src/path.rs | 2 +- crates/ra_hir_def/src/path/lower.rs | 2 +- crates/ra_hir_def/src/path/lower/lower_use.rs | 2 +- crates/ra_hir_def/src/type_ref.rs | 2 +- crates/ra_hir_def/src/visibility.rs | 2 +- crates/ra_hir_expand/Cargo.toml | 2 +- crates/ra_hir_expand/src/ast_id_map.rs | 2 +- crates/ra_hir_expand/src/builtin_derive.rs | 2 +- crates/ra_hir_expand/src/builtin_macro.rs | 4 +- crates/ra_hir_expand/src/db.rs | 10 +- crates/ra_hir_expand/src/diagnostics.rs | 2 +- crates/ra_hir_expand/src/eager.rs | 2 +- crates/ra_hir_expand/src/hygiene.rs | 2 +- crates/ra_hir_expand/src/lib.rs | 2 +- crates/ra_hir_expand/src/name.rs | 6 +- crates/ra_hir_ty/Cargo.toml | 2 +- crates/ra_hir_ty/src/diagnostics.rs | 4 +- crates/ra_hir_ty/src/diagnostics/expr.rs | 2 +- crates/ra_hir_ty/src/infer.rs | 2 +- crates/ra_hir_ty/src/infer/expr.rs | 2 +- crates/ra_hir_ty/src/test_db.rs | 2 +- crates/ra_hir_ty/src/tests.rs | 4 +- crates/ra_hir_ty/src/tests/macros.rs | 2 +- crates/ra_ide/Cargo.toml | 2 +- crates/ra_ide/src/call_hierarchy.rs | 2 +- crates/ra_ide/src/call_info.rs | 4 +- crates/ra_ide/src/completion/complete_attribute.rs | 2 +- crates/ra_ide/src/completion/complete_fn_param.rs | 4 +- crates/ra_ide/src/completion/complete_keyword.rs | 2 +- crates/ra_ide/src/completion/complete_postfix.rs | 2 +- .../src/completion/complete_qualified_path.rs | 2 +- .../ra_ide/src/completion/complete_trait_impl.rs | 2 +- .../src/completion/complete_unqualified_path.rs | 2 +- crates/ra_ide/src/completion/completion_context.rs | 2 +- crates/ra_ide/src/completion/completion_item.rs | 2 +- crates/ra_ide/src/completion/patterns.rs | 2 +- crates/ra_ide/src/completion/presentation.rs | 2 +- crates/ra_ide/src/completion/test_utils.rs | 2 +- crates/ra_ide/src/diagnostics.rs | 2 +- .../ra_ide/src/diagnostics/diagnostics_with_fix.rs | 2 +- crates/ra_ide/src/display.rs | 2 +- crates/ra_ide/src/display/navigation_target.rs | 2 +- crates/ra_ide/src/display/short_label.rs | 2 +- crates/ra_ide/src/expand_macro.rs | 2 +- crates/ra_ide/src/extend_selection.rs | 2 +- crates/ra_ide/src/file_structure.rs | 2 +- crates/ra_ide/src/folding_ranges.rs | 2 +- crates/ra_ide/src/goto_definition.rs | 4 +- crates/ra_ide/src/goto_implementation.rs | 2 +- crates/ra_ide/src/goto_type_definition.rs | 2 +- crates/ra_ide/src/hover.rs | 2 +- crates/ra_ide/src/inlay_hints.rs | 4 +- crates/ra_ide/src/join_lines.rs | 20 +- crates/ra_ide/src/lib.rs | 2 +- crates/ra_ide/src/matching_brace.rs | 2 +- crates/ra_ide/src/parent_module.rs | 2 +- crates/ra_ide/src/references.rs | 2 +- crates/ra_ide/src/references/rename.rs | 4 +- crates/ra_ide/src/runnables.rs | 2 +- crates/ra_ide/src/status.rs | 2 +- crates/ra_ide/src/syntax_highlighting.rs | 4 +- crates/ra_ide/src/syntax_highlighting/html.rs | 2 +- crates/ra_ide/src/syntax_highlighting/injection.rs | 2 +- crates/ra_ide/src/syntax_highlighting/tests.rs | 2 +- crates/ra_ide/src/syntax_tree.rs | 2 +- crates/ra_ide/src/typing.rs | 2 +- crates/ra_ide/src/typing/on_enter.rs | 2 +- crates/ra_ide_db/Cargo.toml | 2 +- crates/ra_ide_db/src/defs.rs | 2 +- crates/ra_ide_db/src/imports_locator.rs | 2 +- crates/ra_ide_db/src/line_index.rs | 2 +- crates/ra_ide_db/src/search.rs | 2 +- crates/ra_ide_db/src/symbol_index.rs | 6 +- crates/ra_mbe/Cargo.toml | 2 +- crates/ra_mbe/src/mbe_expander.rs | 4 +- crates/ra_mbe/src/mbe_expander/matcher.rs | 2 +- crates/ra_mbe/src/mbe_expander/transcriber.rs | 2 +- crates/ra_mbe/src/parser.rs | 2 +- crates/ra_mbe/src/subtree_source.rs | 2 +- crates/ra_mbe/src/syntax_bridge.rs | 8 +- crates/ra_mbe/src/tests.rs | 8 +- crates/ra_ssr/Cargo.toml | 2 +- crates/ra_ssr/src/lib.rs | 2 +- crates/ra_ssr/src/matching.rs | 8 +- crates/ra_ssr/src/nester.rs | 2 +- crates/ra_ssr/src/parsing.rs | 4 +- crates/ra_ssr/src/replacing.rs | 8 +- crates/ra_ssr/src/resolving.rs | 8 +- crates/ra_ssr/src/search.rs | 2 +- crates/ra_syntax/Cargo.toml | 36 - crates/ra_syntax/fuzz/.gitignore | 4 - crates/ra_syntax/fuzz/Cargo.toml | 27 - crates/ra_syntax/fuzz/fuzz_targets/parser.rs | 11 - crates/ra_syntax/fuzz/fuzz_targets/reparse.rs | 11 - crates/ra_syntax/src/algo.rs | 406 -- crates/ra_syntax/src/ast.rs | 331 -- crates/ra_syntax/src/ast/edit.rs | 642 --- crates/ra_syntax/src/ast/expr_ext.rs | 418 -- crates/ra_syntax/src/ast/generated.rs | 41 - crates/ra_syntax/src/ast/generated/nodes.rs | 4067 -------------------- crates/ra_syntax/src/ast/generated/tokens.rs | 91 - crates/ra_syntax/src/ast/make.rs | 392 -- crates/ra_syntax/src/ast/node_ext.rs | 485 --- crates/ra_syntax/src/ast/token_ext.rs | 538 --- crates/ra_syntax/src/ast/traits.rs | 141 - crates/ra_syntax/src/fuzz.rs | 73 - crates/ra_syntax/src/lib.rs | 388 -- crates/ra_syntax/src/parsing.rs | 59 - crates/ra_syntax/src/parsing/lexer.rs | 244 -- crates/ra_syntax/src/parsing/reparsing.rs | 455 --- crates/ra_syntax/src/parsing/text_token_source.rs | 84 - crates/ra_syntax/src/parsing/text_tree_sink.rs | 183 - crates/ra_syntax/src/ptr.rs | 105 - crates/ra_syntax/src/syntax_error.rs | 44 - crates/ra_syntax/src/syntax_node.rs | 77 - crates/ra_syntax/src/tests.rs | 280 -- crates/ra_syntax/src/validation.rs | 303 -- crates/ra_syntax/src/validation/block.rs | 22 - crates/ra_syntax/test_data/accidentally_quadratic | 3980 ------------------- .../lexer/err/0001_unclosed_char_at_eof.rs | 1 - .../lexer/err/0001_unclosed_char_at_eof.txt | 2 - .../lexer/err/0002_unclosed_char_with_ferris.rs | 1 - .../lexer/err/0002_unclosed_char_with_ferris.txt | 2 - .../err/0003_unclosed_char_with_ascii_escape.rs | 1 - .../err/0003_unclosed_char_with_ascii_escape.txt | 2 - .../err/0004_unclosed_char_with_unicode_escape.rs | 1 - .../err/0004_unclosed_char_with_unicode_escape.txt | 2 - .../lexer/err/0005_unclosed_char_with_space.rs | 1 - .../lexer/err/0005_unclosed_char_with_space.txt | 2 - .../lexer/err/0006_unclosed_char_with_slash.rs | 1 - .../lexer/err/0006_unclosed_char_with_slash.txt | 2 - .../lexer/err/0007_unclosed_char_with_slash_n.rs | 1 - .../lexer/err/0007_unclosed_char_with_slash_n.txt | 2 - .../0008_unclosed_char_with_slash_single_quote.rs | 1 - .../0008_unclosed_char_with_slash_single_quote.txt | 2 - .../lexer/err/0009_unclosed_byte_at_eof.rs | 1 - .../lexer/err/0009_unclosed_byte_at_eof.txt | 2 - .../lexer/err/0010_unclosed_byte_with_ferris.rs | 1 - .../lexer/err/0010_unclosed_byte_with_ferris.txt | 2 - .../err/0011_unclosed_byte_with_ascii_escape.rs | 1 - .../err/0011_unclosed_byte_with_ascii_escape.txt | 2 - .../err/0012_unclosed_byte_with_unicode_escape.rs | 1 - .../err/0012_unclosed_byte_with_unicode_escape.txt | 2 - .../lexer/err/0013_unclosed_byte_with_space.rs | 1 - .../lexer/err/0013_unclosed_byte_with_space.txt | 2 - .../lexer/err/0014_unclosed_byte_with_slash.rs | 1 - .../lexer/err/0014_unclosed_byte_with_slash.txt | 2 - .../lexer/err/0015_unclosed_byte_with_slash_n.rs | 1 - .../lexer/err/0015_unclosed_byte_with_slash_n.txt | 2 - .../0016_unclosed_byte_with_slash_single_quote.rs | 1 - .../0016_unclosed_byte_with_slash_single_quote.txt | 2 - .../lexer/err/0017_unclosed_string_at_eof.rs | 1 - .../lexer/err/0017_unclosed_string_at_eof.txt | 2 - .../lexer/err/0018_unclosed_string_with_ferris.rs | 1 - .../lexer/err/0018_unclosed_string_with_ferris.txt | 2 - .../err/0019_unclosed_string_with_ascii_escape.rs | 1 - .../err/0019_unclosed_string_with_ascii_escape.txt | 2 - .../0020_unclosed_string_with_unicode_escape.rs | 1 - .../0020_unclosed_string_with_unicode_escape.txt | 2 - .../lexer/err/0021_unclosed_string_with_space.rs | 1 - .../lexer/err/0021_unclosed_string_with_space.txt | 2 - .../lexer/err/0022_unclosed_string_with_slash.rs | 1 - .../lexer/err/0022_unclosed_string_with_slash.txt | 2 - .../lexer/err/0023_unclosed_string_with_slash_n.rs | 1 - .../err/0023_unclosed_string_with_slash_n.txt | 2 - ...0024_unclosed_string_with_slash_double_quote.rs | 1 - ...024_unclosed_string_with_slash_double_quote.txt | 2 - .../lexer/err/0025_unclosed_byte_string_at_eof.rs | 1 - .../lexer/err/0025_unclosed_byte_string_at_eof.txt | 2 - .../err/0026_unclosed_byte_string_with_ferris.rs | 1 - .../err/0026_unclosed_byte_string_with_ferris.txt | 2 - .../0027_unclosed_byte_string_with_ascii_escape.rs | 1 - ...0027_unclosed_byte_string_with_ascii_escape.txt | 2 - ...028_unclosed_byte_string_with_unicode_escape.rs | 1 - ...28_unclosed_byte_string_with_unicode_escape.txt | 2 - .../err/0029_unclosed_byte_string_with_space.rs | 1 - .../err/0029_unclosed_byte_string_with_space.txt | 2 - .../err/0030_unclosed_byte_string_with_slash.rs | 1 - .../err/0030_unclosed_byte_string_with_slash.txt | 2 - .../err/0031_unclosed_byte_string_with_slash_n.rs | 1 - .../err/0031_unclosed_byte_string_with_slash_n.txt | 2 - ...unclosed_byte_string_with_slash_double_quote.rs | 1 - ...nclosed_byte_string_with_slash_double_quote.txt | 2 - .../lexer/err/0033_unclosed_raw_string_at_eof.rs | 1 - .../lexer/err/0033_unclosed_raw_string_at_eof.txt | 2 - .../err/0034_unclosed_raw_string_with_ferris.rs | 1 - .../err/0034_unclosed_raw_string_with_ferris.txt | 2 - .../0035_unclosed_raw_string_with_ascii_escape.rs | 1 - .../0035_unclosed_raw_string_with_ascii_escape.txt | 2 - ...0036_unclosed_raw_string_with_unicode_escape.rs | 1 - ...036_unclosed_raw_string_with_unicode_escape.txt | 2 - .../err/0037_unclosed_raw_string_with_space.rs | 1 - .../err/0037_unclosed_raw_string_with_space.txt | 2 - .../err/0038_unclosed_raw_string_with_slash.rs | 1 - .../err/0038_unclosed_raw_string_with_slash.txt | 2 - .../err/0039_unclosed_raw_string_with_slash_n.rs | 1 - .../err/0039_unclosed_raw_string_with_slash_n.txt | 2 - .../err/0040_unclosed_raw_byte_string_at_eof.rs | 1 - .../err/0040_unclosed_raw_byte_string_at_eof.txt | 2 - .../0041_unclosed_raw_byte_string_with_ferris.rs | 1 - .../0041_unclosed_raw_byte_string_with_ferris.txt | 2 - ...2_unclosed_raw_byte_string_with_ascii_escape.rs | 1 - ..._unclosed_raw_byte_string_with_ascii_escape.txt | 2 - ...unclosed_raw_byte_string_with_unicode_escape.rs | 1 - ...nclosed_raw_byte_string_with_unicode_escape.txt | 2 - .../0044_unclosed_raw_byte_string_with_space.rs | 1 - .../0044_unclosed_raw_byte_string_with_space.txt | 2 - .../0045_unclosed_raw_byte_string_with_slash.rs | 1 - .../0045_unclosed_raw_byte_string_with_slash.txt | 2 - .../0046_unclosed_raw_byte_string_with_slash_n.rs | 1 - .../0046_unclosed_raw_byte_string_with_slash_n.txt | 2 - .../lexer/err/0047_unstarted_raw_string_at_eof.rs | 1 - .../lexer/err/0047_unstarted_raw_string_at_eof.txt | 2 - .../err/0048_unstarted_raw_byte_string_at_eof.rs | 1 - .../err/0048_unstarted_raw_byte_string_at_eof.txt | 2 - .../err/0049_unstarted_raw_string_with_ascii.rs | 1 - .../err/0049_unstarted_raw_string_with_ascii.txt | 10 - .../0050_unstarted_raw_byte_string_with_ascii.rs | 1 - .../0050_unstarted_raw_byte_string_with_ascii.txt | 10 - .../err/0051_unclosed_block_comment_at_eof.rs | 1 - .../err/0051_unclosed_block_comment_at_eof.txt | 2 - .../0052_unclosed_block_comment_with_content.rs | 1 - .../0052_unclosed_block_comment_with_content.txt | 2 - .../0053_unclosed_nested_block_comment_entirely.rs | 1 - ...0053_unclosed_nested_block_comment_entirely.txt | 2 - ...0054_unclosed_nested_block_comment_partially.rs | 1 - ...054_unclosed_nested_block_comment_partially.txt | 2 - .../test_data/lexer/err/0055_empty_int.rs | 17 - .../test_data/lexer/err/0055_empty_int.txt | 39 - .../test_data/lexer/err/0056_empty_exponent.rs | 22 - .../test_data/lexer/err/0056_empty_exponent.txt | 62 - .../err/0057_lifetime_strarts_with_a_number.rs | 2 - .../err/0057_lifetime_strarts_with_a_number.txt | 6 - crates/ra_syntax/test_data/lexer/ok/0001_hello.rs | 1 - crates/ra_syntax/test_data/lexer/ok/0001_hello.txt | 3 - .../test_data/lexer/ok/0002_whitespace.rs | 4 - .../test_data/lexer/ok/0002_whitespace.txt | 12 - crates/ra_syntax/test_data/lexer/ok/0003_ident.rs | 1 - crates/ra_syntax/test_data/lexer/ok/0003_ident.txt | 14 - .../ra_syntax/test_data/lexer/ok/0004_numbers.rs | 9 - .../ra_syntax/test_data/lexer/ok/0004_numbers.txt | 57 - .../ra_syntax/test_data/lexer/ok/0005_symbols.rs | 6 - .../ra_syntax/test_data/lexer/ok/0005_symbols.txt | 77 - crates/ra_syntax/test_data/lexer/ok/0006_chars.rs | 1 - crates/ra_syntax/test_data/lexer/ok/0006_chars.txt | 16 - .../ra_syntax/test_data/lexer/ok/0007_lifetimes.rs | 1 - .../test_data/lexer/ok/0007_lifetimes.txt | 8 - .../test_data/lexer/ok/0008_byte_strings.rs | 3 - .../test_data/lexer/ok/0008_byte_strings.txt | 22 - .../ra_syntax/test_data/lexer/ok/0009_strings.rs | 2 - .../ra_syntax/test_data/lexer/ok/0009_strings.txt | 8 - .../lexer/ok/0010_single_line_comments.rs | 12 - .../lexer/ok/0010_single_line_comments.txt | 22 - .../ra_syntax/test_data/lexer/ok/0011_keywords.rs | 3 - .../ra_syntax/test_data/lexer/ok/0011_keywords.txt | 64 - .../test_data/lexer/ok/0012_block_comment.rs | 3 - .../test_data/lexer/ok/0012_block_comment.txt | 6 - .../test_data/lexer/ok/0013_raw_strings.rs | 1 - .../test_data/lexer/ok/0013_raw_strings.txt | 2 - .../ra_syntax/test_data/lexer/ok/0014_raw_ident.rs | 1 - .../test_data/lexer/ok/0014_raw_ident.txt | 2 - .../err/0000_struct_field_missing_comma.rast | 34 - .../parser/err/0000_struct_field_missing_comma.rs | 4 - .../parser/err/0001_item_recovery_in_file.rast | 18 - .../parser/err/0001_item_recovery_in_file.rs | 3 - .../parser/err/0002_duplicate_shebang.rast | 39 - .../test_data/parser/err/0002_duplicate_shebang.rs | 2 - .../test_data/parser/err/0003_C++_semicolon.rast | 39 - .../test_data/parser/err/0003_C++_semicolon.rs | 4 - .../parser/err/0004_use_path_bad_segment.rast | 15 - .../parser/err/0004_use_path_bad_segment.rs | 1 - .../parser/err/0005_attribute_recover.rast | 59 - .../test_data/parser/err/0005_attribute_recover.rs | 8 - .../parser/err/0006_named_field_recovery.rast | 74 - .../parser/err/0006_named_field_recovery.rs | 7 - .../parser/err/0007_stray_curly_in_file.rast | 32 - .../parser/err/0007_stray_curly_in_file.rs | 9 - .../parser/err/0008_item_block_recovery.rast | 77 - .../parser/err/0008_item_block_recovery.rs | 13 - .../err/0009_broken_struct_type_parameter.rast | 58 - .../err/0009_broken_struct_type_parameter.rs | 5 - .../parser/err/0010_unsafe_lambda_block.rast | 44 - .../parser/err/0010_unsafe_lambda_block.rs | 3 - .../test_data/parser/err/0011_extern_struct.rast | 13 - .../test_data/parser/err/0011_extern_struct.rs | 1 - .../test_data/parser/err/0012_broken_lambda.rast | 387 -- .../test_data/parser/err/0013_invalid_type.rast | 89 - .../test_data/parser/err/0013_invalid_type.rs | 7 - .../test_data/parser/err/0014_where_no_bounds.rast | 31 - .../test_data/parser/err/0014_where_no_bounds.rs | 1 - .../test_data/parser/err/0015_curly_in_params.rast | 24 - .../test_data/parser/err/0015_curly_in_params.rs | 2 - .../test_data/parser/err/0016_missing_semi.rast | 43 - .../test_data/parser/err/0016_missing_semi.rs | 6 - .../parser/err/0017_incomplete_binexpr.rast | 46 - .../parser/err/0017_incomplete_binexpr.rs | 4 - .../test_data/parser/err/0018_incomplete_fn.rast | 131 - .../test_data/parser/err/0018_incomplete_fn.rs | 8 - .../test_data/parser/err/0019_let_recover.rast | 103 - .../test_data/parser/err/0019_let_recover.rs | 12 - .../test_data/parser/err/0020_fn_recover.rast | 20 - .../test_data/parser/err/0020_fn_recover.rs | 3 - .../parser/err/0021_incomplete_param.rast | 34 - .../test_data/parser/err/0021_incomplete_param.rs | 2 - .../test_data/parser/err/0022_bad_exprs.rast | 180 - .../test_data/parser/err/0022_bad_exprs.rs | 3 - .../parser/err/0023_mismatched_paren.rast | 43 - .../test_data/parser/err/0023_mismatched_paren.rs | 5 - .../parser/err/0024_many_type_parens.rast | 319 -- .../test_data/parser/err/0024_many_type_parens.rs | 7 - .../ra_syntax/test_data/parser/err/0025_nope.rast | 202 - crates/ra_syntax/test_data/parser/err/0025_nope.rs | 31 - .../test_data/parser/err/0026_imp_recovery.rast | 49 - .../test_data/parser/err/0026_imp_recovery.rs | 2 - .../parser/err/0027_incomplere_where_for.rast | 27 - .../parser/err/0027_incomplere_where_for.rs | 3 - .../parser/err/0029_field_completion.rast | 35 - .../test_data/parser/err/0029_field_completion.rs | 3 - .../parser/err/0031_block_inner_attrs.rast | 121 - .../test_data/parser/err/0031_block_inner_attrs.rs | 15 - .../parser/err/0032_match_arms_inner_attrs.rast | 203 - .../parser/err/0032_match_arms_inner_attrs.rs | 20 - .../parser/err/0033_match_arms_outer_attrs.rast | 66 - .../parser/err/0033_match_arms_outer_attrs.rs | 7 - .../test_data/parser/err/0034_bad_box_pattern.rast | 95 - .../test_data/parser/err/0034_bad_box_pattern.rs | 6 - .../test_data/parser/err/0035_use_recover.rast | 53 - .../test_data/parser/err/0035_use_recover.rs | 5 - .../test_data/parser/err/0036_partial_use.rast | 51 - .../test_data/parser/err/0036_partial_use.rs | 2 - .../parser/err/0037_visibility_in_traits.rast | 97 - .../parser/err/0037_visibility_in_traits.rs | 6 - .../parser/err/0038_endless_inclusive_range.rast | 29 - .../parser/err/0038_endless_inclusive_range.rs | 4 - .../test_data/parser/err/0039_lambda_recovery.rast | 82 - .../test_data/parser/err/0039_lambda_recovery.rs | 5 - .../parser/err/0040_illegal_crate_kw_location.rast | 91 - .../parser/err/0040_illegal_crate_kw_location.rs | 4 - .../err/0041_illegal_super_keyword_location.rast | 70 - .../err/0041_illegal_super_keyword_location.rs | 4 - .../err/0042_illegal_self_keyword_location.rast | 27 - .../err/0042_illegal_self_keyword_location.rs | 2 - .../test_data/parser/err/0043_weird_blocks.rast | 71 - .../test_data/parser/err/0043_weird_blocks.rs | 6 - .../parser/err/0044_unexpected_for_type.rast | 240 -- .../parser/err/0044_unexpected_for_type.rs | 9 - .../test_data/parser/err/0045_item_modifiers.rast | 45 - .../test_data/parser/err/0045_item_modifiers.rs | 2 - .../fragments/expr/err/0000_truncated_add.rast | 1 - .../fragments/expr/err/0000_truncated_add.rs | 1 - .../parser/fragments/expr/ok/0000_add.rast | 8 - .../test_data/parser/fragments/expr/ok/0000_add.rs | 1 - .../fragments/item/err/0000_extra_keyword.rast | 1 - .../fragments/item/err/0000_extra_keyword.rs | 1 - .../parser/fragments/item/ok/0000_fn.rast | 12 - .../test_data/parser/fragments/item/ok/0000_fn.rs | 1 - .../fragments/path/err/0000_reserved_word.rast | 1 - .../fragments/path/err/0000_reserved_word.rs | 1 - .../parser/fragments/path/err/0001_expression.rast | 1 - .../parser/fragments/path/err/0001_expression.rs | 1 - .../fragments/path/ok/0000_single_ident.rast | 4 - .../parser/fragments/path/ok/0000_single_ident.rs | 1 - .../parser/fragments/path/ok/0001_multipart.rast | 14 - .../parser/fragments/path/ok/0001_multipart.rs | 1 - .../fragments/pattern/err/0000_reserved_word.rast | 1 - .../fragments/pattern/err/0000_reserved_word.rs | 1 - .../fragments/pattern/err/0001_missing_paren.rast | 1 - .../fragments/pattern/err/0001_missing_paren.rs | 1 - .../parser/fragments/pattern/ok/0000_enum.rast | 10 - .../parser/fragments/pattern/ok/0000_enum.rs | 1 - .../fragments/type/err/0000_missing_close.rast | 1 - .../fragments/type/err/0000_missing_close.rs | 1 - .../parser/fragments/type/ok/0000_result.rast | 22 - .../parser/fragments/type/ok/0000_result.rs | 1 - .../test_data/parser/fuzz-failures/0000.rs | 199 - .../test_data/parser/fuzz-failures/0001.rs | 106 - .../test_data/parser/fuzz-failures/0002.rs | 1 - .../test_data/parser/fuzz-failures/0003.rs | 1 - .../test_data/parser/fuzz-failures/0004.rs | 1 - .../inline/err/0001_array_type_missing_semi.rast | 27 - .../inline/err/0001_array_type_missing_semi.rs | 1 - .../inline/err/0002_misplaced_label_err.rast | 28 - .../parser/inline/err/0002_misplaced_label_err.rs | 3 - .../err/0003_pointer_type_no_mutability.rast | 17 - .../inline/err/0003_pointer_type_no_mutability.rs | 1 - .../parser/inline/err/0004_impl_type.rast | 79 - .../test_data/parser/inline/err/0004_impl_type.rs | 4 - .../err/0005_fn_pointer_type_missing_fn.rast | 23 - .../inline/err/0005_fn_pointer_type_missing_fn.rs | 1 - .../inline/err/0006_unsafe_block_in_mod.rast | 35 - .../parser/inline/err/0006_unsafe_block_in_mod.rs | 1 - .../inline/err/0007_async_without_semicolon.rast | 31 - .../inline/err/0007_async_without_semicolon.rs | 1 - .../test_data/parser/inline/err/0008_pub_expr.rast | 25 - .../test_data/parser/inline/err/0008_pub_expr.rs | 1 - .../inline/err/0009_attr_on_expr_not_allowed.rast | 58 - .../inline/err/0009_attr_on_expr_not_allowed.rs | 4 - .../inline/err/0010_bad_tuple_index_expr.rast | 52 - .../parser/inline/err/0010_bad_tuple_index_expr.rs | 5 - .../parser/inline/err/0013_static_underscore.rast | 21 - .../parser/inline/err/0013_static_underscore.rs | 1 - ...14_record_literal_before_ellipsis_recovery.rast | 48 - ...0014_record_literal_before_ellipsis_recovery.rs | 3 - .../parser/inline/err/0015_empty_segment.rast | 15 - .../parser/inline/err/0015_empty_segment.rs | 1 - .../parser/inline/ok/0001_trait_item_list.rast | 71 - .../parser/inline/ok/0001_trait_item_list.rs | 6 - .../parser/inline/ok/0002_use_tree_list.rast | 136 - .../parser/inline/ok/0002_use_tree_list.rs | 4 - .../parser/inline/ok/0003_where_pred_for.rast | 60 - .../parser/inline/ok/0003_where_pred_for.rs | 4 - .../ok/0004_value_parameters_no_patterns.rast | 60 - .../inline/ok/0004_value_parameters_no_patterns.rs | 1 - .../inline/ok/0005_function_type_params.rast | 37 - .../parser/inline/ok/0005_function_type_params.rs | 1 - .../parser/inline/ok/0006_self_param.rast | 116 - .../test_data/parser/inline/ok/0006_self_param.rs | 7 - .../parser/inline/ok/0007_type_param_bounds.rast | 40 - .../parser/inline/ok/0007_type_param_bounds.rs | 1 - .../test_data/parser/inline/ok/0008_path_part.rast | 96 - .../test_data/parser/inline/ok/0008_path_part.rs | 6 - .../test_data/parser/inline/ok/0009_loop_expr.rast | 24 - .../test_data/parser/inline/ok/0009_loop_expr.rs | 3 - .../parser/inline/ok/0010_extern_block.rast | 9 - .../parser/inline/ok/0010_extern_block.rs | 1 - .../parser/inline/ok/0011_field_expr.rast | 59 - .../test_data/parser/inline/ok/0011_field_expr.rs | 5 - .../inline/ok/0012_type_item_where_clause.rast | 33 - .../inline/ok/0012_type_item_where_clause.rs | 1 - .../parser/inline/ok/0013_pointer_type_mut.rast | 35 - .../parser/inline/ok/0013_pointer_type_mut.rs | 2 - .../parser/inline/ok/0014_never_type.rast | 13 - .../test_data/parser/inline/ok/0014_never_type.rs | 1 - .../parser/inline/ok/0015_continue_expr.rast | 35 - .../parser/inline/ok/0015_continue_expr.rs | 6 - .../parser/inline/ok/0017_array_type.rast | 21 - .../test_data/parser/inline/ok/0017_array_type.rs | 1 - .../parser/inline/ok/0018_arb_self_types.rast | 72 - .../parser/inline/ok/0018_arb_self_types.rs | 4 - .../parser/inline/ok/0019_unary_expr.rast | 44 - .../test_data/parser/inline/ok/0019_unary_expr.rs | 5 - .../test_data/parser/inline/ok/0020_use_star.rast | 59 - .../test_data/parser/inline/ok/0020_use_star.rs | 4 - .../parser/inline/ok/0021_impl_item_list.rast | 78 - .../parser/inline/ok/0021_impl_item_list.rs | 6 - .../parser/inline/ok/0022_crate_visibility.rast | 53 - .../parser/inline/ok/0022_crate_visibility.rs | 4 - .../parser/inline/ok/0023_placeholder_type.rast | 13 - .../parser/inline/ok/0023_placeholder_type.rs | 1 - .../test_data/parser/inline/ok/0024_slice_pat.rast | 41 - .../test_data/parser/inline/ok/0024_slice_pat.rs | 3 - .../parser/inline/ok/0025_slice_type.rast | 17 - .../test_data/parser/inline/ok/0025_slice_type.rs | 1 - .../parser/inline/ok/0026_tuple_pat_fields.rast | 104 - .../parser/inline/ok/0026_tuple_pat_fields.rs | 6 - .../test_data/parser/inline/ok/0027_ref_pat.rast | 49 - .../test_data/parser/inline/ok/0027_ref_pat.rs | 4 - .../parser/inline/ok/0028_impl_trait_type.rast | 43 - .../parser/inline/ok/0028_impl_trait_type.rs | 1 - .../test_data/parser/inline/ok/0029_cast_expr.rast | 89 - .../test_data/parser/inline/ok/0029_cast_expr.rs | 6 - .../test_data/parser/inline/ok/0030_cond.rast | 202 - .../test_data/parser/inline/ok/0030_cond.rs | 7 - .../parser/inline/ok/0031_while_expr.rast | 84 - .../test_data/parser/inline/ok/0031_while_expr.rs | 5 - .../parser/inline/ok/0032_fn_pointer_type.rast | 98 - .../parser/inline/ok/0032_fn_pointer_type.rs | 4 - .../parser/inline/ok/0033_reference_type;.rast | 50 - .../parser/inline/ok/0033_reference_type;.rs | 3 - .../parser/inline/ok/0034_break_expr.rast | 53 - .../test_data/parser/inline/ok/0034_break_expr.rs | 8 - .../parser/inline/ok/0037_qual_paths.rast | 78 - .../test_data/parser/inline/ok/0037_qual_paths.rs | 2 - .../parser/inline/ok/0038_full_range_expr.rast | 28 - .../parser/inline/ok/0038_full_range_expr.rs | 1 - .../test_data/parser/inline/ok/0039_type_arg.rast | 55 - .../test_data/parser/inline/ok/0039_type_arg.rs | 1 - .../parser/inline/ok/0040_crate_keyword_vis.rast | 62 - .../parser/inline/ok/0040_crate_keyword_vis.rs | 3 - .../parser/inline/ok/0041_trait_item.rast | 125 - .../test_data/parser/inline/ok/0041_trait_item.rs | 2 - .../test_data/parser/inline/ok/0042_call_expr.rast | 147 - .../test_data/parser/inline/ok/0042_call_expr.rs | 6 - .../test_data/parser/inline/ok/0043_use_alias.rast | 138 - .../test_data/parser/inline/ok/0043_use_alias.rs | 8 - .../parser/inline/ok/0044_block_items.rast | 28 - .../test_data/parser/inline/ok/0044_block_items.rs | 1 - .../inline/ok/0045_param_list_opt_patterns.rast | 46 - .../inline/ok/0045_param_list_opt_patterns.rs | 1 - .../inline/ok/0046_singleton_tuple_type.rast | 20 - .../parser/inline/ok/0046_singleton_tuple_type.rs | 1 - .../inline/ok/0048_path_type_with_bounds.rast | 81 - .../parser/inline/ok/0048_path_type_with_bounds.rs | 2 - .../test_data/parser/inline/ok/0050_fn_decl.rast | 22 - .../test_data/parser/inline/ok/0050_fn_decl.rs | 1 - .../test_data/parser/inline/ok/0051_unit_type.rast | 14 - .../test_data/parser/inline/ok/0051_unit_type.rs | 1 - .../test_data/parser/inline/ok/0052_path_type.rast | 70 - .../test_data/parser/inline/ok/0052_path_type.rs | 4 - .../test_data/parser/inline/ok/0053_path_expr.rast | 95 - .../test_data/parser/inline/ok/0053_path_expr.rs | 6 - .../parser/inline/ok/0054_record_field_attrs.rast | 44 - .../parser/inline/ok/0054_record_field_attrs.rs | 4 - .../parser/inline/ok/0055_literal_pattern.rast | 76 - .../parser/inline/ok/0055_literal_pattern.rs | 8 - .../parser/inline/ok/0056_where_clause.rast | 110 - .../parser/inline/ok/0056_where_clause.rs | 7 - .../test_data/parser/inline/ok/0058_range_pat.rast | 82 - .../test_data/parser/inline/ok/0058_range_pat.rs | 7 - .../parser/inline/ok/0059_match_arms_commas.rast | 58 - .../parser/inline/ok/0059_match_arms_commas.rs | 7 - .../parser/inline/ok/0060_extern_crate.rast | 10 - .../parser/inline/ok/0060_extern_crate.rs | 1 - .../parser/inline/ok/0061_record_lit.rast | 124 - .../test_data/parser/inline/ok/0061_record_lit.rs | 6 - .../parser/inline/ok/0062_mod_contents.rast | 66 - .../parser/inline/ok/0062_mod_contents.rs | 5 - .../parser/inline/ok/0063_impl_def_neg.rast | 23 - .../parser/inline/ok/0063_impl_def_neg.rs | 1 - .../test_data/parser/inline/ok/0064_if_expr.rast | 121 - .../test_data/parser/inline/ok/0064_if_expr.rs | 7 - .../parser/inline/ok/0065_dyn_trait_type.rast | 43 - .../parser/inline/ok/0065_dyn_trait_type.rs | 1 - .../test_data/parser/inline/ok/0066_match_arm.rast | 151 - .../test_data/parser/inline/ok/0066_match_arm.rs | 9 - .../parser/inline/ok/0067_crate_path.rast | 15 - .../test_data/parser/inline/ok/0067_crate_path.rs | 1 - .../parser/inline/ok/0068_union_items.rast | 46 - .../test_data/parser/inline/ok/0068_union_items.rs | 5 - .../inline/ok/0069_use_tree_list_after_path.rast | 37 - .../inline/ok/0069_use_tree_list_after_path.rs | 2 - .../inline/ok/0070_stmt_bin_expr_ambiguity.rast | 50 - .../inline/ok/0070_stmt_bin_expr_ambiguity.rs | 4 - .../parser/inline/ok/0071_match_expr.rast | 93 - .../test_data/parser/inline/ok/0071_match_expr.rs | 6 - .../parser/inline/ok/0072_return_expr.rast | 28 - .../test_data/parser/inline/ok/0072_return_expr.rs | 4 - .../inline/ok/0073_type_item_type_params.rast | 20 - .../parser/inline/ok/0073_type_item_type_params.rs | 1 - .../ok/0074_stmt_postfix_expr_ambiguity.rast | 59 - .../inline/ok/0074_stmt_postfix_expr_ambiguity.rs | 7 - .../test_data/parser/inline/ok/0075_block.rast | 86 - .../test_data/parser/inline/ok/0075_block.rs | 4 - .../inline/ok/0076_function_where_clause.rast | 39 - .../parser/inline/ok/0076_function_where_clause.rs | 1 - .../test_data/parser/inline/ok/0077_try_expr.rast | 25 - .../test_data/parser/inline/ok/0077_try_expr.rs | 3 - .../test_data/parser/inline/ok/0078_type_item.rast | 16 - .../test_data/parser/inline/ok/0078_type_item.rs | 1 - .../test_data/parser/inline/ok/0079_impl_def.rast | 14 - .../test_data/parser/inline/ok/0079_impl_def.rs | 1 - .../parser/inline/ok/0080_postfix_range.rast | 95 - .../parser/inline/ok/0080_postfix_range.rs | 5 - .../test_data/parser/inline/ok/0081_for_type.rast | 112 - .../test_data/parser/inline/ok/0081_for_type.rs | 3 - .../test_data/parser/inline/ok/0082_ref_expr.rast | 138 - .../test_data/parser/inline/ok/0082_ref_expr.rs | 10 - .../parser/inline/ok/0083_struct_items.rast | 87 - .../parser/inline/ok/0083_struct_items.rs | 8 - .../parser/inline/ok/0084_paren_type.rast | 19 - .../test_data/parser/inline/ok/0084_paren_type.rs | 1 - .../parser/inline/ok/0085_expr_literals.rast | 135 - .../parser/inline/ok/0085_expr_literals.rs | 12 - .../parser/inline/ok/0086_function_ret_type.rast | 34 - .../parser/inline/ok/0086_function_ret_type.rs | 2 - .../parser/inline/ok/0088_break_ambiguity.rast | 65 - .../parser/inline/ok/0088_break_ambiguity.rs | 6 - .../parser/inline/ok/0090_type_param_default.rast | 22 - .../parser/inline/ok/0090_type_param_default.rs | 1 - .../inline/ok/0092_fn_pointer_type_with_ret.rast | 23 - .../inline/ok/0092_fn_pointer_type_with_ret.rs | 1 - .../parser/inline/ok/0093_index_expr.rast | 33 - .../test_data/parser/inline/ok/0093_index_expr.rs | 3 - .../parser/inline/ok/0095_placeholder_pat.rast | 28 - .../parser/inline/ok/0095_placeholder_pat.rs | 1 - .../parser/inline/ok/0096_no_semi_after_block.rast | 123 - .../parser/inline/ok/0096_no_semi_after_block.rs | 13 - .../parser/inline/ok/0099_param_list.rast | 99 - .../test_data/parser/inline/ok/0099_param_list.rs | 4 - .../test_data/parser/inline/ok/0100_for_expr.rast | 34 - .../test_data/parser/inline/ok/0100_for_expr.rs | 3 - .../inline/ok/0102_record_field_pat_list.rast | 132 - .../parser/inline/ok/0102_record_field_pat_list.rs | 6 - .../parser/inline/ok/0103_array_expr.rast | 54 - .../test_data/parser/inline/ok/0103_array_expr.rs | 6 - .../parser/inline/ok/0104_path_fn_trait_args.rast | 41 - .../parser/inline/ok/0104_path_fn_trait_args.rs | 1 - .../parser/inline/ok/0106_lambda_expr.rast | 135 - .../test_data/parser/inline/ok/0106_lambda_expr.rs | 9 - .../parser/inline/ok/0107_method_call_expr.rast | 62 - .../parser/inline/ok/0107_method_call_expr.rs | 4 - .../parser/inline/ok/0108_tuple_expr.rast | 38 - .../test_data/parser/inline/ok/0108_tuple_expr.rs | 5 - .../test_data/parser/inline/ok/0109_label.rast | 64 - .../test_data/parser/inline/ok/0109_label.rs | 5 - .../test_data/parser/inline/ok/0110_use_path.rast | 38 - .../test_data/parser/inline/ok/0110_use_path.rs | 3 - .../test_data/parser/inline/ok/0111_tuple_pat.rast | 89 - .../test_data/parser/inline/ok/0111_tuple_pat.rs | 6 - .../test_data/parser/inline/ok/0112_bind_pat.rast | 127 - .../test_data/parser/inline/ok/0112_bind_pat.rs | 8 - .../parser/inline/ok/0113_nocontentexpr.rast | 55 - .../parser/inline/ok/0113_nocontentexpr.rs | 3 - .../parser/inline/ok/0114_tuple_struct_where.rast | 64 - .../parser/inline/ok/0114_tuple_struct_where.rs | 2 - .../parser/inline/ok/0115_tuple_field_attrs.rast | 41 - .../parser/inline/ok/0115_tuple_field_attrs.rs | 4 - .../parser/inline/ok/0117_macro_call_type.rast | 43 - .../parser/inline/ok/0117_macro_call_type.rs | 2 - .../inline/ok/0118_impl_inner_attributes.rast | 40 - .../parser/inline/ok/0118_impl_inner_attributes.rs | 5 - .../parser/inline/ok/0118_match_guard.rast | 47 - .../test_data/parser/inline/ok/0118_match_guard.rs | 5 - .../inline/ok/0120_match_arms_inner_attribute.rast | 80 - .../inline/ok/0120_match_arms_inner_attribute.rs | 8 - .../ok/0121_match_arms_outer_attributes.rast | 145 - .../inline/ok/0121_match_arms_outer_attributes.rs | 12 - .../ok/0122_generic_lifetime_type_attribute.rast | 65 - .../ok/0122_generic_lifetime_type_attribute.rs | 2 - .../parser/inline/ok/0123_param_list_vararg.rast | 50 - .../parser/inline/ok/0123_param_list_vararg.rs | 1 - .../parser/inline/ok/0125_crate_keyword_path.rast | 31 - .../parser/inline/ok/0125_crate_keyword_path.rs | 1 - .../ok/0125_record_literal_field_with_attr.rast | 47 - .../ok/0125_record_literal_field_with_attr.rs | 3 - .../parser/inline/ok/0126_attr_on_expr_stmt.rast | 97 - .../parser/inline/ok/0126_attr_on_expr_stmt.rs | 6 - .../inline/ok/0127_attr_on_last_expr_in_block.rast | 57 - .../inline/ok/0127_attr_on_last_expr_in_block.rs | 4 - .../test_data/parser/inline/ok/0129_marco_pat.rast | 36 - .../test_data/parser/inline/ok/0129_marco_pat.rs | 3 - .../test_data/parser/inline/ok/0130_let_stmt.rast | 126 - .../test_data/parser/inline/ok/0130_let_stmt.rs | 9 - .../parser/inline/ok/0130_try_block_expr.rast | 31 - .../parser/inline/ok/0130_try_block_expr.rs | 3 - .../parser/inline/ok/0131_existential_type.rast | 31 - .../parser/inline/ok/0131_existential_type.rs | 1 - .../test_data/parser/inline/ok/0132_box_expr.rast | 89 - .../test_data/parser/inline/ok/0132_box_expr.rs | 5 - .../inline/ok/0134_nocontentexpr_after_item.rast | 62 - .../inline/ok/0134_nocontentexpr_after_item.rs | 8 - .../parser/inline/ok/0137_await_expr.rast | 69 - .../test_data/parser/inline/ok/0137_await_expr.rs | 5 - .../inline/ok/0138_associated_type_bounds.rast | 55 - .../inline/ok/0138_associated_type_bounds.rs | 1 - .../inline/ok/0138_expression_after_block.rast | 64 - .../inline/ok/0138_expression_after_block.rs | 4 - .../inline/ok/0138_self_param_outer_attr.rast | 25 - .../parser/inline/ok/0138_self_param_outer_attr.rs | 1 - .../parser/inline/ok/0139_param_outer_arg.rast | 34 - .../parser/inline/ok/0139_param_outer_arg.rs | 1 - .../parser/inline/ok/0142_for_range_from.rast | 40 - .../parser/inline/ok/0142_for_range_from.rs | 5 - .../test_data/parser/inline/ok/0143_box_pat.rast | 110 - .../test_data/parser/inline/ok/0143_box_pat.rs | 5 - .../parser/inline/ok/0144_dot_dot_pat.rast | 455 --- .../test_data/parser/inline/ok/0144_dot_dot_pat.rs | 25 - .../parser/inline/ok/0145_record_field_pat.rast | 75 - .../parser/inline/ok/0145_record_field_pat.rs | 4 - .../parser/inline/ok/0146_as_precedence.rast | 42 - .../parser/inline/ok/0146_as_precedence.rs | 3 - .../parser/inline/ok/0147_const_param.rast | 23 - .../test_data/parser/inline/ok/0147_const_param.rs | 1 - .../test_data/parser/inline/ok/0147_macro_def.rast | 45 - .../test_data/parser/inline/ok/0147_macro_def.rs | 2 - .../parser/inline/ok/0148_pub_macro_def.rast | 21 - .../parser/inline/ok/0148_pub_macro_def.rs | 1 - .../parser/inline/ok/0150_array_attrs.rast | 47 - .../test_data/parser/inline/ok/0150_array_attrs.rs | 1 - .../parser/inline/ok/0150_impl_type_params.rast | 38 - .../parser/inline/ok/0150_impl_type_params.rs | 1 - .../test_data/parser/inline/ok/0151_fn.rast | 14 - .../test_data/parser/inline/ok/0151_fn.rs | 1 - .../parser/inline/ok/0151_trait_alias.rast | 128 - .../test_data/parser/inline/ok/0151_trait_alias.rs | 3 - .../parser/inline/ok/0152_arg_with_attr.rast | 36 - .../parser/inline/ok/0152_arg_with_attr.rs | 3 - .../test_data/parser/inline/ok/0152_impl.rast | 22 - .../test_data/parser/inline/ok/0152_impl.rs | 1 - .../test_data/parser/inline/ok/0153_trait.rast | 11 - .../test_data/parser/inline/ok/0153_trait.rs | 1 - .../ok/0154_fn_pointer_param_ident_path.rast | 58 - .../inline/ok/0154_fn_pointer_param_ident_path.rs | 2 - .../parser/inline/ok/0155_closure_params.rast | 69 - .../parser/inline/ok/0155_closure_params.rs | 3 - .../parser/inline/ok/0156_fn_def_param.rast | 43 - .../parser/inline/ok/0156_fn_def_param.rs | 1 - .../parser/inline/ok/0156_or_pattern.rast | 111 - .../test_data/parser/inline/ok/0156_or_pattern.rs | 8 - .../inline/ok/0157_fn_pointer_unnamed_arg.rast | 26 - .../inline/ok/0157_fn_pointer_unnamed_arg.rs | 1 - .../inline/ok/0157_variant_discriminant.rast | 30 - .../parser/inline/ok/0157_variant_discriminant.rs | 1 - .../inline/ok/0158_binop_resets_statementness.rast | 36 - .../inline/ok/0158_binop_resets_statementness.rs | 3 - .../parser/inline/ok/0158_lambda_ret_block.rast | 43 - .../parser/inline/ok/0158_lambda_ret_block.rs | 1 - .../parser/inline/ok/0159_try_macro_fallback.rast | 34 - .../parser/inline/ok/0159_try_macro_fallback.rs | 1 - .../parser/inline/ok/0160_try_macro_rules.rast | 27 - .../parser/inline/ok/0160_try_macro_rules.rs | 1 - .../parser/inline/ok/0161_labeled_block.rast | 26 - .../parser/inline/ok/0161_labeled_block.rs | 1 - .../parser/inline/ok/0162_unsafe_block.rast | 23 - .../parser/inline/ok/0162_unsafe_block.rs | 1 - .../parser/inline/ok/0163_default_unsafe_item.rast | 44 - .../parser/inline/ok/0163_default_unsafe_item.rs | 3 - .../parser/inline/ok/0164_default_item.rast | 24 - .../parser/inline/ok/0164_default_item.rs | 1 - .../inline/ok/0164_type_path_in_pattern.rast | 38 - .../parser/inline/ok/0164_type_path_in_pattern.rs | 1 - .../ra_syntax/test_data/parser/ok/0000_empty.rast | 1 - crates/ra_syntax/test_data/parser/ok/0000_empty.rs | 0 .../test_data/parser/ok/0001_struct_item.rast | 39 - .../test_data/parser/ok/0001_struct_item.rs | 3 - .../parser/ok/0002_struct_item_field.rast | 22 - .../test_data/parser/ok/0002_struct_item_field.rs | 3 - .../test_data/parser/ok/0004_file_shebang.rast | 2 - .../test_data/parser/ok/0004_file_shebang.rs | 1 - .../test_data/parser/ok/0005_fn_item.rast | 15 - .../ra_syntax/test_data/parser/ok/0005_fn_item.rs | 2 - .../test_data/parser/ok/0006_inner_attributes.rast | 184 - .../test_data/parser/ok/0006_inner_attributes.rs | 10 - .../test_data/parser/ok/0007_extern_crate.rast | 39 - .../test_data/parser/ok/0007_extern_crate.rs | 3 - .../test_data/parser/ok/0008_mod_item.rast | 92 - .../ra_syntax/test_data/parser/ok/0008_mod_item.rs | 17 - .../test_data/parser/ok/0009_use_item.rast | 21 - .../ra_syntax/test_data/parser/ok/0009_use_item.rs | 2 - .../parser/ok/0010_use_path_segments.rast | 42 - .../test_data/parser/ok/0010_use_path_segments.rs | 2 - .../test_data/parser/ok/0011_outer_attribute.rast | 57 - .../test_data/parser/ok/0011_outer_attribute.rs | 6 - .../test_data/parser/ok/0012_visibility.rast | 102 - .../test_data/parser/ok/0012_visibility.rs | 5 - .../parser/ok/0013_use_path_self_super.rast | 33 - .../parser/ok/0013_use_path_self_super.rs | 2 - .../test_data/parser/ok/0014_use_tree.rast | 95 - .../ra_syntax/test_data/parser/ok/0014_use_tree.rs | 7 - .../test_data/parser/ok/0015_use_tree.rast | 65 - .../ra_syntax/test_data/parser/ok/0015_use_tree.rs | 2 - .../test_data/parser/ok/0016_struct_flavors.rast | 93 - .../test_data/parser/ok/0016_struct_flavors.rs | 10 - .../parser/ok/0017_attr_trailing_comma.rast | 28 - .../parser/ok/0017_attr_trailing_comma.rs | 2 - .../parser/ok/0018_struct_type_params.rast | 257 -- .../test_data/parser/ok/0018_struct_type_params.rs | 17 - .../ra_syntax/test_data/parser/ok/0019_enums.rast | 155 - crates/ra_syntax/test_data/parser/ok/0019_enums.rs | 25 - .../parser/ok/0020_type_param_bounds.rast | 268 -- .../test_data/parser/ok/0020_type_param_bounds.rs | 10 - .../parser/ok/0022_empty_extern_block.rast | 21 - .../test_data/parser/ok/0022_empty_extern_block.rs | 5 - .../test_data/parser/ok/0023_static_items.rast | 41 - .../test_data/parser/ok/0023_static_items.rs | 2 - .../test_data/parser/ok/0024_const_item.rast | 59 - .../test_data/parser/ok/0024_const_item.rs | 3 - .../parser/ok/0025_extern_fn_in_block.rast | 31 - .../test_data/parser/ok/0025_extern_fn_in_block.rs | 3 - .../parser/ok/0026_const_fn_in_block.rast | 30 - .../test_data/parser/ok/0026_const_fn_in_block.rs | 3 - .../parser/ok/0027_unsafe_fn_in_block.rast | 41 - .../test_data/parser/ok/0027_unsafe_fn_in_block.rs | 4 - .../parser/ok/0028_operator_binding_power.rast | 185 - .../parser/ok/0028_operator_binding_power.rs | 14 - .../test_data/parser/ok/0029_range_forms.rast | 151 - .../test_data/parser/ok/0029_range_forms.rs | 11 - .../test_data/parser/ok/0030_string_suffixes.rast | 63 - .../test_data/parser/ok/0030_string_suffixes.rs | 6 - .../ra_syntax/test_data/parser/ok/0030_traits.rast | 61 - .../ra_syntax/test_data/parser/ok/0030_traits.rs | 7 - .../ra_syntax/test_data/parser/ok/0031_extern.rast | 973 ----- .../ra_syntax/test_data/parser/ok/0031_extern.rs | 29 - .../test_data/parser/ok/0032_where_for.rast | 90 - .../test_data/parser/ok/0032_where_for.rs | 4 - .../test_data/parser/ok/0033_label_break.rast | 215 -- .../test_data/parser/ok/0033_label_break.rs | 28 - .../parser/ok/0034_crate_path_in_call.rast | 41 - .../test_data/parser/ok/0034_crate_path_in_call.rs | 3 - .../test_data/parser/ok/0035_weird_exprs.rast | 2291 ----------- .../test_data/parser/ok/0035_weird_exprs.rs | 154 - .../test_data/parser/ok/0036_fully_qualified.rast | 92 - .../test_data/parser/ok/0036_fully_qualified.rs | 8 - crates/ra_syntax/test_data/parser/ok/0037_mod.rast | 16 - crates/ra_syntax/test_data/parser/ok/0037_mod.rs | 5 - .../test_data/parser/ok/0038_where_pred_type.rast | 42 - .../test_data/parser/ok/0038_where_pred_type.rs | 1 - .../test_data/parser/ok/0039_raw_fn_item.rast | 15 - .../test_data/parser/ok/0039_raw_fn_item.rs | 2 - .../parser/ok/0040_raw_struct_item_field.rast | 22 - .../parser/ok/0040_raw_struct_item_field.rs | 3 - .../test_data/parser/ok/0041_raw_keywords.rast | 49 - .../test_data/parser/ok/0041_raw_keywords.rs | 1 - .../test_data/parser/ok/0042_ufcs_call_list.rast | 123 - .../test_data/parser/ok/0042_ufcs_call_list.rs | 15 - .../parser/ok/0043_complex_assignment.rast | 109 - .../test_data/parser/ok/0043_complex_assignment.rs | 8 - .../test_data/parser/ok/0044_let_attrs.rast | 75 - .../test_data/parser/ok/0044_let_attrs.rs | 5 - .../parser/ok/0045_block_inner_attrs.rast | 177 - .../test_data/parser/ok/0045_block_inner_attrs.rs | 20 - .../parser/ok/0046_extern_inner_attributes.rast | 28 - .../parser/ok/0046_extern_inner_attributes.rs | 4 - .../parser/ok/0047_minus_in_inner_pattern.rast | 320 -- .../parser/ok/0047_minus_in_inner_pattern.rs | 27 - .../parser/ok/0048_compound_assignment.rast | 200 - .../parser/ok/0048_compound_assignment.rs | 17 - .../test_data/parser/ok/0049_async_block.rast | 35 - .../test_data/parser/ok/0049_async_block.rs | 5 - .../parser/ok/0050_async_block_as_argument.rast | 90 - .../parser/ok/0050_async_block_as_argument.rs | 5 - .../test_data/parser/ok/0051_parameter_attrs.rast | 508 --- .../test_data/parser/ok/0051_parameter_attrs.rs | 21 - .../test_data/parser/ok/0052_for_range_block.rast | 78 - .../test_data/parser/ok/0052_for_range_block.rs | 5 - .../ok/0053_outer_attribute_on_macro_rules.rast | 39 - .../ok/0053_outer_attribute_on_macro_rules.rs | 5 - .../parser/ok/0054_qual_path_in_type_arg.rast | 123 - .../parser/ok/0054_qual_path_in_type_arg.rs | 5 - .../test_data/parser/ok/0055_dot_dot_dot.rast | 49 - .../test_data/parser/ok/0055_dot_dot_dot.rs | 5 - .../test_data/parser/ok/0056_neq_in_type.rast | 64 - .../test_data/parser/ok/0056_neq_in_type.rs | 3 - .../test_data/parser/ok/0057_loop_in_call.rast | 56 - .../test_data/parser/ok/0057_loop_in_call.rs | 5 - .../parser/ok/0058_unary_expr_precedence.rast | 96 - .../parser/ok/0058_unary_expr_precedence.rs | 7 - .../test_data/parser/ok/0059_loops_in_parens.rast | 97 - .../test_data/parser/ok/0059_loops_in_parens.rs | 5 - .../test_data/parser/ok/0060_as_range.rast | 55 - .../ra_syntax/test_data/parser/ok/0060_as_range.rs | 4 - .../test_data/parser/ok/0061_match_full_range.rast | 26 - .../test_data/parser/ok/0061_match_full_range.rs | 4 - .../test_data/parser/ok/0062_macro_2.0.rast | 175 - .../test_data/parser/ok/0062_macro_2.0.rs | 15 - .../parser/ok/0063_trait_fn_patterns.rast | 194 - .../test_data/parser/ok/0063_trait_fn_patterns.rs | 7 - .../test_data/parser/ok/0063_variadic_fun.rast | 133 - .../test_data/parser/ok/0063_variadic_fun.rs | 5 - .../test_data/parser/ok/0064_impl_fn_params.rast | 162 - .../test_data/parser/ok/0064_impl_fn_params.rs | 6 - .../test_data/parser/ok/0065_comment_newline.rast | 16 - .../test_data/parser/ok/0065_comment_newline.rs | 3 - .../parser/ok/0065_plus_after_fn_trait_bound.rast | 60 - .../parser/ok/0065_plus_after_fn_trait_bound.rs | 1 - .../test_data/parser/ok/0066_default_modifier.rast | 218 -- .../test_data/parser/ok/0066_default_modifier.rs | 16 - .../test_data/parser/ok/0067_where_for_pred.rast | 392 -- .../test_data/parser/ok/0067_where_for_pred.rs | 30 - .../test_data/parser/ok/0068_item_modifiers.rast | 218 -- .../test_data/parser/ok/0068_item_modifiers.rs | 16 - .../test_data/reparse/fuzz-failures/0000.rs | 6 - .../test_data/reparse/fuzz-failures/0001.rs | 4 - .../test_data/reparse/fuzz-failures/0002.rs | 4 - .../test_data/reparse/fuzz-failures/0003.rs | Bin 8 -> 0 bytes .../test_data/reparse/fuzz-failures/0004.rs | 4 - .../test_data/reparse/fuzz-failures/0005.rs | 7 - crates/rust-analyzer/Cargo.toml | 2 +- crates/rust-analyzer/src/cargo_target_spec.rs | 2 +- crates/rust-analyzer/src/cli.rs | 2 +- crates/rust-analyzer/src/cli/analysis_stats.rs | 2 +- crates/rust-analyzer/src/from_proto.rs | 2 +- crates/rust-analyzer/src/handlers.rs | 2 +- crates/rust-analyzer/src/to_proto.rs | 2 +- crates/syntax/Cargo.toml | 35 + crates/syntax/fuzz/.gitignore | 4 + crates/syntax/fuzz/Cargo.toml | 27 + crates/syntax/fuzz/fuzz_targets/parser.rs | 11 + crates/syntax/fuzz/fuzz_targets/reparse.rs | 11 + crates/syntax/src/algo.rs | 406 ++ crates/syntax/src/ast.rs | 331 ++ crates/syntax/src/ast/edit.rs | 642 +++ crates/syntax/src/ast/expr_ext.rs | 418 ++ crates/syntax/src/ast/generated.rs | 41 + crates/syntax/src/ast/generated/nodes.rs | 4067 ++++++++++++++++++++ crates/syntax/src/ast/generated/tokens.rs | 91 + crates/syntax/src/ast/make.rs | 392 ++ crates/syntax/src/ast/node_ext.rs | 485 +++ crates/syntax/src/ast/token_ext.rs | 538 +++ crates/syntax/src/ast/traits.rs | 141 + crates/syntax/src/fuzz.rs | 73 + crates/syntax/src/lib.rs | 388 ++ crates/syntax/src/parsing.rs | 59 + crates/syntax/src/parsing/lexer.rs | 244 ++ crates/syntax/src/parsing/reparsing.rs | 455 +++ crates/syntax/src/parsing/text_token_source.rs | 84 + crates/syntax/src/parsing/text_tree_sink.rs | 183 + crates/syntax/src/ptr.rs | 105 + crates/syntax/src/syntax_error.rs | 44 + crates/syntax/src/syntax_node.rs | 77 + crates/syntax/src/tests.rs | 280 ++ crates/syntax/src/validation.rs | 303 ++ crates/syntax/src/validation/block.rs | 22 + crates/syntax/test_data/accidentally_quadratic | 3980 +++++++++++++++++++ .../lexer/err/0001_unclosed_char_at_eof.rs | 1 + .../lexer/err/0001_unclosed_char_at_eof.txt | 2 + .../lexer/err/0002_unclosed_char_with_ferris.rs | 1 + .../lexer/err/0002_unclosed_char_with_ferris.txt | 2 + .../err/0003_unclosed_char_with_ascii_escape.rs | 1 + .../err/0003_unclosed_char_with_ascii_escape.txt | 2 + .../err/0004_unclosed_char_with_unicode_escape.rs | 1 + .../err/0004_unclosed_char_with_unicode_escape.txt | 2 + .../lexer/err/0005_unclosed_char_with_space.rs | 1 + .../lexer/err/0005_unclosed_char_with_space.txt | 2 + .../lexer/err/0006_unclosed_char_with_slash.rs | 1 + .../lexer/err/0006_unclosed_char_with_slash.txt | 2 + .../lexer/err/0007_unclosed_char_with_slash_n.rs | 1 + .../lexer/err/0007_unclosed_char_with_slash_n.txt | 2 + .../0008_unclosed_char_with_slash_single_quote.rs | 1 + .../0008_unclosed_char_with_slash_single_quote.txt | 2 + .../lexer/err/0009_unclosed_byte_at_eof.rs | 1 + .../lexer/err/0009_unclosed_byte_at_eof.txt | 2 + .../lexer/err/0010_unclosed_byte_with_ferris.rs | 1 + .../lexer/err/0010_unclosed_byte_with_ferris.txt | 2 + .../err/0011_unclosed_byte_with_ascii_escape.rs | 1 + .../err/0011_unclosed_byte_with_ascii_escape.txt | 2 + .../err/0012_unclosed_byte_with_unicode_escape.rs | 1 + .../err/0012_unclosed_byte_with_unicode_escape.txt | 2 + .../lexer/err/0013_unclosed_byte_with_space.rs | 1 + .../lexer/err/0013_unclosed_byte_with_space.txt | 2 + .../lexer/err/0014_unclosed_byte_with_slash.rs | 1 + .../lexer/err/0014_unclosed_byte_with_slash.txt | 2 + .../lexer/err/0015_unclosed_byte_with_slash_n.rs | 1 + .../lexer/err/0015_unclosed_byte_with_slash_n.txt | 2 + .../0016_unclosed_byte_with_slash_single_quote.rs | 1 + .../0016_unclosed_byte_with_slash_single_quote.txt | 2 + .../lexer/err/0017_unclosed_string_at_eof.rs | 1 + .../lexer/err/0017_unclosed_string_at_eof.txt | 2 + .../lexer/err/0018_unclosed_string_with_ferris.rs | 1 + .../lexer/err/0018_unclosed_string_with_ferris.txt | 2 + .../err/0019_unclosed_string_with_ascii_escape.rs | 1 + .../err/0019_unclosed_string_with_ascii_escape.txt | 2 + .../0020_unclosed_string_with_unicode_escape.rs | 1 + .../0020_unclosed_string_with_unicode_escape.txt | 2 + .../lexer/err/0021_unclosed_string_with_space.rs | 1 + .../lexer/err/0021_unclosed_string_with_space.txt | 2 + .../lexer/err/0022_unclosed_string_with_slash.rs | 1 + .../lexer/err/0022_unclosed_string_with_slash.txt | 2 + .../lexer/err/0023_unclosed_string_with_slash_n.rs | 1 + .../err/0023_unclosed_string_with_slash_n.txt | 2 + ...0024_unclosed_string_with_slash_double_quote.rs | 1 + ...024_unclosed_string_with_slash_double_quote.txt | 2 + .../lexer/err/0025_unclosed_byte_string_at_eof.rs | 1 + .../lexer/err/0025_unclosed_byte_string_at_eof.txt | 2 + .../err/0026_unclosed_byte_string_with_ferris.rs | 1 + .../err/0026_unclosed_byte_string_with_ferris.txt | 2 + .../0027_unclosed_byte_string_with_ascii_escape.rs | 1 + ...0027_unclosed_byte_string_with_ascii_escape.txt | 2 + ...028_unclosed_byte_string_with_unicode_escape.rs | 1 + ...28_unclosed_byte_string_with_unicode_escape.txt | 2 + .../err/0029_unclosed_byte_string_with_space.rs | 1 + .../err/0029_unclosed_byte_string_with_space.txt | 2 + .../err/0030_unclosed_byte_string_with_slash.rs | 1 + .../err/0030_unclosed_byte_string_with_slash.txt | 2 + .../err/0031_unclosed_byte_string_with_slash_n.rs | 1 + .../err/0031_unclosed_byte_string_with_slash_n.txt | 2 + ...unclosed_byte_string_with_slash_double_quote.rs | 1 + ...nclosed_byte_string_with_slash_double_quote.txt | 2 + .../lexer/err/0033_unclosed_raw_string_at_eof.rs | 1 + .../lexer/err/0033_unclosed_raw_string_at_eof.txt | 2 + .../err/0034_unclosed_raw_string_with_ferris.rs | 1 + .../err/0034_unclosed_raw_string_with_ferris.txt | 2 + .../0035_unclosed_raw_string_with_ascii_escape.rs | 1 + .../0035_unclosed_raw_string_with_ascii_escape.txt | 2 + ...0036_unclosed_raw_string_with_unicode_escape.rs | 1 + ...036_unclosed_raw_string_with_unicode_escape.txt | 2 + .../err/0037_unclosed_raw_string_with_space.rs | 1 + .../err/0037_unclosed_raw_string_with_space.txt | 2 + .../err/0038_unclosed_raw_string_with_slash.rs | 1 + .../err/0038_unclosed_raw_string_with_slash.txt | 2 + .../err/0039_unclosed_raw_string_with_slash_n.rs | 1 + .../err/0039_unclosed_raw_string_with_slash_n.txt | 2 + .../err/0040_unclosed_raw_byte_string_at_eof.rs | 1 + .../err/0040_unclosed_raw_byte_string_at_eof.txt | 2 + .../0041_unclosed_raw_byte_string_with_ferris.rs | 1 + .../0041_unclosed_raw_byte_string_with_ferris.txt | 2 + ...2_unclosed_raw_byte_string_with_ascii_escape.rs | 1 + ..._unclosed_raw_byte_string_with_ascii_escape.txt | 2 + ...unclosed_raw_byte_string_with_unicode_escape.rs | 1 + ...nclosed_raw_byte_string_with_unicode_escape.txt | 2 + .../0044_unclosed_raw_byte_string_with_space.rs | 1 + .../0044_unclosed_raw_byte_string_with_space.txt | 2 + .../0045_unclosed_raw_byte_string_with_slash.rs | 1 + .../0045_unclosed_raw_byte_string_with_slash.txt | 2 + .../0046_unclosed_raw_byte_string_with_slash_n.rs | 1 + .../0046_unclosed_raw_byte_string_with_slash_n.txt | 2 + .../lexer/err/0047_unstarted_raw_string_at_eof.rs | 1 + .../lexer/err/0047_unstarted_raw_string_at_eof.txt | 2 + .../err/0048_unstarted_raw_byte_string_at_eof.rs | 1 + .../err/0048_unstarted_raw_byte_string_at_eof.txt | 2 + .../err/0049_unstarted_raw_string_with_ascii.rs | 1 + .../err/0049_unstarted_raw_string_with_ascii.txt | 10 + .../0050_unstarted_raw_byte_string_with_ascii.rs | 1 + .../0050_unstarted_raw_byte_string_with_ascii.txt | 10 + .../err/0051_unclosed_block_comment_at_eof.rs | 1 + .../err/0051_unclosed_block_comment_at_eof.txt | 2 + .../0052_unclosed_block_comment_with_content.rs | 1 + .../0052_unclosed_block_comment_with_content.txt | 2 + .../0053_unclosed_nested_block_comment_entirely.rs | 1 + ...0053_unclosed_nested_block_comment_entirely.txt | 2 + ...0054_unclosed_nested_block_comment_partially.rs | 1 + ...054_unclosed_nested_block_comment_partially.txt | 2 + .../syntax/test_data/lexer/err/0055_empty_int.rs | 17 + .../syntax/test_data/lexer/err/0055_empty_int.txt | 39 + .../test_data/lexer/err/0056_empty_exponent.rs | 22 + .../test_data/lexer/err/0056_empty_exponent.txt | 62 + .../err/0057_lifetime_strarts_with_a_number.rs | 2 + .../err/0057_lifetime_strarts_with_a_number.txt | 6 + crates/syntax/test_data/lexer/ok/0001_hello.rs | 1 + crates/syntax/test_data/lexer/ok/0001_hello.txt | 3 + .../syntax/test_data/lexer/ok/0002_whitespace.rs | 4 + .../syntax/test_data/lexer/ok/0002_whitespace.txt | 12 + crates/syntax/test_data/lexer/ok/0003_ident.rs | 1 + crates/syntax/test_data/lexer/ok/0003_ident.txt | 14 + crates/syntax/test_data/lexer/ok/0004_numbers.rs | 9 + crates/syntax/test_data/lexer/ok/0004_numbers.txt | 57 + crates/syntax/test_data/lexer/ok/0005_symbols.rs | 6 + crates/syntax/test_data/lexer/ok/0005_symbols.txt | 77 + crates/syntax/test_data/lexer/ok/0006_chars.rs | 1 + crates/syntax/test_data/lexer/ok/0006_chars.txt | 16 + crates/syntax/test_data/lexer/ok/0007_lifetimes.rs | 1 + .../syntax/test_data/lexer/ok/0007_lifetimes.txt | 8 + .../syntax/test_data/lexer/ok/0008_byte_strings.rs | 3 + .../test_data/lexer/ok/0008_byte_strings.txt | 22 + crates/syntax/test_data/lexer/ok/0009_strings.rs | 2 + crates/syntax/test_data/lexer/ok/0009_strings.txt | 8 + .../lexer/ok/0010_single_line_comments.rs | 12 + .../lexer/ok/0010_single_line_comments.txt | 22 + crates/syntax/test_data/lexer/ok/0011_keywords.rs | 3 + crates/syntax/test_data/lexer/ok/0011_keywords.txt | 64 + .../test_data/lexer/ok/0012_block_comment.rs | 3 + .../test_data/lexer/ok/0012_block_comment.txt | 6 + .../syntax/test_data/lexer/ok/0013_raw_strings.rs | 1 + .../syntax/test_data/lexer/ok/0013_raw_strings.txt | 2 + crates/syntax/test_data/lexer/ok/0014_raw_ident.rs | 1 + .../syntax/test_data/lexer/ok/0014_raw_ident.txt | 2 + .../err/0000_struct_field_missing_comma.rast | 34 + .../parser/err/0000_struct_field_missing_comma.rs | 4 + .../parser/err/0001_item_recovery_in_file.rast | 18 + .../parser/err/0001_item_recovery_in_file.rs | 3 + .../parser/err/0002_duplicate_shebang.rast | 39 + .../test_data/parser/err/0002_duplicate_shebang.rs | 2 + .../test_data/parser/err/0003_C++_semicolon.rast | 39 + .../test_data/parser/err/0003_C++_semicolon.rs | 4 + .../parser/err/0004_use_path_bad_segment.rast | 15 + .../parser/err/0004_use_path_bad_segment.rs | 1 + .../parser/err/0005_attribute_recover.rast | 59 + .../test_data/parser/err/0005_attribute_recover.rs | 8 + .../parser/err/0006_named_field_recovery.rast | 74 + .../parser/err/0006_named_field_recovery.rs | 7 + .../parser/err/0007_stray_curly_in_file.rast | 32 + .../parser/err/0007_stray_curly_in_file.rs | 9 + .../parser/err/0008_item_block_recovery.rast | 77 + .../parser/err/0008_item_block_recovery.rs | 13 + .../err/0009_broken_struct_type_parameter.rast | 58 + .../err/0009_broken_struct_type_parameter.rs | 5 + .../parser/err/0010_unsafe_lambda_block.rast | 44 + .../parser/err/0010_unsafe_lambda_block.rs | 3 + .../test_data/parser/err/0011_extern_struct.rast | 13 + .../test_data/parser/err/0011_extern_struct.rs | 1 + .../test_data/parser/err/0012_broken_lambda.rast | 387 ++ .../test_data/parser/err/0013_invalid_type.rast | 89 + .../test_data/parser/err/0013_invalid_type.rs | 7 + .../test_data/parser/err/0014_where_no_bounds.rast | 31 + .../test_data/parser/err/0014_where_no_bounds.rs | 1 + .../test_data/parser/err/0015_curly_in_params.rast | 24 + .../test_data/parser/err/0015_curly_in_params.rs | 2 + .../test_data/parser/err/0016_missing_semi.rast | 43 + .../test_data/parser/err/0016_missing_semi.rs | 6 + .../parser/err/0017_incomplete_binexpr.rast | 46 + .../parser/err/0017_incomplete_binexpr.rs | 4 + .../test_data/parser/err/0018_incomplete_fn.rast | 131 + .../test_data/parser/err/0018_incomplete_fn.rs | 8 + .../test_data/parser/err/0019_let_recover.rast | 103 + .../test_data/parser/err/0019_let_recover.rs | 12 + .../test_data/parser/err/0020_fn_recover.rast | 20 + .../syntax/test_data/parser/err/0020_fn_recover.rs | 3 + .../parser/err/0021_incomplete_param.rast | 34 + .../test_data/parser/err/0021_incomplete_param.rs | 2 + .../test_data/parser/err/0022_bad_exprs.rast | 180 + .../syntax/test_data/parser/err/0022_bad_exprs.rs | 3 + .../parser/err/0023_mismatched_paren.rast | 43 + .../test_data/parser/err/0023_mismatched_paren.rs | 5 + .../parser/err/0024_many_type_parens.rast | 319 ++ .../test_data/parser/err/0024_many_type_parens.rs | 7 + crates/syntax/test_data/parser/err/0025_nope.rast | 202 + crates/syntax/test_data/parser/err/0025_nope.rs | 31 + .../test_data/parser/err/0026_imp_recovery.rast | 49 + .../test_data/parser/err/0026_imp_recovery.rs | 2 + .../parser/err/0027_incomplere_where_for.rast | 27 + .../parser/err/0027_incomplere_where_for.rs | 3 + .../parser/err/0029_field_completion.rast | 35 + .../test_data/parser/err/0029_field_completion.rs | 3 + .../parser/err/0031_block_inner_attrs.rast | 121 + .../test_data/parser/err/0031_block_inner_attrs.rs | 15 + .../parser/err/0032_match_arms_inner_attrs.rast | 203 + .../parser/err/0032_match_arms_inner_attrs.rs | 20 + .../parser/err/0033_match_arms_outer_attrs.rast | 66 + .../parser/err/0033_match_arms_outer_attrs.rs | 7 + .../test_data/parser/err/0034_bad_box_pattern.rast | 95 + .../test_data/parser/err/0034_bad_box_pattern.rs | 6 + .../test_data/parser/err/0035_use_recover.rast | 53 + .../test_data/parser/err/0035_use_recover.rs | 5 + .../test_data/parser/err/0036_partial_use.rast | 51 + .../test_data/parser/err/0036_partial_use.rs | 2 + .../parser/err/0037_visibility_in_traits.rast | 97 + .../parser/err/0037_visibility_in_traits.rs | 6 + .../parser/err/0038_endless_inclusive_range.rast | 29 + .../parser/err/0038_endless_inclusive_range.rs | 4 + .../test_data/parser/err/0039_lambda_recovery.rast | 82 + .../test_data/parser/err/0039_lambda_recovery.rs | 5 + .../parser/err/0040_illegal_crate_kw_location.rast | 91 + .../parser/err/0040_illegal_crate_kw_location.rs | 4 + .../err/0041_illegal_super_keyword_location.rast | 70 + .../err/0041_illegal_super_keyword_location.rs | 4 + .../err/0042_illegal_self_keyword_location.rast | 27 + .../err/0042_illegal_self_keyword_location.rs | 2 + .../test_data/parser/err/0043_weird_blocks.rast | 71 + .../test_data/parser/err/0043_weird_blocks.rs | 6 + .../parser/err/0044_unexpected_for_type.rast | 240 ++ .../parser/err/0044_unexpected_for_type.rs | 9 + .../test_data/parser/err/0045_item_modifiers.rast | 45 + .../test_data/parser/err/0045_item_modifiers.rs | 2 + .../fragments/expr/err/0000_truncated_add.rast | 1 + .../fragments/expr/err/0000_truncated_add.rs | 1 + .../parser/fragments/expr/ok/0000_add.rast | 8 + .../test_data/parser/fragments/expr/ok/0000_add.rs | 1 + .../fragments/item/err/0000_extra_keyword.rast | 1 + .../fragments/item/err/0000_extra_keyword.rs | 1 + .../parser/fragments/item/ok/0000_fn.rast | 12 + .../test_data/parser/fragments/item/ok/0000_fn.rs | 1 + .../fragments/path/err/0000_reserved_word.rast | 1 + .../fragments/path/err/0000_reserved_word.rs | 1 + .../parser/fragments/path/err/0001_expression.rast | 1 + .../parser/fragments/path/err/0001_expression.rs | 1 + .../fragments/path/ok/0000_single_ident.rast | 4 + .../parser/fragments/path/ok/0000_single_ident.rs | 1 + .../parser/fragments/path/ok/0001_multipart.rast | 14 + .../parser/fragments/path/ok/0001_multipart.rs | 1 + .../fragments/pattern/err/0000_reserved_word.rast | 1 + .../fragments/pattern/err/0000_reserved_word.rs | 1 + .../fragments/pattern/err/0001_missing_paren.rast | 1 + .../fragments/pattern/err/0001_missing_paren.rs | 1 + .../parser/fragments/pattern/ok/0000_enum.rast | 10 + .../parser/fragments/pattern/ok/0000_enum.rs | 1 + .../fragments/type/err/0000_missing_close.rast | 1 + .../fragments/type/err/0000_missing_close.rs | 1 + .../parser/fragments/type/ok/0000_result.rast | 22 + .../parser/fragments/type/ok/0000_result.rs | 1 + .../syntax/test_data/parser/fuzz-failures/0000.rs | 199 + .../syntax/test_data/parser/fuzz-failures/0001.rs | 106 + .../syntax/test_data/parser/fuzz-failures/0002.rs | 1 + .../syntax/test_data/parser/fuzz-failures/0003.rs | 1 + .../syntax/test_data/parser/fuzz-failures/0004.rs | 1 + .../inline/err/0001_array_type_missing_semi.rast | 27 + .../inline/err/0001_array_type_missing_semi.rs | 1 + .../inline/err/0002_misplaced_label_err.rast | 28 + .../parser/inline/err/0002_misplaced_label_err.rs | 3 + .../err/0003_pointer_type_no_mutability.rast | 17 + .../inline/err/0003_pointer_type_no_mutability.rs | 1 + .../parser/inline/err/0004_impl_type.rast | 79 + .../test_data/parser/inline/err/0004_impl_type.rs | 4 + .../err/0005_fn_pointer_type_missing_fn.rast | 23 + .../inline/err/0005_fn_pointer_type_missing_fn.rs | 1 + .../inline/err/0006_unsafe_block_in_mod.rast | 35 + .../parser/inline/err/0006_unsafe_block_in_mod.rs | 1 + .../inline/err/0007_async_without_semicolon.rast | 31 + .../inline/err/0007_async_without_semicolon.rs | 1 + .../test_data/parser/inline/err/0008_pub_expr.rast | 25 + .../test_data/parser/inline/err/0008_pub_expr.rs | 1 + .../inline/err/0009_attr_on_expr_not_allowed.rast | 58 + .../inline/err/0009_attr_on_expr_not_allowed.rs | 4 + .../inline/err/0010_bad_tuple_index_expr.rast | 52 + .../parser/inline/err/0010_bad_tuple_index_expr.rs | 5 + .../parser/inline/err/0013_static_underscore.rast | 21 + .../parser/inline/err/0013_static_underscore.rs | 1 + ...14_record_literal_before_ellipsis_recovery.rast | 48 + ...0014_record_literal_before_ellipsis_recovery.rs | 3 + .../parser/inline/err/0015_empty_segment.rast | 15 + .../parser/inline/err/0015_empty_segment.rs | 1 + .../parser/inline/ok/0001_trait_item_list.rast | 71 + .../parser/inline/ok/0001_trait_item_list.rs | 6 + .../parser/inline/ok/0002_use_tree_list.rast | 136 + .../parser/inline/ok/0002_use_tree_list.rs | 4 + .../parser/inline/ok/0003_where_pred_for.rast | 60 + .../parser/inline/ok/0003_where_pred_for.rs | 4 + .../ok/0004_value_parameters_no_patterns.rast | 60 + .../inline/ok/0004_value_parameters_no_patterns.rs | 1 + .../inline/ok/0005_function_type_params.rast | 37 + .../parser/inline/ok/0005_function_type_params.rs | 1 + .../parser/inline/ok/0006_self_param.rast | 116 + .../test_data/parser/inline/ok/0006_self_param.rs | 7 + .../parser/inline/ok/0007_type_param_bounds.rast | 40 + .../parser/inline/ok/0007_type_param_bounds.rs | 1 + .../test_data/parser/inline/ok/0008_path_part.rast | 96 + .../test_data/parser/inline/ok/0008_path_part.rs | 6 + .../test_data/parser/inline/ok/0009_loop_expr.rast | 24 + .../test_data/parser/inline/ok/0009_loop_expr.rs | 3 + .../parser/inline/ok/0010_extern_block.rast | 9 + .../parser/inline/ok/0010_extern_block.rs | 1 + .../parser/inline/ok/0011_field_expr.rast | 59 + .../test_data/parser/inline/ok/0011_field_expr.rs | 5 + .../inline/ok/0012_type_item_where_clause.rast | 33 + .../inline/ok/0012_type_item_where_clause.rs | 1 + .../parser/inline/ok/0013_pointer_type_mut.rast | 35 + .../parser/inline/ok/0013_pointer_type_mut.rs | 2 + .../parser/inline/ok/0014_never_type.rast | 13 + .../test_data/parser/inline/ok/0014_never_type.rs | 1 + .../parser/inline/ok/0015_continue_expr.rast | 35 + .../parser/inline/ok/0015_continue_expr.rs | 6 + .../parser/inline/ok/0017_array_type.rast | 21 + .../test_data/parser/inline/ok/0017_array_type.rs | 1 + .../parser/inline/ok/0018_arb_self_types.rast | 72 + .../parser/inline/ok/0018_arb_self_types.rs | 4 + .../parser/inline/ok/0019_unary_expr.rast | 44 + .../test_data/parser/inline/ok/0019_unary_expr.rs | 5 + .../test_data/parser/inline/ok/0020_use_star.rast | 59 + .../test_data/parser/inline/ok/0020_use_star.rs | 4 + .../parser/inline/ok/0021_impl_item_list.rast | 78 + .../parser/inline/ok/0021_impl_item_list.rs | 6 + .../parser/inline/ok/0022_crate_visibility.rast | 53 + .../parser/inline/ok/0022_crate_visibility.rs | 4 + .../parser/inline/ok/0023_placeholder_type.rast | 13 + .../parser/inline/ok/0023_placeholder_type.rs | 1 + .../test_data/parser/inline/ok/0024_slice_pat.rast | 41 + .../test_data/parser/inline/ok/0024_slice_pat.rs | 3 + .../parser/inline/ok/0025_slice_type.rast | 17 + .../test_data/parser/inline/ok/0025_slice_type.rs | 1 + .../parser/inline/ok/0026_tuple_pat_fields.rast | 104 + .../parser/inline/ok/0026_tuple_pat_fields.rs | 6 + .../test_data/parser/inline/ok/0027_ref_pat.rast | 49 + .../test_data/parser/inline/ok/0027_ref_pat.rs | 4 + .../parser/inline/ok/0028_impl_trait_type.rast | 43 + .../parser/inline/ok/0028_impl_trait_type.rs | 1 + .../test_data/parser/inline/ok/0029_cast_expr.rast | 89 + .../test_data/parser/inline/ok/0029_cast_expr.rs | 6 + .../test_data/parser/inline/ok/0030_cond.rast | 202 + .../syntax/test_data/parser/inline/ok/0030_cond.rs | 7 + .../parser/inline/ok/0031_while_expr.rast | 84 + .../test_data/parser/inline/ok/0031_while_expr.rs | 5 + .../parser/inline/ok/0032_fn_pointer_type.rast | 98 + .../parser/inline/ok/0032_fn_pointer_type.rs | 4 + .../parser/inline/ok/0033_reference_type;.rast | 50 + .../parser/inline/ok/0033_reference_type;.rs | 3 + .../parser/inline/ok/0034_break_expr.rast | 53 + .../test_data/parser/inline/ok/0034_break_expr.rs | 8 + .../parser/inline/ok/0037_qual_paths.rast | 78 + .../test_data/parser/inline/ok/0037_qual_paths.rs | 2 + .../parser/inline/ok/0038_full_range_expr.rast | 28 + .../parser/inline/ok/0038_full_range_expr.rs | 1 + .../test_data/parser/inline/ok/0039_type_arg.rast | 55 + .../test_data/parser/inline/ok/0039_type_arg.rs | 1 + .../parser/inline/ok/0040_crate_keyword_vis.rast | 62 + .../parser/inline/ok/0040_crate_keyword_vis.rs | 3 + .../parser/inline/ok/0041_trait_item.rast | 125 + .../test_data/parser/inline/ok/0041_trait_item.rs | 2 + .../test_data/parser/inline/ok/0042_call_expr.rast | 147 + .../test_data/parser/inline/ok/0042_call_expr.rs | 6 + .../test_data/parser/inline/ok/0043_use_alias.rast | 138 + .../test_data/parser/inline/ok/0043_use_alias.rs | 8 + .../parser/inline/ok/0044_block_items.rast | 28 + .../test_data/parser/inline/ok/0044_block_items.rs | 1 + .../inline/ok/0045_param_list_opt_patterns.rast | 46 + .../inline/ok/0045_param_list_opt_patterns.rs | 1 + .../inline/ok/0046_singleton_tuple_type.rast | 20 + .../parser/inline/ok/0046_singleton_tuple_type.rs | 1 + .../inline/ok/0048_path_type_with_bounds.rast | 81 + .../parser/inline/ok/0048_path_type_with_bounds.rs | 2 + .../test_data/parser/inline/ok/0050_fn_decl.rast | 22 + .../test_data/parser/inline/ok/0050_fn_decl.rs | 1 + .../test_data/parser/inline/ok/0051_unit_type.rast | 14 + .../test_data/parser/inline/ok/0051_unit_type.rs | 1 + .../test_data/parser/inline/ok/0052_path_type.rast | 70 + .../test_data/parser/inline/ok/0052_path_type.rs | 4 + .../test_data/parser/inline/ok/0053_path_expr.rast | 95 + .../test_data/parser/inline/ok/0053_path_expr.rs | 6 + .../parser/inline/ok/0054_record_field_attrs.rast | 44 + .../parser/inline/ok/0054_record_field_attrs.rs | 4 + .../parser/inline/ok/0055_literal_pattern.rast | 76 + .../parser/inline/ok/0055_literal_pattern.rs | 8 + .../parser/inline/ok/0056_where_clause.rast | 110 + .../parser/inline/ok/0056_where_clause.rs | 7 + .../test_data/parser/inline/ok/0058_range_pat.rast | 82 + .../test_data/parser/inline/ok/0058_range_pat.rs | 7 + .../parser/inline/ok/0059_match_arms_commas.rast | 58 + .../parser/inline/ok/0059_match_arms_commas.rs | 7 + .../parser/inline/ok/0060_extern_crate.rast | 10 + .../parser/inline/ok/0060_extern_crate.rs | 1 + .../parser/inline/ok/0061_record_lit.rast | 124 + .../test_data/parser/inline/ok/0061_record_lit.rs | 6 + .../parser/inline/ok/0062_mod_contents.rast | 66 + .../parser/inline/ok/0062_mod_contents.rs | 5 + .../parser/inline/ok/0063_impl_def_neg.rast | 23 + .../parser/inline/ok/0063_impl_def_neg.rs | 1 + .../test_data/parser/inline/ok/0064_if_expr.rast | 121 + .../test_data/parser/inline/ok/0064_if_expr.rs | 7 + .../parser/inline/ok/0065_dyn_trait_type.rast | 43 + .../parser/inline/ok/0065_dyn_trait_type.rs | 1 + .../test_data/parser/inline/ok/0066_match_arm.rast | 151 + .../test_data/parser/inline/ok/0066_match_arm.rs | 9 + .../parser/inline/ok/0067_crate_path.rast | 15 + .../test_data/parser/inline/ok/0067_crate_path.rs | 1 + .../parser/inline/ok/0068_union_items.rast | 46 + .../test_data/parser/inline/ok/0068_union_items.rs | 5 + .../inline/ok/0069_use_tree_list_after_path.rast | 37 + .../inline/ok/0069_use_tree_list_after_path.rs | 2 + .../inline/ok/0070_stmt_bin_expr_ambiguity.rast | 50 + .../inline/ok/0070_stmt_bin_expr_ambiguity.rs | 4 + .../parser/inline/ok/0071_match_expr.rast | 93 + .../test_data/parser/inline/ok/0071_match_expr.rs | 6 + .../parser/inline/ok/0072_return_expr.rast | 28 + .../test_data/parser/inline/ok/0072_return_expr.rs | 4 + .../inline/ok/0073_type_item_type_params.rast | 20 + .../parser/inline/ok/0073_type_item_type_params.rs | 1 + .../ok/0074_stmt_postfix_expr_ambiguity.rast | 59 + .../inline/ok/0074_stmt_postfix_expr_ambiguity.rs | 7 + .../test_data/parser/inline/ok/0075_block.rast | 86 + .../test_data/parser/inline/ok/0075_block.rs | 4 + .../inline/ok/0076_function_where_clause.rast | 39 + .../parser/inline/ok/0076_function_where_clause.rs | 1 + .../test_data/parser/inline/ok/0077_try_expr.rast | 25 + .../test_data/parser/inline/ok/0077_try_expr.rs | 3 + .../test_data/parser/inline/ok/0078_type_item.rast | 16 + .../test_data/parser/inline/ok/0078_type_item.rs | 1 + .../test_data/parser/inline/ok/0079_impl_def.rast | 14 + .../test_data/parser/inline/ok/0079_impl_def.rs | 1 + .../parser/inline/ok/0080_postfix_range.rast | 95 + .../parser/inline/ok/0080_postfix_range.rs | 5 + .../test_data/parser/inline/ok/0081_for_type.rast | 112 + .../test_data/parser/inline/ok/0081_for_type.rs | 3 + .../test_data/parser/inline/ok/0082_ref_expr.rast | 138 + .../test_data/parser/inline/ok/0082_ref_expr.rs | 10 + .../parser/inline/ok/0083_struct_items.rast | 87 + .../parser/inline/ok/0083_struct_items.rs | 8 + .../parser/inline/ok/0084_paren_type.rast | 19 + .../test_data/parser/inline/ok/0084_paren_type.rs | 1 + .../parser/inline/ok/0085_expr_literals.rast | 135 + .../parser/inline/ok/0085_expr_literals.rs | 12 + .../parser/inline/ok/0086_function_ret_type.rast | 34 + .../parser/inline/ok/0086_function_ret_type.rs | 2 + .../parser/inline/ok/0088_break_ambiguity.rast | 65 + .../parser/inline/ok/0088_break_ambiguity.rs | 6 + .../parser/inline/ok/0090_type_param_default.rast | 22 + .../parser/inline/ok/0090_type_param_default.rs | 1 + .../inline/ok/0092_fn_pointer_type_with_ret.rast | 23 + .../inline/ok/0092_fn_pointer_type_with_ret.rs | 1 + .../parser/inline/ok/0093_index_expr.rast | 33 + .../test_data/parser/inline/ok/0093_index_expr.rs | 3 + .../parser/inline/ok/0095_placeholder_pat.rast | 28 + .../parser/inline/ok/0095_placeholder_pat.rs | 1 + .../parser/inline/ok/0096_no_semi_after_block.rast | 123 + .../parser/inline/ok/0096_no_semi_after_block.rs | 13 + .../parser/inline/ok/0099_param_list.rast | 99 + .../test_data/parser/inline/ok/0099_param_list.rs | 4 + .../test_data/parser/inline/ok/0100_for_expr.rast | 34 + .../test_data/parser/inline/ok/0100_for_expr.rs | 3 + .../inline/ok/0102_record_field_pat_list.rast | 132 + .../parser/inline/ok/0102_record_field_pat_list.rs | 6 + .../parser/inline/ok/0103_array_expr.rast | 54 + .../test_data/parser/inline/ok/0103_array_expr.rs | 6 + .../parser/inline/ok/0104_path_fn_trait_args.rast | 41 + .../parser/inline/ok/0104_path_fn_trait_args.rs | 1 + .../parser/inline/ok/0106_lambda_expr.rast | 135 + .../test_data/parser/inline/ok/0106_lambda_expr.rs | 9 + .../parser/inline/ok/0107_method_call_expr.rast | 62 + .../parser/inline/ok/0107_method_call_expr.rs | 4 + .../parser/inline/ok/0108_tuple_expr.rast | 38 + .../test_data/parser/inline/ok/0108_tuple_expr.rs | 5 + .../test_data/parser/inline/ok/0109_label.rast | 64 + .../test_data/parser/inline/ok/0109_label.rs | 5 + .../test_data/parser/inline/ok/0110_use_path.rast | 38 + .../test_data/parser/inline/ok/0110_use_path.rs | 3 + .../test_data/parser/inline/ok/0111_tuple_pat.rast | 89 + .../test_data/parser/inline/ok/0111_tuple_pat.rs | 6 + .../test_data/parser/inline/ok/0112_bind_pat.rast | 127 + .../test_data/parser/inline/ok/0112_bind_pat.rs | 8 + .../parser/inline/ok/0113_nocontentexpr.rast | 55 + .../parser/inline/ok/0113_nocontentexpr.rs | 3 + .../parser/inline/ok/0114_tuple_struct_where.rast | 64 + .../parser/inline/ok/0114_tuple_struct_where.rs | 2 + .../parser/inline/ok/0115_tuple_field_attrs.rast | 41 + .../parser/inline/ok/0115_tuple_field_attrs.rs | 4 + .../parser/inline/ok/0117_macro_call_type.rast | 43 + .../parser/inline/ok/0117_macro_call_type.rs | 2 + .../inline/ok/0118_impl_inner_attributes.rast | 40 + .../parser/inline/ok/0118_impl_inner_attributes.rs | 5 + .../parser/inline/ok/0118_match_guard.rast | 47 + .../test_data/parser/inline/ok/0118_match_guard.rs | 5 + .../inline/ok/0120_match_arms_inner_attribute.rast | 80 + .../inline/ok/0120_match_arms_inner_attribute.rs | 8 + .../ok/0121_match_arms_outer_attributes.rast | 145 + .../inline/ok/0121_match_arms_outer_attributes.rs | 12 + .../ok/0122_generic_lifetime_type_attribute.rast | 65 + .../ok/0122_generic_lifetime_type_attribute.rs | 2 + .../parser/inline/ok/0123_param_list_vararg.rast | 50 + .../parser/inline/ok/0123_param_list_vararg.rs | 1 + .../parser/inline/ok/0125_crate_keyword_path.rast | 31 + .../parser/inline/ok/0125_crate_keyword_path.rs | 1 + .../ok/0125_record_literal_field_with_attr.rast | 47 + .../ok/0125_record_literal_field_with_attr.rs | 3 + .../parser/inline/ok/0126_attr_on_expr_stmt.rast | 97 + .../parser/inline/ok/0126_attr_on_expr_stmt.rs | 6 + .../inline/ok/0127_attr_on_last_expr_in_block.rast | 57 + .../inline/ok/0127_attr_on_last_expr_in_block.rs | 4 + .../test_data/parser/inline/ok/0129_marco_pat.rast | 36 + .../test_data/parser/inline/ok/0129_marco_pat.rs | 3 + .../test_data/parser/inline/ok/0130_let_stmt.rast | 126 + .../test_data/parser/inline/ok/0130_let_stmt.rs | 9 + .../parser/inline/ok/0130_try_block_expr.rast | 31 + .../parser/inline/ok/0130_try_block_expr.rs | 3 + .../parser/inline/ok/0131_existential_type.rast | 31 + .../parser/inline/ok/0131_existential_type.rs | 1 + .../test_data/parser/inline/ok/0132_box_expr.rast | 89 + .../test_data/parser/inline/ok/0132_box_expr.rs | 5 + .../inline/ok/0134_nocontentexpr_after_item.rast | 62 + .../inline/ok/0134_nocontentexpr_after_item.rs | 8 + .../parser/inline/ok/0137_await_expr.rast | 69 + .../test_data/parser/inline/ok/0137_await_expr.rs | 5 + .../inline/ok/0138_associated_type_bounds.rast | 55 + .../inline/ok/0138_associated_type_bounds.rs | 1 + .../inline/ok/0138_expression_after_block.rast | 64 + .../inline/ok/0138_expression_after_block.rs | 4 + .../inline/ok/0138_self_param_outer_attr.rast | 25 + .../parser/inline/ok/0138_self_param_outer_attr.rs | 1 + .../parser/inline/ok/0139_param_outer_arg.rast | 34 + .../parser/inline/ok/0139_param_outer_arg.rs | 1 + .../parser/inline/ok/0142_for_range_from.rast | 40 + .../parser/inline/ok/0142_for_range_from.rs | 5 + .../test_data/parser/inline/ok/0143_box_pat.rast | 110 + .../test_data/parser/inline/ok/0143_box_pat.rs | 5 + .../parser/inline/ok/0144_dot_dot_pat.rast | 455 +++ .../test_data/parser/inline/ok/0144_dot_dot_pat.rs | 25 + .../parser/inline/ok/0145_record_field_pat.rast | 75 + .../parser/inline/ok/0145_record_field_pat.rs | 4 + .../parser/inline/ok/0146_as_precedence.rast | 42 + .../parser/inline/ok/0146_as_precedence.rs | 3 + .../parser/inline/ok/0147_const_param.rast | 23 + .../test_data/parser/inline/ok/0147_const_param.rs | 1 + .../test_data/parser/inline/ok/0147_macro_def.rast | 45 + .../test_data/parser/inline/ok/0147_macro_def.rs | 2 + .../parser/inline/ok/0148_pub_macro_def.rast | 21 + .../parser/inline/ok/0148_pub_macro_def.rs | 1 + .../parser/inline/ok/0150_array_attrs.rast | 47 + .../test_data/parser/inline/ok/0150_array_attrs.rs | 1 + .../parser/inline/ok/0150_impl_type_params.rast | 38 + .../parser/inline/ok/0150_impl_type_params.rs | 1 + .../syntax/test_data/parser/inline/ok/0151_fn.rast | 14 + .../syntax/test_data/parser/inline/ok/0151_fn.rs | 1 + .../parser/inline/ok/0151_trait_alias.rast | 128 + .../test_data/parser/inline/ok/0151_trait_alias.rs | 3 + .../parser/inline/ok/0152_arg_with_attr.rast | 36 + .../parser/inline/ok/0152_arg_with_attr.rs | 3 + .../test_data/parser/inline/ok/0152_impl.rast | 22 + .../syntax/test_data/parser/inline/ok/0152_impl.rs | 1 + .../test_data/parser/inline/ok/0153_trait.rast | 11 + .../test_data/parser/inline/ok/0153_trait.rs | 1 + .../ok/0154_fn_pointer_param_ident_path.rast | 58 + .../inline/ok/0154_fn_pointer_param_ident_path.rs | 2 + .../parser/inline/ok/0155_closure_params.rast | 69 + .../parser/inline/ok/0155_closure_params.rs | 3 + .../parser/inline/ok/0156_fn_def_param.rast | 43 + .../parser/inline/ok/0156_fn_def_param.rs | 1 + .../parser/inline/ok/0156_or_pattern.rast | 111 + .../test_data/parser/inline/ok/0156_or_pattern.rs | 8 + .../inline/ok/0157_fn_pointer_unnamed_arg.rast | 26 + .../inline/ok/0157_fn_pointer_unnamed_arg.rs | 1 + .../inline/ok/0157_variant_discriminant.rast | 30 + .../parser/inline/ok/0157_variant_discriminant.rs | 1 + .../inline/ok/0158_binop_resets_statementness.rast | 36 + .../inline/ok/0158_binop_resets_statementness.rs | 3 + .../parser/inline/ok/0158_lambda_ret_block.rast | 43 + .../parser/inline/ok/0158_lambda_ret_block.rs | 1 + .../parser/inline/ok/0159_try_macro_fallback.rast | 34 + .../parser/inline/ok/0159_try_macro_fallback.rs | 1 + .../parser/inline/ok/0160_try_macro_rules.rast | 27 + .../parser/inline/ok/0160_try_macro_rules.rs | 1 + .../parser/inline/ok/0161_labeled_block.rast | 26 + .../parser/inline/ok/0161_labeled_block.rs | 1 + .../parser/inline/ok/0162_unsafe_block.rast | 23 + .../parser/inline/ok/0162_unsafe_block.rs | 1 + .../parser/inline/ok/0163_default_unsafe_item.rast | 44 + .../parser/inline/ok/0163_default_unsafe_item.rs | 3 + .../parser/inline/ok/0164_default_item.rast | 24 + .../parser/inline/ok/0164_default_item.rs | 1 + .../inline/ok/0164_type_path_in_pattern.rast | 38 + .../parser/inline/ok/0164_type_path_in_pattern.rs | 1 + crates/syntax/test_data/parser/ok/0000_empty.rast | 1 + crates/syntax/test_data/parser/ok/0000_empty.rs | 0 .../test_data/parser/ok/0001_struct_item.rast | 39 + .../syntax/test_data/parser/ok/0001_struct_item.rs | 3 + .../parser/ok/0002_struct_item_field.rast | 22 + .../test_data/parser/ok/0002_struct_item_field.rs | 3 + .../test_data/parser/ok/0004_file_shebang.rast | 2 + .../test_data/parser/ok/0004_file_shebang.rs | 1 + .../syntax/test_data/parser/ok/0005_fn_item.rast | 15 + crates/syntax/test_data/parser/ok/0005_fn_item.rs | 2 + .../test_data/parser/ok/0006_inner_attributes.rast | 184 + .../test_data/parser/ok/0006_inner_attributes.rs | 10 + .../test_data/parser/ok/0007_extern_crate.rast | 39 + .../test_data/parser/ok/0007_extern_crate.rs | 3 + .../syntax/test_data/parser/ok/0008_mod_item.rast | 92 + crates/syntax/test_data/parser/ok/0008_mod_item.rs | 17 + .../syntax/test_data/parser/ok/0009_use_item.rast | 21 + crates/syntax/test_data/parser/ok/0009_use_item.rs | 2 + .../parser/ok/0010_use_path_segments.rast | 42 + .../test_data/parser/ok/0010_use_path_segments.rs | 2 + .../test_data/parser/ok/0011_outer_attribute.rast | 57 + .../test_data/parser/ok/0011_outer_attribute.rs | 6 + .../test_data/parser/ok/0012_visibility.rast | 102 + .../syntax/test_data/parser/ok/0012_visibility.rs | 5 + .../parser/ok/0013_use_path_self_super.rast | 33 + .../parser/ok/0013_use_path_self_super.rs | 2 + .../syntax/test_data/parser/ok/0014_use_tree.rast | 95 + crates/syntax/test_data/parser/ok/0014_use_tree.rs | 7 + .../syntax/test_data/parser/ok/0015_use_tree.rast | 65 + crates/syntax/test_data/parser/ok/0015_use_tree.rs | 2 + .../test_data/parser/ok/0016_struct_flavors.rast | 93 + .../test_data/parser/ok/0016_struct_flavors.rs | 10 + .../parser/ok/0017_attr_trailing_comma.rast | 28 + .../parser/ok/0017_attr_trailing_comma.rs | 2 + .../parser/ok/0018_struct_type_params.rast | 257 ++ .../test_data/parser/ok/0018_struct_type_params.rs | 17 + crates/syntax/test_data/parser/ok/0019_enums.rast | 155 + crates/syntax/test_data/parser/ok/0019_enums.rs | 25 + .../parser/ok/0020_type_param_bounds.rast | 268 ++ .../test_data/parser/ok/0020_type_param_bounds.rs | 10 + .../parser/ok/0022_empty_extern_block.rast | 21 + .../test_data/parser/ok/0022_empty_extern_block.rs | 5 + .../test_data/parser/ok/0023_static_items.rast | 41 + .../test_data/parser/ok/0023_static_items.rs | 2 + .../test_data/parser/ok/0024_const_item.rast | 59 + .../syntax/test_data/parser/ok/0024_const_item.rs | 3 + .../parser/ok/0025_extern_fn_in_block.rast | 31 + .../test_data/parser/ok/0025_extern_fn_in_block.rs | 3 + .../parser/ok/0026_const_fn_in_block.rast | 30 + .../test_data/parser/ok/0026_const_fn_in_block.rs | 3 + .../parser/ok/0027_unsafe_fn_in_block.rast | 41 + .../test_data/parser/ok/0027_unsafe_fn_in_block.rs | 4 + .../parser/ok/0028_operator_binding_power.rast | 185 + .../parser/ok/0028_operator_binding_power.rs | 14 + .../test_data/parser/ok/0029_range_forms.rast | 151 + .../syntax/test_data/parser/ok/0029_range_forms.rs | 11 + .../test_data/parser/ok/0030_string_suffixes.rast | 63 + .../test_data/parser/ok/0030_string_suffixes.rs | 6 + crates/syntax/test_data/parser/ok/0030_traits.rast | 61 + crates/syntax/test_data/parser/ok/0030_traits.rs | 7 + crates/syntax/test_data/parser/ok/0031_extern.rast | 973 +++++ crates/syntax/test_data/parser/ok/0031_extern.rs | 29 + .../syntax/test_data/parser/ok/0032_where_for.rast | 90 + .../syntax/test_data/parser/ok/0032_where_for.rs | 4 + .../test_data/parser/ok/0033_label_break.rast | 215 ++ .../syntax/test_data/parser/ok/0033_label_break.rs | 28 + .../parser/ok/0034_crate_path_in_call.rast | 41 + .../test_data/parser/ok/0034_crate_path_in_call.rs | 3 + .../test_data/parser/ok/0035_weird_exprs.rast | 2291 +++++++++++ .../syntax/test_data/parser/ok/0035_weird_exprs.rs | 154 + .../test_data/parser/ok/0036_fully_qualified.rast | 92 + .../test_data/parser/ok/0036_fully_qualified.rs | 8 + crates/syntax/test_data/parser/ok/0037_mod.rast | 16 + crates/syntax/test_data/parser/ok/0037_mod.rs | 5 + .../test_data/parser/ok/0038_where_pred_type.rast | 42 + .../test_data/parser/ok/0038_where_pred_type.rs | 1 + .../test_data/parser/ok/0039_raw_fn_item.rast | 15 + .../syntax/test_data/parser/ok/0039_raw_fn_item.rs | 2 + .../parser/ok/0040_raw_struct_item_field.rast | 22 + .../parser/ok/0040_raw_struct_item_field.rs | 3 + .../test_data/parser/ok/0041_raw_keywords.rast | 49 + .../test_data/parser/ok/0041_raw_keywords.rs | 1 + .../test_data/parser/ok/0042_ufcs_call_list.rast | 123 + .../test_data/parser/ok/0042_ufcs_call_list.rs | 15 + .../parser/ok/0043_complex_assignment.rast | 109 + .../test_data/parser/ok/0043_complex_assignment.rs | 8 + .../syntax/test_data/parser/ok/0044_let_attrs.rast | 75 + .../syntax/test_data/parser/ok/0044_let_attrs.rs | 5 + .../parser/ok/0045_block_inner_attrs.rast | 177 + .../test_data/parser/ok/0045_block_inner_attrs.rs | 20 + .../parser/ok/0046_extern_inner_attributes.rast | 28 + .../parser/ok/0046_extern_inner_attributes.rs | 4 + .../parser/ok/0047_minus_in_inner_pattern.rast | 320 ++ .../parser/ok/0047_minus_in_inner_pattern.rs | 27 + .../parser/ok/0048_compound_assignment.rast | 200 + .../parser/ok/0048_compound_assignment.rs | 17 + .../test_data/parser/ok/0049_async_block.rast | 35 + .../syntax/test_data/parser/ok/0049_async_block.rs | 5 + .../parser/ok/0050_async_block_as_argument.rast | 90 + .../parser/ok/0050_async_block_as_argument.rs | 5 + .../test_data/parser/ok/0051_parameter_attrs.rast | 508 +++ .../test_data/parser/ok/0051_parameter_attrs.rs | 21 + .../test_data/parser/ok/0052_for_range_block.rast | 78 + .../test_data/parser/ok/0052_for_range_block.rs | 5 + .../ok/0053_outer_attribute_on_macro_rules.rast | 39 + .../ok/0053_outer_attribute_on_macro_rules.rs | 5 + .../parser/ok/0054_qual_path_in_type_arg.rast | 123 + .../parser/ok/0054_qual_path_in_type_arg.rs | 5 + .../test_data/parser/ok/0055_dot_dot_dot.rast | 49 + .../syntax/test_data/parser/ok/0055_dot_dot_dot.rs | 5 + .../test_data/parser/ok/0056_neq_in_type.rast | 64 + .../syntax/test_data/parser/ok/0056_neq_in_type.rs | 3 + .../test_data/parser/ok/0057_loop_in_call.rast | 56 + .../test_data/parser/ok/0057_loop_in_call.rs | 5 + .../parser/ok/0058_unary_expr_precedence.rast | 96 + .../parser/ok/0058_unary_expr_precedence.rs | 7 + .../test_data/parser/ok/0059_loops_in_parens.rast | 97 + .../test_data/parser/ok/0059_loops_in_parens.rs | 5 + .../syntax/test_data/parser/ok/0060_as_range.rast | 55 + crates/syntax/test_data/parser/ok/0060_as_range.rs | 4 + .../test_data/parser/ok/0061_match_full_range.rast | 26 + .../test_data/parser/ok/0061_match_full_range.rs | 4 + .../syntax/test_data/parser/ok/0062_macro_2.0.rast | 175 + .../syntax/test_data/parser/ok/0062_macro_2.0.rs | 15 + .../parser/ok/0063_trait_fn_patterns.rast | 194 + .../test_data/parser/ok/0063_trait_fn_patterns.rs | 7 + .../test_data/parser/ok/0063_variadic_fun.rast | 133 + .../test_data/parser/ok/0063_variadic_fun.rs | 5 + .../test_data/parser/ok/0064_impl_fn_params.rast | 162 + .../test_data/parser/ok/0064_impl_fn_params.rs | 6 + .../test_data/parser/ok/0065_comment_newline.rast | 16 + .../test_data/parser/ok/0065_comment_newline.rs | 3 + .../parser/ok/0065_plus_after_fn_trait_bound.rast | 60 + .../parser/ok/0065_plus_after_fn_trait_bound.rs | 1 + .../test_data/parser/ok/0066_default_modifier.rast | 218 ++ .../test_data/parser/ok/0066_default_modifier.rs | 16 + .../test_data/parser/ok/0067_where_for_pred.rast | 392 ++ .../test_data/parser/ok/0067_where_for_pred.rs | 30 + .../test_data/parser/ok/0068_item_modifiers.rast | 218 ++ .../test_data/parser/ok/0068_item_modifiers.rs | 16 + .../syntax/test_data/reparse/fuzz-failures/0000.rs | 6 + .../syntax/test_data/reparse/fuzz-failures/0001.rs | 4 + .../syntax/test_data/reparse/fuzz-failures/0002.rs | 4 + .../syntax/test_data/reparse/fuzz-failures/0003.rs | Bin 0 -> 8 bytes .../syntax/test_data/reparse/fuzz-failures/0004.rs | 4 + .../syntax/test_data/reparse/fuzz-failures/0005.rs | 7 + docs/dev/README.md | 2 +- docs/dev/style.md | 4 +- xtask/src/codegen.rs | 8 +- xtask/src/codegen/gen_syntax.rs | 2 +- xtask/src/lib.rs | 2 +- xtask/tests/tidy.rs | 2 +- 1726 files changed, 40548 insertions(+), 40558 deletions(-) delete mode 100644 crates/ra_syntax/Cargo.toml delete mode 100644 crates/ra_syntax/fuzz/.gitignore delete mode 100644 crates/ra_syntax/fuzz/Cargo.toml delete mode 100644 crates/ra_syntax/fuzz/fuzz_targets/parser.rs delete mode 100644 crates/ra_syntax/fuzz/fuzz_targets/reparse.rs delete mode 100644 crates/ra_syntax/src/algo.rs delete mode 100644 crates/ra_syntax/src/ast.rs delete mode 100644 crates/ra_syntax/src/ast/edit.rs delete mode 100644 crates/ra_syntax/src/ast/expr_ext.rs delete mode 100644 crates/ra_syntax/src/ast/generated.rs delete mode 100644 crates/ra_syntax/src/ast/generated/nodes.rs delete mode 100644 crates/ra_syntax/src/ast/generated/tokens.rs delete mode 100644 crates/ra_syntax/src/ast/make.rs delete mode 100644 crates/ra_syntax/src/ast/node_ext.rs delete mode 100644 crates/ra_syntax/src/ast/token_ext.rs delete mode 100644 crates/ra_syntax/src/ast/traits.rs delete mode 100644 crates/ra_syntax/src/fuzz.rs delete mode 100644 crates/ra_syntax/src/lib.rs delete mode 100644 crates/ra_syntax/src/parsing.rs delete mode 100644 crates/ra_syntax/src/parsing/lexer.rs delete mode 100644 crates/ra_syntax/src/parsing/reparsing.rs delete mode 100644 crates/ra_syntax/src/parsing/text_token_source.rs delete mode 100644 crates/ra_syntax/src/parsing/text_tree_sink.rs delete mode 100644 crates/ra_syntax/src/ptr.rs delete mode 100644 crates/ra_syntax/src/syntax_error.rs delete mode 100644 crates/ra_syntax/src/syntax_node.rs delete mode 100644 crates/ra_syntax/src/tests.rs delete mode 100644 crates/ra_syntax/src/validation.rs delete mode 100644 crates/ra_syntax/src/validation/block.rs delete mode 100644 crates/ra_syntax/test_data/accidentally_quadratic delete mode 100644 crates/ra_syntax/test_data/lexer/err/0001_unclosed_char_at_eof.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0001_unclosed_char_at_eof.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0005_unclosed_char_with_space.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0005_unclosed_char_with_space.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0006_unclosed_char_with_slash.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0006_unclosed_char_with_slash.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0013_unclosed_byte_with_space.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0013_unclosed_byte_with_space.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0017_unclosed_string_at_eof.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0017_unclosed_string_at_eof.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0018_unclosed_string_with_ferris.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0018_unclosed_string_with_ferris.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0019_unclosed_string_with_ascii_escape.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0019_unclosed_string_with_ascii_escape.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0020_unclosed_string_with_unicode_escape.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0020_unclosed_string_with_unicode_escape.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0021_unclosed_string_with_space.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0021_unclosed_string_with_space.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0022_unclosed_string_with_slash.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0022_unclosed_string_with_slash.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0023_unclosed_string_with_slash_n.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0023_unclosed_string_with_slash_n.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0024_unclosed_string_with_slash_double_quote.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0024_unclosed_string_with_slash_double_quote.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0025_unclosed_byte_string_at_eof.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0025_unclosed_byte_string_at_eof.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0026_unclosed_byte_string_with_ferris.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0026_unclosed_byte_string_with_ferris.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0027_unclosed_byte_string_with_ascii_escape.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0027_unclosed_byte_string_with_ascii_escape.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0028_unclosed_byte_string_with_unicode_escape.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0028_unclosed_byte_string_with_unicode_escape.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0029_unclosed_byte_string_with_space.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0029_unclosed_byte_string_with_space.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0030_unclosed_byte_string_with_slash.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0030_unclosed_byte_string_with_slash.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0031_unclosed_byte_string_with_slash_n.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0031_unclosed_byte_string_with_slash_n.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0032_unclosed_byte_string_with_slash_double_quote.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0032_unclosed_byte_string_with_slash_double_quote.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0033_unclosed_raw_string_at_eof.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0033_unclosed_raw_string_at_eof.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0034_unclosed_raw_string_with_ferris.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0034_unclosed_raw_string_with_ferris.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0035_unclosed_raw_string_with_ascii_escape.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0035_unclosed_raw_string_with_ascii_escape.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0036_unclosed_raw_string_with_unicode_escape.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0036_unclosed_raw_string_with_unicode_escape.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0037_unclosed_raw_string_with_space.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0037_unclosed_raw_string_with_space.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0038_unclosed_raw_string_with_slash.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0038_unclosed_raw_string_with_slash.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0039_unclosed_raw_string_with_slash_n.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0039_unclosed_raw_string_with_slash_n.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0040_unclosed_raw_byte_string_at_eof.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0040_unclosed_raw_byte_string_at_eof.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0041_unclosed_raw_byte_string_with_ferris.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0041_unclosed_raw_byte_string_with_ferris.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0042_unclosed_raw_byte_string_with_ascii_escape.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0042_unclosed_raw_byte_string_with_ascii_escape.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0043_unclosed_raw_byte_string_with_unicode_escape.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0043_unclosed_raw_byte_string_with_unicode_escape.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0044_unclosed_raw_byte_string_with_space.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0044_unclosed_raw_byte_string_with_space.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0045_unclosed_raw_byte_string_with_slash.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0045_unclosed_raw_byte_string_with_slash.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0046_unclosed_raw_byte_string_with_slash_n.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0046_unclosed_raw_byte_string_with_slash_n.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0047_unstarted_raw_string_at_eof.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0047_unstarted_raw_string_at_eof.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0048_unstarted_raw_byte_string_at_eof.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0048_unstarted_raw_byte_string_at_eof.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0049_unstarted_raw_string_with_ascii.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0049_unstarted_raw_string_with_ascii.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0050_unstarted_raw_byte_string_with_ascii.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0050_unstarted_raw_byte_string_with_ascii.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0051_unclosed_block_comment_at_eof.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0051_unclosed_block_comment_at_eof.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0052_unclosed_block_comment_with_content.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0052_unclosed_block_comment_with_content.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0053_unclosed_nested_block_comment_entirely.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0053_unclosed_nested_block_comment_entirely.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0054_unclosed_nested_block_comment_partially.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0054_unclosed_nested_block_comment_partially.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0055_empty_int.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0055_empty_int.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0056_empty_exponent.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0056_empty_exponent.txt delete mode 100644 crates/ra_syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.rs delete mode 100644 crates/ra_syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.txt delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0001_hello.rs delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0001_hello.txt delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0002_whitespace.rs delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0002_whitespace.txt delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0003_ident.rs delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0003_ident.txt delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0004_numbers.rs delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0004_numbers.txt delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0005_symbols.rs delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0005_symbols.txt delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0006_chars.rs delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0006_chars.txt delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0007_lifetimes.rs delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0007_lifetimes.txt delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0008_byte_strings.rs delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0008_byte_strings.txt delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0009_strings.rs delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0009_strings.txt delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0010_single_line_comments.rs delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0010_single_line_comments.txt delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0011_keywords.rs delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0011_keywords.txt delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0012_block_comment.rs delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0012_block_comment.txt delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0013_raw_strings.rs delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0013_raw_strings.txt delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0014_raw_ident.rs delete mode 100644 crates/ra_syntax/test_data/lexer/ok/0014_raw_ident.txt delete mode 100644 crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0002_duplicate_shebang.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0002_duplicate_shebang.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0005_attribute_recover.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0005_attribute_recover.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0011_extern_struct.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0011_extern_struct.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0012_broken_lambda.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0013_invalid_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0013_invalid_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0016_missing_semi.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0016_missing_semi.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0019_let_recover.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0019_let_recover.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0020_fn_recover.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0020_fn_recover.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0025_nope.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0025_nope.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0026_imp_recovery.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0026_imp_recovery.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0029_field_completion.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0029_field_completion.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0035_use_recover.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0035_use_recover.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0036_partial_use.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0036_partial_use.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0038_endless_inclusive_range.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0038_endless_inclusive_range.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0040_illegal_crate_kw_location.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0040_illegal_crate_kw_location.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0041_illegal_super_keyword_location.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0041_illegal_super_keyword_location.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0042_illegal_self_keyword_location.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0042_illegal_self_keyword_location.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0043_weird_blocks.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0043_weird_blocks.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0045_item_modifiers.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0045_item_modifiers.rs delete mode 100644 crates/ra_syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rast delete mode 100644 crates/ra_syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rs delete mode 100644 crates/ra_syntax/test_data/parser/fragments/expr/ok/0000_add.rast delete mode 100644 crates/ra_syntax/test_data/parser/fragments/expr/ok/0000_add.rs delete mode 100644 crates/ra_syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rast delete mode 100644 crates/ra_syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rs delete mode 100644 crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rast delete mode 100644 crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rs delete mode 100644 crates/ra_syntax/test_data/parser/fragments/path/err/0000_reserved_word.rast delete mode 100644 crates/ra_syntax/test_data/parser/fragments/path/err/0000_reserved_word.rs delete mode 100644 crates/ra_syntax/test_data/parser/fragments/path/err/0001_expression.rast delete mode 100644 crates/ra_syntax/test_data/parser/fragments/path/err/0001_expression.rs delete mode 100644 crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rast delete mode 100644 crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rs delete mode 100644 crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rast delete mode 100644 crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rs delete mode 100644 crates/ra_syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rast delete mode 100644 crates/ra_syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rs delete mode 100644 crates/ra_syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rast delete mode 100644 crates/ra_syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rs delete mode 100644 crates/ra_syntax/test_data/parser/fragments/pattern/ok/0000_enum.rast delete mode 100644 crates/ra_syntax/test_data/parser/fragments/pattern/ok/0000_enum.rs delete mode 100644 crates/ra_syntax/test_data/parser/fragments/type/err/0000_missing_close.rast delete mode 100644 crates/ra_syntax/test_data/parser/fragments/type/err/0000_missing_close.rs delete mode 100644 crates/ra_syntax/test_data/parser/fragments/type/ok/0000_result.rast delete mode 100644 crates/ra_syntax/test_data/parser/fragments/type/ok/0000_result.rs delete mode 100644 crates/ra_syntax/test_data/parser/fuzz-failures/0000.rs delete mode 100644 crates/ra_syntax/test_data/parser/fuzz-failures/0001.rs delete mode 100644 crates/ra_syntax/test_data/parser/fuzz-failures/0002.rs delete mode 100644 crates/ra_syntax/test_data/parser/fuzz-failures/0003.rs delete mode 100644 crates/ra_syntax/test_data/parser/fuzz-failures/0004.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0002_use_tree_list.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0002_use_tree_list.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0010_extern_block.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0010_extern_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0020_use_star.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0020_use_star.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0041_trait_item.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0041_trait_item.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0043_use_alias.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0043_use_alias.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0060_extern_crate.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0060_extern_crate.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0067_crate_path.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0067_crate_path.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0075_block.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0075_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0109_label.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0109_label.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0110_use_path.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0110_use_path.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0146_as_precedence.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0146_as_precedence.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0147_const_param.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0147_const_param.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0147_macro_def.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0147_macro_def.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0148_pub_macro_def.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0148_pub_macro_def.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0150_array_attrs.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0150_array_attrs.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0150_impl_type_params.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0150_impl_type_params.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0151_trait_alias.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0151_trait_alias.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0152_arg_with_attr.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0152_arg_with_attr.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0156_or_pattern.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0156_or_pattern.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0157_variant_discriminant.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0157_variant_discriminant.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0160_try_macro_rules.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0160_try_macro_rules.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0161_labeled_block.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0161_labeled_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0162_unsafe_block.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0162_unsafe_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_item.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_item.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0164_default_item.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0164_default_item.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0000_empty.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0000_empty.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0001_struct_item.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0001_struct_item.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0004_file_shebang.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0004_file_shebang.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0005_fn_item.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0005_fn_item.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0006_inner_attributes.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0006_inner_attributes.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0007_extern_crate.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0007_extern_crate.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0008_mod_item.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0009_use_item.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0009_use_item.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0010_use_path_segments.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0010_use_path_segments.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0012_visibility.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0012_visibility.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0013_use_path_self_super.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0013_use_path_self_super.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0014_use_tree.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0014_use_tree.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0015_use_tree.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0015_use_tree.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0019_enums.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0019_enums.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0020_type_param_bounds.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0020_type_param_bounds.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0022_empty_extern_block.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0022_empty_extern_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0023_static_items.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0023_static_items.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0024_const_item.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0024_const_item.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0025_extern_fn_in_block.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0025_extern_fn_in_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0026_const_fn_in_block.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0026_const_fn_in_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0028_operator_binding_power.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0028_operator_binding_power.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0029_range_forms.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0029_range_forms.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0030_string_suffixes.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0030_string_suffixes.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0030_traits.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0030_traits.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0031_extern.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0031_extern.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0032_where_for.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0032_where_for.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0033_label_break.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0033_label_break.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0034_crate_path_in_call.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0034_crate_path_in_call.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0036_fully_qualified.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0036_fully_qualified.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0037_mod.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0037_mod.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0038_where_pred_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0038_where_pred_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0039_raw_fn_item.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0039_raw_fn_item.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0041_raw_keywords.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0041_raw_keywords.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0046_extern_inner_attributes.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0046_extern_inner_attributes.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0048_compound_assignment.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0048_compound_assignment.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0049_async_block.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0049_async_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0050_async_block_as_argument.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0050_async_block_as_argument.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0052_for_range_block.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0052_for_range_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0053_outer_attribute_on_macro_rules.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0053_outer_attribute_on_macro_rules.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0056_neq_in_type.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0056_neq_in_type.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0057_loop_in_call.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0057_loop_in_call.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0058_unary_expr_precedence.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0058_unary_expr_precedence.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0060_as_range.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0060_as_range.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0061_match_full_range.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0061_match_full_range.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0062_macro_2.0.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0062_macro_2.0.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0063_variadic_fun.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0063_variadic_fun.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0065_comment_newline.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0065_comment_newline.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0065_plus_after_fn_trait_bound.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0065_plus_after_fn_trait_bound.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0066_default_modifier.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0066_default_modifier.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0067_where_for_pred.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0067_where_for_pred.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rs delete mode 100644 crates/ra_syntax/test_data/reparse/fuzz-failures/0000.rs delete mode 100644 crates/ra_syntax/test_data/reparse/fuzz-failures/0001.rs delete mode 100644 crates/ra_syntax/test_data/reparse/fuzz-failures/0002.rs delete mode 100644 crates/ra_syntax/test_data/reparse/fuzz-failures/0003.rs delete mode 100644 crates/ra_syntax/test_data/reparse/fuzz-failures/0004.rs delete mode 100644 crates/ra_syntax/test_data/reparse/fuzz-failures/0005.rs create mode 100644 crates/syntax/Cargo.toml create mode 100644 crates/syntax/fuzz/.gitignore create mode 100644 crates/syntax/fuzz/Cargo.toml create mode 100644 crates/syntax/fuzz/fuzz_targets/parser.rs create mode 100644 crates/syntax/fuzz/fuzz_targets/reparse.rs create mode 100644 crates/syntax/src/algo.rs create mode 100644 crates/syntax/src/ast.rs create mode 100644 crates/syntax/src/ast/edit.rs create mode 100644 crates/syntax/src/ast/expr_ext.rs create mode 100644 crates/syntax/src/ast/generated.rs create mode 100644 crates/syntax/src/ast/generated/nodes.rs create mode 100644 crates/syntax/src/ast/generated/tokens.rs create mode 100644 crates/syntax/src/ast/make.rs create mode 100644 crates/syntax/src/ast/node_ext.rs create mode 100644 crates/syntax/src/ast/token_ext.rs create mode 100644 crates/syntax/src/ast/traits.rs create mode 100644 crates/syntax/src/fuzz.rs create mode 100644 crates/syntax/src/lib.rs create mode 100644 crates/syntax/src/parsing.rs create mode 100644 crates/syntax/src/parsing/lexer.rs create mode 100644 crates/syntax/src/parsing/reparsing.rs create mode 100644 crates/syntax/src/parsing/text_token_source.rs create mode 100644 crates/syntax/src/parsing/text_tree_sink.rs create mode 100644 crates/syntax/src/ptr.rs create mode 100644 crates/syntax/src/syntax_error.rs create mode 100644 crates/syntax/src/syntax_node.rs create mode 100644 crates/syntax/src/tests.rs create mode 100644 crates/syntax/src/validation.rs create mode 100644 crates/syntax/src/validation/block.rs create mode 100644 crates/syntax/test_data/accidentally_quadratic create mode 100644 crates/syntax/test_data/lexer/err/0001_unclosed_char_at_eof.rs create mode 100644 crates/syntax/test_data/lexer/err/0001_unclosed_char_at_eof.txt create mode 100644 crates/syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.rs create mode 100644 crates/syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.txt create mode 100644 crates/syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.rs create mode 100644 crates/syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.txt create mode 100644 crates/syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.rs create mode 100644 crates/syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.txt create mode 100644 crates/syntax/test_data/lexer/err/0005_unclosed_char_with_space.rs create mode 100644 crates/syntax/test_data/lexer/err/0005_unclosed_char_with_space.txt create mode 100644 crates/syntax/test_data/lexer/err/0006_unclosed_char_with_slash.rs create mode 100644 crates/syntax/test_data/lexer/err/0006_unclosed_char_with_slash.txt create mode 100644 crates/syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.rs create mode 100644 crates/syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.txt create mode 100644 crates/syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.rs create mode 100644 crates/syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.txt create mode 100644 crates/syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.rs create mode 100644 crates/syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.txt create mode 100644 crates/syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.rs create mode 100644 crates/syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.txt create mode 100644 crates/syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.rs create mode 100644 crates/syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.txt create mode 100644 crates/syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.rs create mode 100644 crates/syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.txt create mode 100644 crates/syntax/test_data/lexer/err/0013_unclosed_byte_with_space.rs create mode 100644 crates/syntax/test_data/lexer/err/0013_unclosed_byte_with_space.txt create mode 100644 crates/syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.rs create mode 100644 crates/syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.txt create mode 100644 crates/syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.rs create mode 100644 crates/syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.txt create mode 100644 crates/syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.rs create mode 100644 crates/syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.txt create mode 100644 crates/syntax/test_data/lexer/err/0017_unclosed_string_at_eof.rs create mode 100644 crates/syntax/test_data/lexer/err/0017_unclosed_string_at_eof.txt create mode 100644 crates/syntax/test_data/lexer/err/0018_unclosed_string_with_ferris.rs create mode 100644 crates/syntax/test_data/lexer/err/0018_unclosed_string_with_ferris.txt create mode 100644 crates/syntax/test_data/lexer/err/0019_unclosed_string_with_ascii_escape.rs create mode 100644 crates/syntax/test_data/lexer/err/0019_unclosed_string_with_ascii_escape.txt create mode 100644 crates/syntax/test_data/lexer/err/0020_unclosed_string_with_unicode_escape.rs create mode 100644 crates/syntax/test_data/lexer/err/0020_unclosed_string_with_unicode_escape.txt create mode 100644 crates/syntax/test_data/lexer/err/0021_unclosed_string_with_space.rs create mode 100644 crates/syntax/test_data/lexer/err/0021_unclosed_string_with_space.txt create mode 100644 crates/syntax/test_data/lexer/err/0022_unclosed_string_with_slash.rs create mode 100644 crates/syntax/test_data/lexer/err/0022_unclosed_string_with_slash.txt create mode 100644 crates/syntax/test_data/lexer/err/0023_unclosed_string_with_slash_n.rs create mode 100644 crates/syntax/test_data/lexer/err/0023_unclosed_string_with_slash_n.txt create mode 100644 crates/syntax/test_data/lexer/err/0024_unclosed_string_with_slash_double_quote.rs create mode 100644 crates/syntax/test_data/lexer/err/0024_unclosed_string_with_slash_double_quote.txt create mode 100644 crates/syntax/test_data/lexer/err/0025_unclosed_byte_string_at_eof.rs create mode 100644 crates/syntax/test_data/lexer/err/0025_unclosed_byte_string_at_eof.txt create mode 100644 crates/syntax/test_data/lexer/err/0026_unclosed_byte_string_with_ferris.rs create mode 100644 crates/syntax/test_data/lexer/err/0026_unclosed_byte_string_with_ferris.txt create mode 100644 crates/syntax/test_data/lexer/err/0027_unclosed_byte_string_with_ascii_escape.rs create mode 100644 crates/syntax/test_data/lexer/err/0027_unclosed_byte_string_with_ascii_escape.txt create mode 100644 crates/syntax/test_data/lexer/err/0028_unclosed_byte_string_with_unicode_escape.rs create mode 100644 crates/syntax/test_data/lexer/err/0028_unclosed_byte_string_with_unicode_escape.txt create mode 100644 crates/syntax/test_data/lexer/err/0029_unclosed_byte_string_with_space.rs create mode 100644 crates/syntax/test_data/lexer/err/0029_unclosed_byte_string_with_space.txt create mode 100644 crates/syntax/test_data/lexer/err/0030_unclosed_byte_string_with_slash.rs create mode 100644 crates/syntax/test_data/lexer/err/0030_unclosed_byte_string_with_slash.txt create mode 100644 crates/syntax/test_data/lexer/err/0031_unclosed_byte_string_with_slash_n.rs create mode 100644 crates/syntax/test_data/lexer/err/0031_unclosed_byte_string_with_slash_n.txt create mode 100644 crates/syntax/test_data/lexer/err/0032_unclosed_byte_string_with_slash_double_quote.rs create mode 100644 crates/syntax/test_data/lexer/err/0032_unclosed_byte_string_with_slash_double_quote.txt create mode 100644 crates/syntax/test_data/lexer/err/0033_unclosed_raw_string_at_eof.rs create mode 100644 crates/syntax/test_data/lexer/err/0033_unclosed_raw_string_at_eof.txt create mode 100644 crates/syntax/test_data/lexer/err/0034_unclosed_raw_string_with_ferris.rs create mode 100644 crates/syntax/test_data/lexer/err/0034_unclosed_raw_string_with_ferris.txt create mode 100644 crates/syntax/test_data/lexer/err/0035_unclosed_raw_string_with_ascii_escape.rs create mode 100644 crates/syntax/test_data/lexer/err/0035_unclosed_raw_string_with_ascii_escape.txt create mode 100644 crates/syntax/test_data/lexer/err/0036_unclosed_raw_string_with_unicode_escape.rs create mode 100644 crates/syntax/test_data/lexer/err/0036_unclosed_raw_string_with_unicode_escape.txt create mode 100644 crates/syntax/test_data/lexer/err/0037_unclosed_raw_string_with_space.rs create mode 100644 crates/syntax/test_data/lexer/err/0037_unclosed_raw_string_with_space.txt create mode 100644 crates/syntax/test_data/lexer/err/0038_unclosed_raw_string_with_slash.rs create mode 100644 crates/syntax/test_data/lexer/err/0038_unclosed_raw_string_with_slash.txt create mode 100644 crates/syntax/test_data/lexer/err/0039_unclosed_raw_string_with_slash_n.rs create mode 100644 crates/syntax/test_data/lexer/err/0039_unclosed_raw_string_with_slash_n.txt create mode 100644 crates/syntax/test_data/lexer/err/0040_unclosed_raw_byte_string_at_eof.rs create mode 100644 crates/syntax/test_data/lexer/err/0040_unclosed_raw_byte_string_at_eof.txt create mode 100644 crates/syntax/test_data/lexer/err/0041_unclosed_raw_byte_string_with_ferris.rs create mode 100644 crates/syntax/test_data/lexer/err/0041_unclosed_raw_byte_string_with_ferris.txt create mode 100644 crates/syntax/test_data/lexer/err/0042_unclosed_raw_byte_string_with_ascii_escape.rs create mode 100644 crates/syntax/test_data/lexer/err/0042_unclosed_raw_byte_string_with_ascii_escape.txt create mode 100644 crates/syntax/test_data/lexer/err/0043_unclosed_raw_byte_string_with_unicode_escape.rs create mode 100644 crates/syntax/test_data/lexer/err/0043_unclosed_raw_byte_string_with_unicode_escape.txt create mode 100644 crates/syntax/test_data/lexer/err/0044_unclosed_raw_byte_string_with_space.rs create mode 100644 crates/syntax/test_data/lexer/err/0044_unclosed_raw_byte_string_with_space.txt create mode 100644 crates/syntax/test_data/lexer/err/0045_unclosed_raw_byte_string_with_slash.rs create mode 100644 crates/syntax/test_data/lexer/err/0045_unclosed_raw_byte_string_with_slash.txt create mode 100644 crates/syntax/test_data/lexer/err/0046_unclosed_raw_byte_string_with_slash_n.rs create mode 100644 crates/syntax/test_data/lexer/err/0046_unclosed_raw_byte_string_with_slash_n.txt create mode 100644 crates/syntax/test_data/lexer/err/0047_unstarted_raw_string_at_eof.rs create mode 100644 crates/syntax/test_data/lexer/err/0047_unstarted_raw_string_at_eof.txt create mode 100644 crates/syntax/test_data/lexer/err/0048_unstarted_raw_byte_string_at_eof.rs create mode 100644 crates/syntax/test_data/lexer/err/0048_unstarted_raw_byte_string_at_eof.txt create mode 100644 crates/syntax/test_data/lexer/err/0049_unstarted_raw_string_with_ascii.rs create mode 100644 crates/syntax/test_data/lexer/err/0049_unstarted_raw_string_with_ascii.txt create mode 100644 crates/syntax/test_data/lexer/err/0050_unstarted_raw_byte_string_with_ascii.rs create mode 100644 crates/syntax/test_data/lexer/err/0050_unstarted_raw_byte_string_with_ascii.txt create mode 100644 crates/syntax/test_data/lexer/err/0051_unclosed_block_comment_at_eof.rs create mode 100644 crates/syntax/test_data/lexer/err/0051_unclosed_block_comment_at_eof.txt create mode 100644 crates/syntax/test_data/lexer/err/0052_unclosed_block_comment_with_content.rs create mode 100644 crates/syntax/test_data/lexer/err/0052_unclosed_block_comment_with_content.txt create mode 100644 crates/syntax/test_data/lexer/err/0053_unclosed_nested_block_comment_entirely.rs create mode 100644 crates/syntax/test_data/lexer/err/0053_unclosed_nested_block_comment_entirely.txt create mode 100644 crates/syntax/test_data/lexer/err/0054_unclosed_nested_block_comment_partially.rs create mode 100644 crates/syntax/test_data/lexer/err/0054_unclosed_nested_block_comment_partially.txt create mode 100644 crates/syntax/test_data/lexer/err/0055_empty_int.rs create mode 100644 crates/syntax/test_data/lexer/err/0055_empty_int.txt create mode 100644 crates/syntax/test_data/lexer/err/0056_empty_exponent.rs create mode 100644 crates/syntax/test_data/lexer/err/0056_empty_exponent.txt create mode 100644 crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.rs create mode 100644 crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.txt create mode 100644 crates/syntax/test_data/lexer/ok/0001_hello.rs create mode 100644 crates/syntax/test_data/lexer/ok/0001_hello.txt create mode 100644 crates/syntax/test_data/lexer/ok/0002_whitespace.rs create mode 100644 crates/syntax/test_data/lexer/ok/0002_whitespace.txt create mode 100644 crates/syntax/test_data/lexer/ok/0003_ident.rs create mode 100644 crates/syntax/test_data/lexer/ok/0003_ident.txt create mode 100644 crates/syntax/test_data/lexer/ok/0004_numbers.rs create mode 100644 crates/syntax/test_data/lexer/ok/0004_numbers.txt create mode 100644 crates/syntax/test_data/lexer/ok/0005_symbols.rs create mode 100644 crates/syntax/test_data/lexer/ok/0005_symbols.txt create mode 100644 crates/syntax/test_data/lexer/ok/0006_chars.rs create mode 100644 crates/syntax/test_data/lexer/ok/0006_chars.txt create mode 100644 crates/syntax/test_data/lexer/ok/0007_lifetimes.rs create mode 100644 crates/syntax/test_data/lexer/ok/0007_lifetimes.txt create mode 100644 crates/syntax/test_data/lexer/ok/0008_byte_strings.rs create mode 100644 crates/syntax/test_data/lexer/ok/0008_byte_strings.txt create mode 100644 crates/syntax/test_data/lexer/ok/0009_strings.rs create mode 100644 crates/syntax/test_data/lexer/ok/0009_strings.txt create mode 100644 crates/syntax/test_data/lexer/ok/0010_single_line_comments.rs create mode 100644 crates/syntax/test_data/lexer/ok/0010_single_line_comments.txt create mode 100644 crates/syntax/test_data/lexer/ok/0011_keywords.rs create mode 100644 crates/syntax/test_data/lexer/ok/0011_keywords.txt create mode 100644 crates/syntax/test_data/lexer/ok/0012_block_comment.rs create mode 100644 crates/syntax/test_data/lexer/ok/0012_block_comment.txt create mode 100644 crates/syntax/test_data/lexer/ok/0013_raw_strings.rs create mode 100644 crates/syntax/test_data/lexer/ok/0013_raw_strings.txt create mode 100644 crates/syntax/test_data/lexer/ok/0014_raw_ident.rs create mode 100644 crates/syntax/test_data/lexer/ok/0014_raw_ident.txt create mode 100644 crates/syntax/test_data/parser/err/0000_struct_field_missing_comma.rast create mode 100644 crates/syntax/test_data/parser/err/0000_struct_field_missing_comma.rs create mode 100644 crates/syntax/test_data/parser/err/0001_item_recovery_in_file.rast create mode 100644 crates/syntax/test_data/parser/err/0001_item_recovery_in_file.rs create mode 100644 crates/syntax/test_data/parser/err/0002_duplicate_shebang.rast create mode 100644 crates/syntax/test_data/parser/err/0002_duplicate_shebang.rs create mode 100644 crates/syntax/test_data/parser/err/0003_C++_semicolon.rast create mode 100644 crates/syntax/test_data/parser/err/0003_C++_semicolon.rs create mode 100644 crates/syntax/test_data/parser/err/0004_use_path_bad_segment.rast create mode 100644 crates/syntax/test_data/parser/err/0004_use_path_bad_segment.rs create mode 100644 crates/syntax/test_data/parser/err/0005_attribute_recover.rast create mode 100644 crates/syntax/test_data/parser/err/0005_attribute_recover.rs create mode 100644 crates/syntax/test_data/parser/err/0006_named_field_recovery.rast create mode 100644 crates/syntax/test_data/parser/err/0006_named_field_recovery.rs create mode 100644 crates/syntax/test_data/parser/err/0007_stray_curly_in_file.rast create mode 100644 crates/syntax/test_data/parser/err/0007_stray_curly_in_file.rs create mode 100644 crates/syntax/test_data/parser/err/0008_item_block_recovery.rast create mode 100644 crates/syntax/test_data/parser/err/0008_item_block_recovery.rs create mode 100644 crates/syntax/test_data/parser/err/0009_broken_struct_type_parameter.rast create mode 100644 crates/syntax/test_data/parser/err/0009_broken_struct_type_parameter.rs create mode 100644 crates/syntax/test_data/parser/err/0010_unsafe_lambda_block.rast create mode 100644 crates/syntax/test_data/parser/err/0010_unsafe_lambda_block.rs create mode 100644 crates/syntax/test_data/parser/err/0011_extern_struct.rast create mode 100644 crates/syntax/test_data/parser/err/0011_extern_struct.rs create mode 100644 crates/syntax/test_data/parser/err/0012_broken_lambda.rast create mode 100644 crates/syntax/test_data/parser/err/0013_invalid_type.rast create mode 100644 crates/syntax/test_data/parser/err/0013_invalid_type.rs create mode 100644 crates/syntax/test_data/parser/err/0014_where_no_bounds.rast create mode 100644 crates/syntax/test_data/parser/err/0014_where_no_bounds.rs create mode 100644 crates/syntax/test_data/parser/err/0015_curly_in_params.rast create mode 100644 crates/syntax/test_data/parser/err/0015_curly_in_params.rs create mode 100644 crates/syntax/test_data/parser/err/0016_missing_semi.rast create mode 100644 crates/syntax/test_data/parser/err/0016_missing_semi.rs create mode 100644 crates/syntax/test_data/parser/err/0017_incomplete_binexpr.rast create mode 100644 crates/syntax/test_data/parser/err/0017_incomplete_binexpr.rs create mode 100644 crates/syntax/test_data/parser/err/0018_incomplete_fn.rast create mode 100644 crates/syntax/test_data/parser/err/0018_incomplete_fn.rs create mode 100644 crates/syntax/test_data/parser/err/0019_let_recover.rast create mode 100644 crates/syntax/test_data/parser/err/0019_let_recover.rs create mode 100644 crates/syntax/test_data/parser/err/0020_fn_recover.rast create mode 100644 crates/syntax/test_data/parser/err/0020_fn_recover.rs create mode 100644 crates/syntax/test_data/parser/err/0021_incomplete_param.rast create mode 100644 crates/syntax/test_data/parser/err/0021_incomplete_param.rs create mode 100644 crates/syntax/test_data/parser/err/0022_bad_exprs.rast create mode 100644 crates/syntax/test_data/parser/err/0022_bad_exprs.rs create mode 100644 crates/syntax/test_data/parser/err/0023_mismatched_paren.rast create mode 100644 crates/syntax/test_data/parser/err/0023_mismatched_paren.rs create mode 100644 crates/syntax/test_data/parser/err/0024_many_type_parens.rast create mode 100644 crates/syntax/test_data/parser/err/0024_many_type_parens.rs create mode 100644 crates/syntax/test_data/parser/err/0025_nope.rast create mode 100644 crates/syntax/test_data/parser/err/0025_nope.rs create mode 100644 crates/syntax/test_data/parser/err/0026_imp_recovery.rast create mode 100644 crates/syntax/test_data/parser/err/0026_imp_recovery.rs create mode 100644 crates/syntax/test_data/parser/err/0027_incomplere_where_for.rast create mode 100644 crates/syntax/test_data/parser/err/0027_incomplere_where_for.rs create mode 100644 crates/syntax/test_data/parser/err/0029_field_completion.rast create mode 100644 crates/syntax/test_data/parser/err/0029_field_completion.rs create mode 100644 crates/syntax/test_data/parser/err/0031_block_inner_attrs.rast create mode 100644 crates/syntax/test_data/parser/err/0031_block_inner_attrs.rs create mode 100644 crates/syntax/test_data/parser/err/0032_match_arms_inner_attrs.rast create mode 100644 crates/syntax/test_data/parser/err/0032_match_arms_inner_attrs.rs create mode 100644 crates/syntax/test_data/parser/err/0033_match_arms_outer_attrs.rast create mode 100644 crates/syntax/test_data/parser/err/0033_match_arms_outer_attrs.rs create mode 100644 crates/syntax/test_data/parser/err/0034_bad_box_pattern.rast create mode 100644 crates/syntax/test_data/parser/err/0034_bad_box_pattern.rs create mode 100644 crates/syntax/test_data/parser/err/0035_use_recover.rast create mode 100644 crates/syntax/test_data/parser/err/0035_use_recover.rs create mode 100644 crates/syntax/test_data/parser/err/0036_partial_use.rast create mode 100644 crates/syntax/test_data/parser/err/0036_partial_use.rs create mode 100644 crates/syntax/test_data/parser/err/0037_visibility_in_traits.rast create mode 100644 crates/syntax/test_data/parser/err/0037_visibility_in_traits.rs create mode 100644 crates/syntax/test_data/parser/err/0038_endless_inclusive_range.rast create mode 100644 crates/syntax/test_data/parser/err/0038_endless_inclusive_range.rs create mode 100644 crates/syntax/test_data/parser/err/0039_lambda_recovery.rast create mode 100644 crates/syntax/test_data/parser/err/0039_lambda_recovery.rs create mode 100644 crates/syntax/test_data/parser/err/0040_illegal_crate_kw_location.rast create mode 100644 crates/syntax/test_data/parser/err/0040_illegal_crate_kw_location.rs create mode 100644 crates/syntax/test_data/parser/err/0041_illegal_super_keyword_location.rast create mode 100644 crates/syntax/test_data/parser/err/0041_illegal_super_keyword_location.rs create mode 100644 crates/syntax/test_data/parser/err/0042_illegal_self_keyword_location.rast create mode 100644 crates/syntax/test_data/parser/err/0042_illegal_self_keyword_location.rs create mode 100644 crates/syntax/test_data/parser/err/0043_weird_blocks.rast create mode 100644 crates/syntax/test_data/parser/err/0043_weird_blocks.rs create mode 100644 crates/syntax/test_data/parser/err/0044_unexpected_for_type.rast create mode 100644 crates/syntax/test_data/parser/err/0044_unexpected_for_type.rs create mode 100644 crates/syntax/test_data/parser/err/0045_item_modifiers.rast create mode 100644 crates/syntax/test_data/parser/err/0045_item_modifiers.rs create mode 100644 crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rast create mode 100644 crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rs create mode 100644 crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rast create mode 100644 crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rs create mode 100644 crates/syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rast create mode 100644 crates/syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rs create mode 100644 crates/syntax/test_data/parser/fragments/item/ok/0000_fn.rast create mode 100644 crates/syntax/test_data/parser/fragments/item/ok/0000_fn.rs create mode 100644 crates/syntax/test_data/parser/fragments/path/err/0000_reserved_word.rast create mode 100644 crates/syntax/test_data/parser/fragments/path/err/0000_reserved_word.rs create mode 100644 crates/syntax/test_data/parser/fragments/path/err/0001_expression.rast create mode 100644 crates/syntax/test_data/parser/fragments/path/err/0001_expression.rs create mode 100644 crates/syntax/test_data/parser/fragments/path/ok/0000_single_ident.rast create mode 100644 crates/syntax/test_data/parser/fragments/path/ok/0000_single_ident.rs create mode 100644 crates/syntax/test_data/parser/fragments/path/ok/0001_multipart.rast create mode 100644 crates/syntax/test_data/parser/fragments/path/ok/0001_multipart.rs create mode 100644 crates/syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rast create mode 100644 crates/syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rs create mode 100644 crates/syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rast create mode 100644 crates/syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rs create mode 100644 crates/syntax/test_data/parser/fragments/pattern/ok/0000_enum.rast create mode 100644 crates/syntax/test_data/parser/fragments/pattern/ok/0000_enum.rs create mode 100644 crates/syntax/test_data/parser/fragments/type/err/0000_missing_close.rast create mode 100644 crates/syntax/test_data/parser/fragments/type/err/0000_missing_close.rs create mode 100644 crates/syntax/test_data/parser/fragments/type/ok/0000_result.rast create mode 100644 crates/syntax/test_data/parser/fragments/type/ok/0000_result.rs create mode 100644 crates/syntax/test_data/parser/fuzz-failures/0000.rs create mode 100644 crates/syntax/test_data/parser/fuzz-failures/0001.rs create mode 100644 crates/syntax/test_data/parser/fuzz-failures/0002.rs create mode 100644 crates/syntax/test_data/parser/fuzz-failures/0003.rs create mode 100644 crates/syntax/test_data/parser/fuzz-failures/0004.rs create mode 100644 crates/syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rast create mode 100644 crates/syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rs create mode 100644 crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast create mode 100644 crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rs create mode 100644 crates/syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rast create mode 100644 crates/syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rs create mode 100644 crates/syntax/test_data/parser/inline/err/0004_impl_type.rast create mode 100644 crates/syntax/test_data/parser/inline/err/0004_impl_type.rs create mode 100644 crates/syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rast create mode 100644 crates/syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rs create mode 100644 crates/syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast create mode 100644 crates/syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rs create mode 100644 crates/syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast create mode 100644 crates/syntax/test_data/parser/inline/err/0007_async_without_semicolon.rs create mode 100644 crates/syntax/test_data/parser/inline/err/0008_pub_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/err/0008_pub_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast create mode 100644 crates/syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rs create mode 100644 crates/syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/err/0013_static_underscore.rast create mode 100644 crates/syntax/test_data/parser/inline/err/0013_static_underscore.rs create mode 100644 crates/syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast create mode 100644 crates/syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rs create mode 100644 crates/syntax/test_data/parser/inline/err/0015_empty_segment.rast create mode 100644 crates/syntax/test_data/parser/inline/err/0015_empty_segment.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0001_trait_item_list.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0001_trait_item_list.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0002_use_tree_list.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0002_use_tree_list.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0005_function_type_params.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0005_function_type_params.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0006_self_param.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0006_self_param.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0008_path_part.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0008_path_part.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0009_loop_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0009_loop_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0010_extern_block.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0010_extern_block.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0011_field_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0011_field_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0014_never_type.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0014_never_type.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0017_array_type.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0017_array_type.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0018_arb_self_types.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0018_arb_self_types.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0019_unary_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0019_unary_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0020_use_star.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0020_use_star.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0021_impl_item_list.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0021_impl_item_list.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0022_crate_visibility.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0022_crate_visibility.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0023_placeholder_type.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0023_placeholder_type.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0024_slice_pat.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0024_slice_pat.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0025_slice_type.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0025_slice_type.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0027_ref_pat.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0027_ref_pat.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0029_cast_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0029_cast_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0030_cond.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0030_cond.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0031_while_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0031_while_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0034_break_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0034_break_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0037_qual_paths.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0037_qual_paths.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0038_full_range_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0038_full_range_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0039_type_arg.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0039_type_arg.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0041_trait_item.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0041_trait_item.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0042_call_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0042_call_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0043_use_alias.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0043_use_alias.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0044_block_items.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0044_block_items.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0050_fn_decl.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0050_fn_decl.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0051_unit_type.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0051_unit_type.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0052_path_type.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0052_path_type.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0053_path_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0053_path_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0054_record_field_attrs.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0054_record_field_attrs.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0055_literal_pattern.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0055_literal_pattern.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0056_where_clause.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0056_where_clause.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0058_range_pat.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0058_range_pat.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0059_match_arms_commas.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0059_match_arms_commas.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0060_extern_crate.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0060_extern_crate.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0061_record_lit.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0061_record_lit.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0062_mod_contents.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0062_mod_contents.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0063_impl_def_neg.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0063_impl_def_neg.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0064_if_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0064_if_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0066_match_arm.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0066_match_arm.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0067_crate_path.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0067_crate_path.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0068_union_items.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0068_union_items.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0071_match_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0071_match_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0072_return_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0072_return_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0073_type_item_type_params.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0073_type_item_type_params.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0075_block.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0075_block.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0076_function_where_clause.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0076_function_where_clause.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0077_try_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0077_try_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0078_type_item.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0078_type_item.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0079_impl_def.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0079_impl_def.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0080_postfix_range.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0080_postfix_range.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0081_for_type.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0081_for_type.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0082_ref_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0082_ref_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0083_struct_items.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0083_struct_items.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0084_paren_type.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0084_paren_type.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0085_expr_literals.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0085_expr_literals.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0086_function_ret_type.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0086_function_ret_type.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0088_break_ambiguity.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0088_break_ambiguity.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0090_type_param_default.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0090_type_param_default.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0093_index_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0093_index_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0095_placeholder_pat.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0095_placeholder_pat.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0099_param_list.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0099_param_list.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0100_for_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0100_for_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0103_array_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0103_array_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0106_lambda_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0106_lambda_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0107_method_call_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0107_method_call_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0108_tuple_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0108_tuple_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0109_label.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0109_label.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0110_use_path.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0110_use_path.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0111_tuple_pat.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0111_tuple_pat.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0112_bind_pat.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0112_bind_pat.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0113_nocontentexpr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0113_nocontentexpr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0117_macro_call_type.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0117_macro_call_type.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0118_match_guard.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0118_match_guard.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0123_param_list_vararg.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0123_param_list_vararg.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0129_marco_pat.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0129_marco_pat.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0130_let_stmt.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0130_let_stmt.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0130_try_block_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0130_try_block_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0131_existential_type.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0131_existential_type.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0132_box_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0132_box_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0137_await_expr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0137_await_expr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0138_expression_after_block.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0138_expression_after_block.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0139_param_outer_arg.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0139_param_outer_arg.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0142_for_range_from.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0142_for_range_from.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0143_box_pat.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0143_box_pat.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0145_record_field_pat.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0145_record_field_pat.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0146_as_precedence.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0146_as_precedence.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0147_const_param.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0147_const_param.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0147_macro_def.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0147_macro_def.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0148_pub_macro_def.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0148_pub_macro_def.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0150_array_attrs.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0150_array_attrs.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0150_impl_type_params.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0150_impl_type_params.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0151_fn.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0151_fn.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0151_trait_alias.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0151_trait_alias.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0152_arg_with_attr.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0152_arg_with_attr.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0152_impl.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0152_impl.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0153_trait.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0153_trait.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0155_closure_params.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0155_closure_params.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0156_fn_def_param.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0156_fn_def_param.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0156_or_pattern.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0156_or_pattern.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0157_variant_discriminant.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0157_variant_discriminant.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0160_try_macro_rules.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0160_try_macro_rules.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0162_unsafe_block.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0162_unsafe_block.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0163_default_unsafe_item.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0163_default_unsafe_item.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0164_default_item.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0164_default_item.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rs create mode 100644 crates/syntax/test_data/parser/ok/0000_empty.rast create mode 100644 crates/syntax/test_data/parser/ok/0000_empty.rs create mode 100644 crates/syntax/test_data/parser/ok/0001_struct_item.rast create mode 100644 crates/syntax/test_data/parser/ok/0001_struct_item.rs create mode 100644 crates/syntax/test_data/parser/ok/0002_struct_item_field.rast create mode 100644 crates/syntax/test_data/parser/ok/0002_struct_item_field.rs create mode 100644 crates/syntax/test_data/parser/ok/0004_file_shebang.rast create mode 100644 crates/syntax/test_data/parser/ok/0004_file_shebang.rs create mode 100644 crates/syntax/test_data/parser/ok/0005_fn_item.rast create mode 100644 crates/syntax/test_data/parser/ok/0005_fn_item.rs create mode 100644 crates/syntax/test_data/parser/ok/0006_inner_attributes.rast create mode 100644 crates/syntax/test_data/parser/ok/0006_inner_attributes.rs create mode 100644 crates/syntax/test_data/parser/ok/0007_extern_crate.rast create mode 100644 crates/syntax/test_data/parser/ok/0007_extern_crate.rs create mode 100644 crates/syntax/test_data/parser/ok/0008_mod_item.rast create mode 100644 crates/syntax/test_data/parser/ok/0008_mod_item.rs create mode 100644 crates/syntax/test_data/parser/ok/0009_use_item.rast create mode 100644 crates/syntax/test_data/parser/ok/0009_use_item.rs create mode 100644 crates/syntax/test_data/parser/ok/0010_use_path_segments.rast create mode 100644 crates/syntax/test_data/parser/ok/0010_use_path_segments.rs create mode 100644 crates/syntax/test_data/parser/ok/0011_outer_attribute.rast create mode 100644 crates/syntax/test_data/parser/ok/0011_outer_attribute.rs create mode 100644 crates/syntax/test_data/parser/ok/0012_visibility.rast create mode 100644 crates/syntax/test_data/parser/ok/0012_visibility.rs create mode 100644 crates/syntax/test_data/parser/ok/0013_use_path_self_super.rast create mode 100644 crates/syntax/test_data/parser/ok/0013_use_path_self_super.rs create mode 100644 crates/syntax/test_data/parser/ok/0014_use_tree.rast create mode 100644 crates/syntax/test_data/parser/ok/0014_use_tree.rs create mode 100644 crates/syntax/test_data/parser/ok/0015_use_tree.rast create mode 100644 crates/syntax/test_data/parser/ok/0015_use_tree.rs create mode 100644 crates/syntax/test_data/parser/ok/0016_struct_flavors.rast create mode 100644 crates/syntax/test_data/parser/ok/0016_struct_flavors.rs create mode 100644 crates/syntax/test_data/parser/ok/0017_attr_trailing_comma.rast create mode 100644 crates/syntax/test_data/parser/ok/0017_attr_trailing_comma.rs create mode 100644 crates/syntax/test_data/parser/ok/0018_struct_type_params.rast create mode 100644 crates/syntax/test_data/parser/ok/0018_struct_type_params.rs create mode 100644 crates/syntax/test_data/parser/ok/0019_enums.rast create mode 100644 crates/syntax/test_data/parser/ok/0019_enums.rs create mode 100644 crates/syntax/test_data/parser/ok/0020_type_param_bounds.rast create mode 100644 crates/syntax/test_data/parser/ok/0020_type_param_bounds.rs create mode 100644 crates/syntax/test_data/parser/ok/0022_empty_extern_block.rast create mode 100644 crates/syntax/test_data/parser/ok/0022_empty_extern_block.rs create mode 100644 crates/syntax/test_data/parser/ok/0023_static_items.rast create mode 100644 crates/syntax/test_data/parser/ok/0023_static_items.rs create mode 100644 crates/syntax/test_data/parser/ok/0024_const_item.rast create mode 100644 crates/syntax/test_data/parser/ok/0024_const_item.rs create mode 100644 crates/syntax/test_data/parser/ok/0025_extern_fn_in_block.rast create mode 100644 crates/syntax/test_data/parser/ok/0025_extern_fn_in_block.rs create mode 100644 crates/syntax/test_data/parser/ok/0026_const_fn_in_block.rast create mode 100644 crates/syntax/test_data/parser/ok/0026_const_fn_in_block.rs create mode 100644 crates/syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rast create mode 100644 crates/syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rs create mode 100644 crates/syntax/test_data/parser/ok/0028_operator_binding_power.rast create mode 100644 crates/syntax/test_data/parser/ok/0028_operator_binding_power.rs create mode 100644 crates/syntax/test_data/parser/ok/0029_range_forms.rast create mode 100644 crates/syntax/test_data/parser/ok/0029_range_forms.rs create mode 100644 crates/syntax/test_data/parser/ok/0030_string_suffixes.rast create mode 100644 crates/syntax/test_data/parser/ok/0030_string_suffixes.rs create mode 100644 crates/syntax/test_data/parser/ok/0030_traits.rast create mode 100644 crates/syntax/test_data/parser/ok/0030_traits.rs create mode 100644 crates/syntax/test_data/parser/ok/0031_extern.rast create mode 100644 crates/syntax/test_data/parser/ok/0031_extern.rs create mode 100644 crates/syntax/test_data/parser/ok/0032_where_for.rast create mode 100644 crates/syntax/test_data/parser/ok/0032_where_for.rs create mode 100644 crates/syntax/test_data/parser/ok/0033_label_break.rast create mode 100644 crates/syntax/test_data/parser/ok/0033_label_break.rs create mode 100644 crates/syntax/test_data/parser/ok/0034_crate_path_in_call.rast create mode 100644 crates/syntax/test_data/parser/ok/0034_crate_path_in_call.rs create mode 100644 crates/syntax/test_data/parser/ok/0035_weird_exprs.rast create mode 100644 crates/syntax/test_data/parser/ok/0035_weird_exprs.rs create mode 100644 crates/syntax/test_data/parser/ok/0036_fully_qualified.rast create mode 100644 crates/syntax/test_data/parser/ok/0036_fully_qualified.rs create mode 100644 crates/syntax/test_data/parser/ok/0037_mod.rast create mode 100644 crates/syntax/test_data/parser/ok/0037_mod.rs create mode 100644 crates/syntax/test_data/parser/ok/0038_where_pred_type.rast create mode 100644 crates/syntax/test_data/parser/ok/0038_where_pred_type.rs create mode 100644 crates/syntax/test_data/parser/ok/0039_raw_fn_item.rast create mode 100644 crates/syntax/test_data/parser/ok/0039_raw_fn_item.rs create mode 100644 crates/syntax/test_data/parser/ok/0040_raw_struct_item_field.rast create mode 100644 crates/syntax/test_data/parser/ok/0040_raw_struct_item_field.rs create mode 100644 crates/syntax/test_data/parser/ok/0041_raw_keywords.rast create mode 100644 crates/syntax/test_data/parser/ok/0041_raw_keywords.rs create mode 100644 crates/syntax/test_data/parser/ok/0042_ufcs_call_list.rast create mode 100644 crates/syntax/test_data/parser/ok/0042_ufcs_call_list.rs create mode 100644 crates/syntax/test_data/parser/ok/0043_complex_assignment.rast create mode 100644 crates/syntax/test_data/parser/ok/0043_complex_assignment.rs create mode 100644 crates/syntax/test_data/parser/ok/0044_let_attrs.rast create mode 100644 crates/syntax/test_data/parser/ok/0044_let_attrs.rs create mode 100644 crates/syntax/test_data/parser/ok/0045_block_inner_attrs.rast create mode 100644 crates/syntax/test_data/parser/ok/0045_block_inner_attrs.rs create mode 100644 crates/syntax/test_data/parser/ok/0046_extern_inner_attributes.rast create mode 100644 crates/syntax/test_data/parser/ok/0046_extern_inner_attributes.rs create mode 100644 crates/syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rast create mode 100644 crates/syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rs create mode 100644 crates/syntax/test_data/parser/ok/0048_compound_assignment.rast create mode 100644 crates/syntax/test_data/parser/ok/0048_compound_assignment.rs create mode 100644 crates/syntax/test_data/parser/ok/0049_async_block.rast create mode 100644 crates/syntax/test_data/parser/ok/0049_async_block.rs create mode 100644 crates/syntax/test_data/parser/ok/0050_async_block_as_argument.rast create mode 100644 crates/syntax/test_data/parser/ok/0050_async_block_as_argument.rs create mode 100644 crates/syntax/test_data/parser/ok/0051_parameter_attrs.rast create mode 100644 crates/syntax/test_data/parser/ok/0051_parameter_attrs.rs create mode 100644 crates/syntax/test_data/parser/ok/0052_for_range_block.rast create mode 100644 crates/syntax/test_data/parser/ok/0052_for_range_block.rs create mode 100644 crates/syntax/test_data/parser/ok/0053_outer_attribute_on_macro_rules.rast create mode 100644 crates/syntax/test_data/parser/ok/0053_outer_attribute_on_macro_rules.rs create mode 100644 crates/syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rast create mode 100644 crates/syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rs create mode 100644 crates/syntax/test_data/parser/ok/0055_dot_dot_dot.rast create mode 100644 crates/syntax/test_data/parser/ok/0055_dot_dot_dot.rs create mode 100644 crates/syntax/test_data/parser/ok/0056_neq_in_type.rast create mode 100644 crates/syntax/test_data/parser/ok/0056_neq_in_type.rs create mode 100644 crates/syntax/test_data/parser/ok/0057_loop_in_call.rast create mode 100644 crates/syntax/test_data/parser/ok/0057_loop_in_call.rs create mode 100644 crates/syntax/test_data/parser/ok/0058_unary_expr_precedence.rast create mode 100644 crates/syntax/test_data/parser/ok/0058_unary_expr_precedence.rs create mode 100644 crates/syntax/test_data/parser/ok/0059_loops_in_parens.rast create mode 100644 crates/syntax/test_data/parser/ok/0059_loops_in_parens.rs create mode 100644 crates/syntax/test_data/parser/ok/0060_as_range.rast create mode 100644 crates/syntax/test_data/parser/ok/0060_as_range.rs create mode 100644 crates/syntax/test_data/parser/ok/0061_match_full_range.rast create mode 100644 crates/syntax/test_data/parser/ok/0061_match_full_range.rs create mode 100644 crates/syntax/test_data/parser/ok/0062_macro_2.0.rast create mode 100644 crates/syntax/test_data/parser/ok/0062_macro_2.0.rs create mode 100644 crates/syntax/test_data/parser/ok/0063_trait_fn_patterns.rast create mode 100644 crates/syntax/test_data/parser/ok/0063_trait_fn_patterns.rs create mode 100644 crates/syntax/test_data/parser/ok/0063_variadic_fun.rast create mode 100644 crates/syntax/test_data/parser/ok/0063_variadic_fun.rs create mode 100644 crates/syntax/test_data/parser/ok/0064_impl_fn_params.rast create mode 100644 crates/syntax/test_data/parser/ok/0064_impl_fn_params.rs create mode 100644 crates/syntax/test_data/parser/ok/0065_comment_newline.rast create mode 100644 crates/syntax/test_data/parser/ok/0065_comment_newline.rs create mode 100644 crates/syntax/test_data/parser/ok/0065_plus_after_fn_trait_bound.rast create mode 100644 crates/syntax/test_data/parser/ok/0065_plus_after_fn_trait_bound.rs create mode 100644 crates/syntax/test_data/parser/ok/0066_default_modifier.rast create mode 100644 crates/syntax/test_data/parser/ok/0066_default_modifier.rs create mode 100644 crates/syntax/test_data/parser/ok/0067_where_for_pred.rast create mode 100644 crates/syntax/test_data/parser/ok/0067_where_for_pred.rs create mode 100644 crates/syntax/test_data/parser/ok/0068_item_modifiers.rast create mode 100644 crates/syntax/test_data/parser/ok/0068_item_modifiers.rs create mode 100644 crates/syntax/test_data/reparse/fuzz-failures/0000.rs create mode 100644 crates/syntax/test_data/reparse/fuzz-failures/0001.rs create mode 100644 crates/syntax/test_data/reparse/fuzz-failures/0002.rs create mode 100644 crates/syntax/test_data/reparse/fuzz-failures/0003.rs create mode 100644 crates/syntax/test_data/reparse/fuzz-failures/0004.rs create mode 100644 crates/syntax/test_data/reparse/fuzz-failures/0005.rs diff --git a/.gitattributes b/.gitattributes index 4cd50e48109..7c2f752d69a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,5 @@ * text=auto eol=lf -crates/ra_syntax/test_data/** -text eof=LF +crates/syntax/test_data/** -text eof=LF # Older git versions try to fix line endings on images, this prevents it. *.png binary *.jpg binary diff --git a/Cargo.lock b/Cargo.lock index 095127b99f2..c95ef002d3c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -933,9 +933,9 @@ dependencies = [ "ra_fmt", "ra_hir", "ra_ide_db", - "ra_syntax", "rustc-hash", "stdx", + "syntax", "test_utils", "text_edit", ] @@ -945,8 +945,8 @@ name = "ra_cfg" version = "0.1.0" dependencies = [ "ra_mbe", - "ra_syntax", "rustc-hash", + "syntax", "tt", ] @@ -956,10 +956,10 @@ version = "0.1.0" dependencies = [ "profile", "ra_cfg", - "ra_syntax", "rustc-hash", "salsa", "stdx", + "syntax", "test_utils", "tt", "vfs", @@ -970,7 +970,7 @@ name = "ra_fmt" version = "0.1.0" dependencies = [ "itertools", - "ra_syntax", + "syntax", ] [[package]] @@ -986,9 +986,9 @@ dependencies = [ "ra_hir_def", "ra_hir_expand", "ra_hir_ty", - "ra_syntax", "rustc-hash", "stdx", + "syntax", ] [[package]] @@ -1010,10 +1010,10 @@ dependencies = [ "ra_db", "ra_hir_expand", "ra_mbe", - "ra_syntax", "rustc-hash", "smallvec", "stdx", + "syntax", "test_utils", "tt", ] @@ -1029,8 +1029,8 @@ dependencies = [ "profile", "ra_db", "ra_mbe", - "ra_syntax", "rustc-hash", + "syntax", "test_utils", "tt", ] @@ -1052,11 +1052,11 @@ dependencies = [ "ra_db", "ra_hir_def", "ra_hir_expand", - "ra_syntax", "rustc-hash", "scoped-tls", "smallvec", "stdx", + "syntax", "test_utils", "tracing", "tracing-subscriber", @@ -1081,9 +1081,9 @@ dependencies = [ "ra_hir", "ra_ide_db", "ra_ssr", - "ra_syntax", "rustc-hash", "stdx", + "syntax", "test_utils", "text_edit", ] @@ -1099,10 +1099,10 @@ dependencies = [ "profile", "ra_db", "ra_hir", - "ra_syntax", "rayon", "rustc-hash", "stdx", + "syntax", "test_utils", "text_edit", ] @@ -1113,9 +1113,9 @@ version = "0.1.0" dependencies = [ "log", "parser", - "ra_syntax", "rustc-hash", "smallvec", + "syntax", "test_utils", "tt", ] @@ -1176,33 +1176,12 @@ dependencies = [ "ra_db", "ra_hir", "ra_ide_db", - "ra_syntax", "rustc-hash", + "syntax", "test_utils", "text_edit", ] -[[package]] -name = "ra_syntax" -version = "0.1.0" -dependencies = [ - "arrayvec", - "expect", - "itertools", - "once_cell", - "parser", - "rayon", - "rowan", - "rustc-ap-rustc_lexer", - "rustc-hash", - "serde", - "smol_str", - "stdx", - "test_utils", - "text_edit", - "walkdir", -] - [[package]] name = "rayon" version = "1.3.1" @@ -1304,12 +1283,12 @@ dependencies = [ "ra_proc_macro_srv", "ra_project_model", "ra_ssr", - "ra_syntax", "rayon", "rustc-hash", "serde", "serde_json", "stdx", + "syntax", "test_utils", "text_edit", "threadpool", @@ -1532,6 +1511,27 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "syntax" +version = "0.0.0" +dependencies = [ + "arrayvec", + "expect", + "itertools", + "once_cell", + "parser", + "rayon", + "rowan", + "rustc-ap-rustc_lexer", + "rustc-hash", + "serde", + "smol_str", + "stdx", + "test_utils", + "text_edit", + "walkdir", +] + [[package]] name = "termcolor" version = "1.1.0" diff --git a/crates/parser/src/grammar.rs b/crates/parser/src/grammar.rs index 88468bc9716..9dbd2ebc445 100644 --- a/crates/parser/src/grammar.rs +++ b/crates/parser/src/grammar.rs @@ -20,7 +20,7 @@ //! //! After adding a new inline-test, run `cargo xtask codegen` to //! extract it as a standalone text-fixture into -//! `crates/ra_syntax/test_data/parser/`, and run `cargo test` once to +//! `crates/syntax/test_data/parser/`, and run `cargo test` once to //! create the "gold" value. //! //! Coding convention: rules like `where_clause` always produce either a diff --git a/crates/parser/src/lib.rs b/crates/parser/src/lib.rs index eeb8ad66bd1..41e62116f88 100644 --- a/crates/parser/src/lib.rs +++ b/crates/parser/src/lib.rs @@ -10,7 +10,7 @@ //! //! The actual parsing happens in the `grammar` module. //! -//! Tests for this crate live in `ra_syntax` crate. +//! Tests for this crate live in `syntax` crate. #[macro_use] mod token_set; diff --git a/crates/ra_assists/Cargo.toml b/crates/ra_assists/Cargo.toml index e4a5ee6c1c8..abc290463a4 100644 --- a/crates/ra_assists/Cargo.toml +++ b/crates/ra_assists/Cargo.toml @@ -15,7 +15,7 @@ either = "1.5.3" stdx = { path = "../stdx" } -ra_syntax = { path = "../ra_syntax" } +syntax = { path = "../syntax" } text_edit = { path = "../text_edit" } ra_fmt = { path = "../ra_fmt" } profile = { path = "../profile" } diff --git a/crates/ra_assists/src/assist_context.rs b/crates/ra_assists/src/assist_context.rs index fcaa1aedcf3..217f692a4ed 100644 --- a/crates/ra_assists/src/assist_context.rs +++ b/crates/ra_assists/src/assist_context.rs @@ -10,7 +10,7 @@ use ra_ide_db::{ source_change::{SourceChange, SourceFileEdit}, RootDatabase, }; -use ra_syntax::{ +use syntax::{ algo::{self, find_node_at_offset, SyntaxRewriter}, AstNode, SourceFile, SyntaxElement, SyntaxKind, SyntaxNode, SyntaxToken, TextRange, TextSize, TokenAtOffset, @@ -271,7 +271,7 @@ impl AssistBuilder { } /// Replaces specified `node` of text with a given string, reindenting the /// string to maintain `node`'s existing indent. - // FIXME: remove in favor of ra_syntax::edit::IndentLevel::increase_indent + // FIXME: remove in favor of syntax::edit::IndentLevel::increase_indent pub(crate) fn replace_node_and_indent( &mut self, node: &SyntaxNode, diff --git a/crates/ra_assists/src/ast_transform.rs b/crates/ra_assists/src/ast_transform.rs index 07c978378a6..4c41c16d86c 100644 --- a/crates/ra_assists/src/ast_transform.rs +++ b/crates/ra_assists/src/ast_transform.rs @@ -2,13 +2,13 @@ use rustc_hash::FxHashMap; use hir::{HirDisplay, PathResolution, SemanticsScope}; -use ra_syntax::{ +use syntax::{ algo::SyntaxRewriter, ast::{self, AstNode}, }; pub trait AstTransform<'a> { - fn get_substitution(&self, node: &ra_syntax::SyntaxNode) -> Option; + fn get_substitution(&self, node: &syntax::SyntaxNode) -> Option; fn chain_before(self, other: Box + 'a>) -> Box + 'a>; fn or + 'a>(self, other: T) -> Box + 'a> @@ -22,7 +22,7 @@ pub trait AstTransform<'a> { struct NullTransformer; impl<'a> AstTransform<'a> for NullTransformer { - fn get_substitution(&self, _node: &ra_syntax::SyntaxNode) -> Option { + fn get_substitution(&self, _node: &syntax::SyntaxNode) -> Option { None } fn chain_before(self, other: Box + 'a>) -> Box + 'a> { @@ -101,10 +101,7 @@ impl<'a> SubstituteTypeParams<'a> { Some(result) } } - fn get_substitution_inner( - &self, - node: &ra_syntax::SyntaxNode, - ) -> Option { + fn get_substitution_inner(&self, node: &syntax::SyntaxNode) -> Option { let type_ref = ast::Type::cast(node.clone())?; let path = match &type_ref { ast::Type::PathType(path_type) => path_type.path()?, @@ -122,7 +119,7 @@ impl<'a> SubstituteTypeParams<'a> { } impl<'a> AstTransform<'a> for SubstituteTypeParams<'a> { - fn get_substitution(&self, node: &ra_syntax::SyntaxNode) -> Option { + fn get_substitution(&self, node: &syntax::SyntaxNode) -> Option { self.get_substitution_inner(node).or_else(|| self.previous.get_substitution(node)) } fn chain_before(self, other: Box + 'a>) -> Box + 'a> { @@ -141,10 +138,7 @@ impl<'a> QualifyPaths<'a> { Self { target_scope, source_scope, previous: Box::new(NullTransformer) } } - fn get_substitution_inner( - &self, - node: &ra_syntax::SyntaxNode, - ) -> Option { + fn get_substitution_inner(&self, node: &syntax::SyntaxNode) -> Option { // FIXME handle value ns? let from = self.target_scope.module()?; let p = ast::Path::cast(node.clone())?; @@ -183,7 +177,7 @@ impl<'a> QualifyPaths<'a> { pub fn apply<'a, N: AstNode>(transformer: &dyn AstTransform<'a>, node: N) -> N { SyntaxRewriter::from_fn(|element| match element { - ra_syntax::SyntaxElement::Node(n) => { + syntax::SyntaxElement::Node(n) => { let replacement = transformer.get_substitution(&n)?; Some(replacement.into()) } @@ -193,7 +187,7 @@ pub fn apply<'a, N: AstNode>(transformer: &dyn AstTransform<'a>, node: N) -> N { } impl<'a> AstTransform<'a> for QualifyPaths<'a> { - fn get_substitution(&self, node: &ra_syntax::SyntaxNode) -> Option { + fn get_substitution(&self, node: &syntax::SyntaxNode) -> Option { self.get_substitution_inner(node).or_else(|| self.previous.get_substitution(node)) } fn chain_before(self, other: Box + 'a>) -> Box + 'a> { diff --git a/crates/ra_assists/src/handlers/add_custom_impl.rs b/crates/ra_assists/src/handlers/add_custom_impl.rs index ebdf00e676c..8757fa33f26 100644 --- a/crates/ra_assists/src/handlers/add_custom_impl.rs +++ b/crates/ra_assists/src/handlers/add_custom_impl.rs @@ -1,5 +1,5 @@ use itertools::Itertools; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode}, Direction, SmolStr, SyntaxKind::{IDENT, WHITESPACE}, diff --git a/crates/ra_assists/src/handlers/add_explicit_type.rs b/crates/ra_assists/src/handlers/add_explicit_type.rs index 135a2ac9c90..563cbf505f4 100644 --- a/crates/ra_assists/src/handlers/add_explicit_type.rs +++ b/crates/ra_assists/src/handlers/add_explicit_type.rs @@ -1,5 +1,5 @@ use hir::HirDisplay; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode, LetStmt, NameOwner}, TextRange, }; diff --git a/crates/ra_assists/src/handlers/add_missing_impl_members.rs b/crates/ra_assists/src/handlers/add_missing_impl_members.rs index dd1406228c6..81b61ebf8e4 100644 --- a/crates/ra_assists/src/handlers/add_missing_impl_members.rs +++ b/crates/ra_assists/src/handlers/add_missing_impl_members.rs @@ -1,5 +1,5 @@ use hir::HasSource; -use ra_syntax::{ +use syntax::{ ast::{ self, edit::{self, AstNodeEdit, IndentLevel}, diff --git a/crates/ra_assists/src/handlers/add_turbo_fish.rs b/crates/ra_assists/src/handlers/add_turbo_fish.rs index 537322a72c3..8c7ffae3dde 100644 --- a/crates/ra_assists/src/handlers/add_turbo_fish.rs +++ b/crates/ra_assists/src/handlers/add_turbo_fish.rs @@ -1,5 +1,5 @@ use ra_ide_db::defs::{classify_name_ref, Definition, NameRefClass}; -use ra_syntax::{ast, AstNode, SyntaxKind, T}; +use syntax::{ast, AstNode, SyntaxKind, T}; use test_utils::mark; use crate::{ diff --git a/crates/ra_assists/src/handlers/apply_demorgan.rs b/crates/ra_assists/src/handlers/apply_demorgan.rs index 3ac4aed7d29..1a6fdafda2c 100644 --- a/crates/ra_assists/src/handlers/apply_demorgan.rs +++ b/crates/ra_assists/src/handlers/apply_demorgan.rs @@ -1,4 +1,4 @@ -use ra_syntax::ast::{self, AstNode}; +use syntax::ast::{self, AstNode}; use crate::{utils::invert_boolean_expression, AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/auto_import.rs b/crates/ra_assists/src/handlers/auto_import.rs index 6ec59ec4d4f..e19b197d9e0 100644 --- a/crates/ra_assists/src/handlers/auto_import.rs +++ b/crates/ra_assists/src/handlers/auto_import.rs @@ -6,11 +6,11 @@ use hir::{ Type, }; use ra_ide_db::{imports_locator, RootDatabase}; -use ra_syntax::{ +use rustc_hash::FxHashSet; +use syntax::{ ast::{self, AstNode}, SyntaxNode, }; -use rustc_hash::FxHashSet; use crate::{ utils::insert_use_statement, AssistContext, AssistId, AssistKind, Assists, GroupLabel, diff --git a/crates/ra_assists/src/handlers/change_return_type_to_result.rs b/crates/ra_assists/src/handlers/change_return_type_to_result.rs index b83c944049c..d5a68a24c9e 100644 --- a/crates/ra_assists/src/handlers/change_return_type_to_result.rs +++ b/crates/ra_assists/src/handlers/change_return_type_to_result.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{self, BlockExpr, Expr, LoopBodyOwner}, AstNode, SyntaxNode, }; diff --git a/crates/ra_assists/src/handlers/change_visibility.rs b/crates/ra_assists/src/handlers/change_visibility.rs index 724daa93f41..32dc0537890 100644 --- a/crates/ra_assists/src/handlers/change_visibility.rs +++ b/crates/ra_assists/src/handlers/change_visibility.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{self, NameOwner, VisibilityOwner}, AstNode, SyntaxKind::{CONST, ENUM, FN, MODULE, STATIC, STRUCT, TRAIT, VISIBILITY}, diff --git a/crates/ra_assists/src/handlers/early_return.rs b/crates/ra_assists/src/handlers/early_return.rs index 6816a2709e4..7fd78e9d470 100644 --- a/crates/ra_assists/src/handlers/early_return.rs +++ b/crates/ra_assists/src/handlers/early_return.rs @@ -1,6 +1,6 @@ use std::{iter::once, ops::RangeInclusive}; -use ra_syntax::{ +use syntax::{ algo::replace_children, ast::{ self, diff --git a/crates/ra_assists/src/handlers/expand_glob_import.rs b/crates/ra_assists/src/handlers/expand_glob_import.rs index eb216a81a11..cf34ffaf7f7 100644 --- a/crates/ra_assists/src/handlers/expand_glob_import.rs +++ b/crates/ra_assists/src/handlers/expand_glob_import.rs @@ -3,7 +3,7 @@ use ra_ide_db::{ defs::{classify_name_ref, Definition, NameRefClass}, RootDatabase, }; -use ra_syntax::{algo, ast, match_ast, AstNode, SyntaxNode, SyntaxToken, T}; +use syntax::{algo, ast, match_ast, AstNode, SyntaxNode, SyntaxToken, T}; use crate::{ assist_context::{AssistBuilder, AssistContext, Assists}, diff --git a/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs b/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs index ccec688caee..6e9f2d0fc76 100644 --- a/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs +++ b/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs @@ -2,12 +2,12 @@ use hir::{EnumVariant, Module, ModuleDef, Name}; use ra_db::FileId; use ra_fmt::leading_indent; use ra_ide_db::{defs::Definition, search::Reference, RootDatabase}; -use ra_syntax::{ +use rustc_hash::FxHashSet; +use syntax::{ algo::find_node_at_offset, ast::{self, ArgListOwner, AstNode, NameOwner, VisibilityOwner}, SourceFile, SyntaxNode, TextRange, TextSize, }; -use rustc_hash::FxHashSet; use crate::{ assist_context::AssistBuilder, utils::insert_use_statement, AssistContext, AssistId, diff --git a/crates/ra_assists/src/handlers/extract_variable.rs b/crates/ra_assists/src/handlers/extract_variable.rs index cc62db0c446..d2ae137cdd3 100644 --- a/crates/ra_assists/src/handlers/extract_variable.rs +++ b/crates/ra_assists/src/handlers/extract_variable.rs @@ -1,11 +1,11 @@ -use ra_syntax::{ +use stdx::format_to; +use syntax::{ ast::{self, AstNode}, SyntaxKind::{ BLOCK_EXPR, BREAK_EXPR, CLOSURE_EXPR, COMMENT, LOOP_EXPR, MATCH_ARM, PATH_EXPR, RETURN_EXPR, }, SyntaxNode, }; -use stdx::format_to; use test_utils::mark; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/fill_match_arms.rs b/crates/ra_assists/src/handlers/fill_match_arms.rs index 6698d1a27a2..8f666063727 100644 --- a/crates/ra_assists/src/handlers/fill_match_arms.rs +++ b/crates/ra_assists/src/handlers/fill_match_arms.rs @@ -3,7 +3,7 @@ use std::iter; use hir::{Adt, HasSource, ModuleDef, Semantics}; use itertools::Itertools; use ra_ide_db::RootDatabase; -use ra_syntax::ast::{self, make, AstNode, MatchArm, NameOwner, Pat}; +use syntax::ast::{self, make, AstNode, MatchArm, NameOwner, Pat}; use test_utils::mark; use crate::{ diff --git a/crates/ra_assists/src/handlers/fix_visibility.rs b/crates/ra_assists/src/handlers/fix_visibility.rs index a19dbf33f6b..b6cc1a3204c 100644 --- a/crates/ra_assists/src/handlers/fix_visibility.rs +++ b/crates/ra_assists/src/handlers/fix_visibility.rs @@ -1,6 +1,6 @@ use hir::{db::HirDatabase, HasSource, HasVisibility, PathResolution}; use ra_db::FileId; -use ra_syntax::{ast, AstNode, TextRange, TextSize}; +use syntax::{ast, AstNode, TextRange, TextSize}; use crate::{utils::vis_offset, AssistContext, AssistId, AssistKind, Assists}; use ast::VisibilityOwner; diff --git a/crates/ra_assists/src/handlers/flip_binexpr.rs b/crates/ra_assists/src/handlers/flip_binexpr.rs index 3cd5326505e..404f06133d7 100644 --- a/crates/ra_assists/src/handlers/flip_binexpr.rs +++ b/crates/ra_assists/src/handlers/flip_binexpr.rs @@ -1,4 +1,4 @@ -use ra_syntax::ast::{AstNode, BinExpr, BinOp}; +use syntax::ast::{AstNode, BinExpr, BinOp}; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/flip_comma.rs b/crates/ra_assists/src/handlers/flip_comma.rs index 55a971dc77e..5c69db53e56 100644 --- a/crates/ra_assists/src/handlers/flip_comma.rs +++ b/crates/ra_assists/src/handlers/flip_comma.rs @@ -1,4 +1,4 @@ -use ra_syntax::{algo::non_trivia_sibling, Direction, T}; +use syntax::{algo::non_trivia_sibling, Direction, T}; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/flip_trait_bound.rs b/crates/ra_assists/src/handlers/flip_trait_bound.rs index 1234f4d2966..347e79b1dad 100644 --- a/crates/ra_assists/src/handlers/flip_trait_bound.rs +++ b/crates/ra_assists/src/handlers/flip_trait_bound.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ algo::non_trivia_sibling, ast::{self, AstNode}, Direction, T, diff --git a/crates/ra_assists/src/handlers/generate_derive.rs b/crates/ra_assists/src/handlers/generate_derive.rs index 90ece9fab05..314504e15ce 100644 --- a/crates/ra_assists/src/handlers/generate_derive.rs +++ b/crates/ra_assists/src/handlers/generate_derive.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{self, AstNode, AttrsOwner}, SyntaxKind::{COMMENT, WHITESPACE}, TextSize, diff --git a/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs b/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs index 4c1aef8a21f..302b6b67d49 100644 --- a/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs +++ b/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs @@ -1,5 +1,5 @@ use ra_ide_db::RootDatabase; -use ra_syntax::ast::{self, AstNode, NameOwner}; +use syntax::ast::{self, AstNode, NameOwner}; use test_utils::mark; use crate::{utils::FamousDefs, AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/generate_function.rs b/crates/ra_assists/src/handlers/generate_function.rs index acc97e64820..b5df4410197 100644 --- a/crates/ra_assists/src/handlers/generate_function.rs +++ b/crates/ra_assists/src/handlers/generate_function.rs @@ -1,6 +1,7 @@ use hir::HirDisplay; use ra_db::FileId; -use ra_syntax::{ +use rustc_hash::{FxHashMap, FxHashSet}; +use syntax::{ ast::{ self, edit::{AstNodeEdit, IndentLevel}, @@ -8,7 +9,6 @@ use ra_syntax::{ }, SyntaxKind, SyntaxNode, TextSize, }; -use rustc_hash::{FxHashMap, FxHashSet}; use crate::{ assist_config::SnippetCap, diff --git a/crates/ra_assists/src/handlers/generate_impl.rs b/crates/ra_assists/src/handlers/generate_impl.rs index 7162dc18486..9989109b5ae 100644 --- a/crates/ra_assists/src/handlers/generate_impl.rs +++ b/crates/ra_assists/src/handlers/generate_impl.rs @@ -1,6 +1,6 @@ use itertools::Itertools; -use ra_syntax::ast::{self, AstNode, GenericParamsOwner, NameOwner}; use stdx::format_to; +use syntax::ast::{self, AstNode, GenericParamsOwner, NameOwner}; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/generate_new.rs b/crates/ra_assists/src/handlers/generate_new.rs index 32dfed274ad..7db10f27686 100644 --- a/crates/ra_assists/src/handlers/generate_new.rs +++ b/crates/ra_assists/src/handlers/generate_new.rs @@ -1,10 +1,10 @@ use hir::Adt; use itertools::Itertools; -use ra_syntax::{ +use stdx::format_to; +use syntax::{ ast::{self, AstNode, GenericParamsOwner, NameOwner, StructKind, VisibilityOwner}, T, }; -use stdx::format_to; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/inline_local_variable.rs b/crates/ra_assists/src/handlers/inline_local_variable.rs index 3c58020f803..5315923206d 100644 --- a/crates/ra_assists/src/handlers/inline_local_variable.rs +++ b/crates/ra_assists/src/handlers/inline_local_variable.rs @@ -1,5 +1,5 @@ use ra_ide_db::defs::Definition; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode, AstToken}, TextRange, }; diff --git a/crates/ra_assists/src/handlers/introduce_named_lifetime.rs b/crates/ra_assists/src/handlers/introduce_named_lifetime.rs index fbaf3c06b52..5f623e5f7ad 100644 --- a/crates/ra_assists/src/handlers/introduce_named_lifetime.rs +++ b/crates/ra_assists/src/handlers/introduce_named_lifetime.rs @@ -1,8 +1,8 @@ -use ra_syntax::{ +use rustc_hash::FxHashSet; +use syntax::{ ast::{self, GenericParamsOwner, NameOwner}, AstNode, SyntaxKind, TextRange, TextSize, }; -use rustc_hash::FxHashSet; use crate::{assist_context::AssistBuilder, AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/invert_if.rs b/crates/ra_assists/src/handlers/invert_if.rs index bbe3f364360..f0e04753891 100644 --- a/crates/ra_assists/src/handlers/invert_if.rs +++ b/crates/ra_assists/src/handlers/invert_if.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{self, AstNode}, T, }; diff --git a/crates/ra_assists/src/handlers/merge_imports.rs b/crates/ra_assists/src/handlers/merge_imports.rs index c775fe25c52..9c5c6eda72b 100644 --- a/crates/ra_assists/src/handlers/merge_imports.rs +++ b/crates/ra_assists/src/handlers/merge_imports.rs @@ -1,6 +1,6 @@ use std::iter::successors; -use ra_syntax::{ +use syntax::{ algo::{neighbor, skip_trivia_token, SyntaxRewriter}, ast::{self, edit::AstNodeEdit, make}, AstNode, Direction, InsertPosition, SyntaxElement, T, diff --git a/crates/ra_assists/src/handlers/merge_match_arms.rs b/crates/ra_assists/src/handlers/merge_match_arms.rs index 56329228233..c347eb40efa 100644 --- a/crates/ra_assists/src/handlers/merge_match_arms.rs +++ b/crates/ra_assists/src/handlers/merge_match_arms.rs @@ -1,6 +1,6 @@ use std::iter::successors; -use ra_syntax::{ +use syntax::{ algo::neighbor, ast::{self, AstNode}, Direction, diff --git a/crates/ra_assists/src/handlers/move_bounds.rs b/crates/ra_assists/src/handlers/move_bounds.rs index 6d394443ebf..e2e461520dc 100644 --- a/crates/ra_assists/src/handlers/move_bounds.rs +++ b/crates/ra_assists/src/handlers/move_bounds.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{self, edit::AstNodeEdit, make, AstNode, NameOwner, TypeBoundsOwner}, match_ast, SyntaxKind::*, diff --git a/crates/ra_assists/src/handlers/move_guard.rs b/crates/ra_assists/src/handlers/move_guard.rs index 4060d34c641..c62ebc30618 100644 --- a/crates/ra_assists/src/handlers/move_guard.rs +++ b/crates/ra_assists/src/handlers/move_guard.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{AstNode, IfExpr, MatchArm}, SyntaxKind::WHITESPACE, }; diff --git a/crates/ra_assists/src/handlers/raw_string.rs b/crates/ra_assists/src/handlers/raw_string.rs index 4c797178f1c..9ddd116e015 100644 --- a/crates/ra_assists/src/handlers/raw_string.rs +++ b/crates/ra_assists/src/handlers/raw_string.rs @@ -1,6 +1,6 @@ use std::borrow::Cow; -use ra_syntax::{ +use syntax::{ ast::{self, HasQuotes, HasStringValue}, AstToken, SyntaxKind::{RAW_STRING, STRING}, diff --git a/crates/ra_assists/src/handlers/remove_dbg.rs b/crates/ra_assists/src/handlers/remove_dbg.rs index 9430ce1b5b8..f3dcca53481 100644 --- a/crates/ra_assists/src/handlers/remove_dbg.rs +++ b/crates/ra_assists/src/handlers/remove_dbg.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{self, AstNode}, TextRange, TextSize, T, }; diff --git a/crates/ra_assists/src/handlers/remove_mut.rs b/crates/ra_assists/src/handlers/remove_mut.rs index ef55c354ee5..44f41daa92d 100644 --- a/crates/ra_assists/src/handlers/remove_mut.rs +++ b/crates/ra_assists/src/handlers/remove_mut.rs @@ -1,4 +1,4 @@ -use ra_syntax::{SyntaxKind, TextRange, T}; +use syntax::{SyntaxKind, TextRange, T}; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/reorder_fields.rs b/crates/ra_assists/src/handlers/reorder_fields.rs index c9b743a06b3..013720dfcbe 100644 --- a/crates/ra_assists/src/handlers/reorder_fields.rs +++ b/crates/ra_assists/src/handlers/reorder_fields.rs @@ -3,7 +3,7 @@ use rustc_hash::FxHashMap; use hir::{Adt, ModuleDef, PathResolution, Semantics, Struct}; use ra_ide_db::RootDatabase; -use ra_syntax::{algo, ast, match_ast, AstNode, SyntaxKind, SyntaxKind::*, SyntaxNode}; +use syntax::{algo, ast, match_ast, AstNode, SyntaxKind, SyntaxKind::*, SyntaxNode}; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/replace_if_let_with_match.rs b/crates/ra_assists/src/handlers/replace_if_let_with_match.rs index ecafb74a1e1..2442f049b65 100644 --- a/crates/ra_assists/src/handlers/replace_if_let_with_match.rs +++ b/crates/ra_assists/src/handlers/replace_if_let_with_match.rs @@ -1,5 +1,5 @@ use ra_fmt::unwrap_trivial_block; -use ra_syntax::{ +use syntax::{ ast::{ self, edit::{AstNodeEdit, IndentLevel}, diff --git a/crates/ra_assists/src/handlers/replace_let_with_if_let.rs b/crates/ra_assists/src/handlers/replace_let_with_if_let.rs index e4d436decc8..ed6d0c29be8 100644 --- a/crates/ra_assists/src/handlers/replace_let_with_if_let.rs +++ b/crates/ra_assists/src/handlers/replace_let_with_if_let.rs @@ -1,6 +1,6 @@ use std::iter::once; -use ra_syntax::{ +use syntax::{ ast::{ self, edit::{AstNodeEdit, IndentLevel}, diff --git a/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs b/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs index da0a860c599..011bf1106d1 100644 --- a/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs +++ b/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs @@ -1,5 +1,5 @@ use hir; -use ra_syntax::{algo::SyntaxRewriter, ast, match_ast, AstNode, SmolStr, SyntaxNode}; +use syntax::{algo::SyntaxRewriter, ast, match_ast, AstNode, SmolStr, SyntaxNode}; use crate::{ utils::{find_insert_use_container, insert_use_statement}, diff --git a/crates/ra_assists/src/handlers/replace_unwrap_with_match.rs b/crates/ra_assists/src/handlers/replace_unwrap_with_match.rs index d69f2c1b0e2..9705f11b76b 100644 --- a/crates/ra_assists/src/handlers/replace_unwrap_with_match.rs +++ b/crates/ra_assists/src/handlers/replace_unwrap_with_match.rs @@ -1,6 +1,6 @@ use std::iter; -use ra_syntax::{ +use syntax::{ ast::{ self, edit::{AstNodeEdit, IndentLevel}, diff --git a/crates/ra_assists/src/handlers/split_import.rs b/crates/ra_assists/src/handlers/split_import.rs index 4ca5c3ca14c..15e67eaa19f 100644 --- a/crates/ra_assists/src/handlers/split_import.rs +++ b/crates/ra_assists/src/handlers/split_import.rs @@ -1,6 +1,6 @@ use std::iter::successors; -use ra_syntax::{ast, AstNode, T}; +use syntax::{ast, AstNode, T}; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/unwrap_block.rs b/crates/ra_assists/src/handlers/unwrap_block.rs index 8b38695a948..2879090b867 100644 --- a/crates/ra_assists/src/handlers/unwrap_block.rs +++ b/crates/ra_assists/src/handlers/unwrap_block.rs @@ -1,5 +1,5 @@ use ra_fmt::unwrap_trivial_block; -use ra_syntax::{ +use syntax::{ ast::{ self, edit::{AstNodeEdit, IndentLevel}, diff --git a/crates/ra_assists/src/lib.rs b/crates/ra_assists/src/lib.rs index 890996a68d9..e2ef561fee2 100644 --- a/crates/ra_assists/src/lib.rs +++ b/crates/ra_assists/src/lib.rs @@ -20,7 +20,7 @@ pub mod ast_transform; use hir::Semantics; use ra_db::FileRange; use ra_ide_db::{source_change::SourceChange, RootDatabase}; -use ra_syntax::TextRange; +use syntax::TextRange; pub(crate) use crate::assist_context::{AssistContext, Assists}; diff --git a/crates/ra_assists/src/tests.rs b/crates/ra_assists/src/tests.rs index e738364220d..1ae7aaa09be 100644 --- a/crates/ra_assists/src/tests.rs +++ b/crates/ra_assists/src/tests.rs @@ -3,7 +3,7 @@ mod generated; use hir::Semantics; use ra_db::{fixture::WithFixture, FileId, FileRange, SourceDatabaseExt}; use ra_ide_db::RootDatabase; -use ra_syntax::TextRange; +use syntax::TextRange; use test_utils::{assert_eq_text, extract_offset, extract_range}; use crate::{handlers::Handler, Assist, AssistConfig, AssistContext, AssistKind, Assists}; diff --git a/crates/ra_assists/src/utils.rs b/crates/ra_assists/src/utils.rs index 0de6fdf3fb8..6d85661c461 100644 --- a/crates/ra_assists/src/utils.rs +++ b/crates/ra_assists/src/utils.rs @@ -5,13 +5,13 @@ use std::{iter, ops}; use hir::{Adt, Crate, Enum, ScopeDef, Semantics, Trait, Type}; use ra_ide_db::RootDatabase; -use ra_syntax::{ +use rustc_hash::FxHashSet; +use syntax::{ ast::{self, make, NameOwner}, AstNode, SyntaxKind::*, SyntaxNode, TextSize, T, }; -use rustc_hash::FxHashSet; use crate::assist_config::SnippetCap; diff --git a/crates/ra_assists/src/utils/insert_use.rs b/crates/ra_assists/src/utils/insert_use.rs index 13dbe1919c1..f89c288da45 100644 --- a/crates/ra_assists/src/utils/insert_use.rs +++ b/crates/ra_assists/src/utils/insert_use.rs @@ -4,7 +4,7 @@ use either::Either; use hir::{self, ModPath}; -use ra_syntax::{ +use syntax::{ ast::{self, NameOwner, VisibilityOwner}, AstNode, Direction, SmolStr, SyntaxKind::{PATH, PATH_SEGMENT}, diff --git a/crates/ra_cfg/Cargo.toml b/crates/ra_cfg/Cargo.toml index 770a407428f..cb0d2b9d734 100644 --- a/crates/ra_cfg/Cargo.toml +++ b/crates/ra_cfg/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] rustc-hash = "1.1.0" -ra_syntax = { path = "../ra_syntax" } +syntax = { path = "../syntax" } tt = { path = "../tt" } [dev-dependencies] diff --git a/crates/ra_cfg/src/cfg_expr.rs b/crates/ra_cfg/src/cfg_expr.rs index f48928aee87..940091465c3 100644 --- a/crates/ra_cfg/src/cfg_expr.rs +++ b/crates/ra_cfg/src/cfg_expr.rs @@ -4,7 +4,7 @@ use std::slice::Iter as SliceIter; -use ra_syntax::SmolStr; +use syntax::SmolStr; #[derive(Debug, Clone, PartialEq, Eq)] pub enum CfgExpr { @@ -87,7 +87,7 @@ mod tests { use super::*; use mbe::{ast_to_token_tree, TokenMap}; - use ra_syntax::ast::{self, AstNode}; + use syntax::ast::{self, AstNode}; fn get_token_tree_generated(input: &str) -> (tt::Subtree, TokenMap) { let source_file = ast::SourceFile::parse(input).ok().unwrap(); diff --git a/crates/ra_cfg/src/lib.rs b/crates/ra_cfg/src/lib.rs index cd5a0a7b640..7e025143bd4 100644 --- a/crates/ra_cfg/src/lib.rs +++ b/crates/ra_cfg/src/lib.rs @@ -2,8 +2,8 @@ mod cfg_expr; -use ra_syntax::SmolStr; use rustc_hash::FxHashSet; +use syntax::SmolStr; pub use cfg_expr::CfgExpr; diff --git a/crates/ra_db/Cargo.toml b/crates/ra_db/Cargo.toml index 47a0f6248f2..156ea1ee4b5 100644 --- a/crates/ra_db/Cargo.toml +++ b/crates/ra_db/Cargo.toml @@ -12,7 +12,7 @@ doctest = false salsa = "0.15.2" rustc-hash = "1.1.0" -ra_syntax = { path = "../ra_syntax" } +syntax = { path = "../syntax" } ra_cfg = { path = "../ra_cfg" } profile = { path = "../profile" } tt = { path = "../tt" } diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs index 02a1abee0f0..12a86349971 100644 --- a/crates/ra_db/src/input.rs +++ b/crates/ra_db/src/input.rs @@ -9,8 +9,8 @@ use std::{fmt, iter::FromIterator, ops, str::FromStr, sync::Arc}; use ra_cfg::CfgOptions; -use ra_syntax::SmolStr; use rustc_hash::{FxHashMap, FxHashSet}; +use syntax::SmolStr; use tt::TokenExpander; use vfs::file_set::FileSet; diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs index 795d7d2b613..73ac243d66b 100644 --- a/crates/ra_db/src/lib.rs +++ b/crates/ra_db/src/lib.rs @@ -5,8 +5,8 @@ pub mod fixture; use std::{panic, sync::Arc}; -use ra_syntax::{ast, Parse, SourceFile, TextRange, TextSize}; use rustc_hash::FxHashSet; +use syntax::{ast, Parse, SourceFile, TextRange, TextSize}; pub use crate::{ cancellation::Canceled, diff --git a/crates/ra_fmt/Cargo.toml b/crates/ra_fmt/Cargo.toml index b4ef93f2b27..d42ca62be27 100644 --- a/crates/ra_fmt/Cargo.toml +++ b/crates/ra_fmt/Cargo.toml @@ -12,4 +12,4 @@ doctest = false [dependencies] itertools = "0.9.0" -ra_syntax = { path = "../ra_syntax" } +syntax = { path = "../syntax" } diff --git a/crates/ra_fmt/src/lib.rs b/crates/ra_fmt/src/lib.rs index f910ded9da6..d0bf0593f7a 100644 --- a/crates/ra_fmt/src/lib.rs +++ b/crates/ra_fmt/src/lib.rs @@ -3,7 +3,7 @@ use std::iter::successors; use itertools::Itertools; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode, AstToken}, SmolStr, SyntaxKind, SyntaxKind::*, diff --git a/crates/ra_hir/Cargo.toml b/crates/ra_hir/Cargo.toml index 903406e849c..ee5622a7d99 100644 --- a/crates/ra_hir/Cargo.toml +++ b/crates/ra_hir/Cargo.toml @@ -17,7 +17,7 @@ arrayvec = "0.5.1" itertools = "0.9.0" stdx = { path = "../stdx" } -ra_syntax = { path = "../ra_syntax" } +syntax = { path = "../syntax" } ra_db = { path = "../ra_db" } profile = { path = "../profile" } hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 5c0c6184a70..98724c1462f 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs @@ -31,12 +31,12 @@ use hir_ty::{ InEnvironment, Substs, TraitEnvironment, Ty, TyDefId, TypeCtor, }; use ra_db::{CrateId, Edition, FileId}; -use ra_syntax::{ +use rustc_hash::FxHashSet; +use stdx::impl_from; +use syntax::{ ast::{self, AttrsOwner, NameOwner}, AstNode, }; -use rustc_hash::FxHashSet; -use stdx::impl_from; use crate::{ db::{DefDatabase, HirDatabase}, diff --git a/crates/ra_hir/src/has_source.rs b/crates/ra_hir/src/has_source.rs index 1c691d96196..a50d4ff0290 100644 --- a/crates/ra_hir/src/has_source.rs +++ b/crates/ra_hir/src/has_source.rs @@ -6,7 +6,7 @@ use hir_def::{ src::{HasChildSource, HasSource as _}, Lookup, VariantId, }; -use ra_syntax::ast; +use syntax::ast; use crate::{ db::HirDatabase, Const, Enum, EnumVariant, Field, FieldSource, Function, ImplDef, MacroDef, diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index 7e3ec6315e1..2e0ef440851 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs @@ -12,11 +12,11 @@ use hir_expand::{hygiene::Hygiene, name::AsName, ExpansionInfo}; use hir_ty::associated_type_shorthand_candidates; use itertools::Itertools; use ra_db::{FileId, FileRange}; -use ra_syntax::{ +use rustc_hash::{FxHashMap, FxHashSet}; +use syntax::{ algo::{find_node_at_offset, skip_trivia_token}, ast, AstNode, Direction, SyntaxNode, SyntaxToken, TextRange, TextSize, }; -use rustc_hash::{FxHashMap, FxHashSet}; use crate::{ db::HirDatabase, diff --git a/crates/ra_hir/src/semantics/source_to_def.rs b/crates/ra_hir/src/semantics/source_to_def.rs index a6ff8b0bfcb..ab2fd0957fb 100644 --- a/crates/ra_hir/src/semantics/source_to_def.rs +++ b/crates/ra_hir/src/semantics/source_to_def.rs @@ -10,12 +10,12 @@ use hir_def::{ }; use hir_expand::{name::AsName, AstId, MacroDefKind}; use ra_db::FileId; -use ra_syntax::{ +use rustc_hash::FxHashMap; +use stdx::impl_from; +use syntax::{ ast::{self, NameOwner}, match_ast, AstNode, SyntaxNode, }; -use rustc_hash::FxHashMap; -use stdx::impl_from; use crate::{db::HirDatabase, InFile, MacroDefId}; diff --git a/crates/ra_hir/src/source_analyzer.rs b/crates/ra_hir/src/source_analyzer.rs index d3d62debfdd..6b2de3a06f7 100644 --- a/crates/ra_hir/src/source_analyzer.rs +++ b/crates/ra_hir/src/source_analyzer.rs @@ -21,7 +21,7 @@ use hir_ty::{ diagnostics::{record_literal_missing_fields, record_pattern_missing_fields}, InferenceResult, Substs, Ty, }; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode}, SyntaxNode, TextRange, TextSize, }; diff --git a/crates/ra_hir_def/Cargo.toml b/crates/ra_hir_def/Cargo.toml index 1a080a8b4bd..38129782feb 100644 --- a/crates/ra_hir_def/Cargo.toml +++ b/crates/ra_hir_def/Cargo.toml @@ -24,7 +24,7 @@ stdx = { path = "../stdx" } arena = { path = "../arena" } ra_db = { path = "../ra_db" } -ra_syntax = { path = "../ra_syntax" } +syntax = { path = "../syntax" } profile = { path = "../profile" } hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } test_utils = { path = "../test_utils" } diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs index 896a69ca802..c83219d771e 100644 --- a/crates/ra_hir_def/src/adt.rs +++ b/crates/ra_hir_def/src/adt.rs @@ -8,7 +8,7 @@ use hir_expand::{ name::{AsName, Name}, InFile, }; -use ra_syntax::ast::{self, NameOwner, VisibilityOwner}; +use syntax::ast::{self, NameOwner, VisibilityOwner}; use tt::{Delimiter, DelimiterKind, Leaf, Subtree, TokenTree}; use crate::{ diff --git a/crates/ra_hir_def/src/attr.rs b/crates/ra_hir_def/src/attr.rs index 050832ce01b..36dc8b8166e 100644 --- a/crates/ra_hir_def/src/attr.rs +++ b/crates/ra_hir_def/src/attr.rs @@ -6,7 +6,7 @@ use either::Either; use hir_expand::{hygiene::Hygiene, AstId, InFile}; use mbe::ast_to_token_tree; use ra_cfg::{CfgExpr, CfgOptions}; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode, AttrsOwner}, SmolStr, }; diff --git a/crates/ra_hir_def/src/body.rs b/crates/ra_hir_def/src/body.rs index 1deb1a8371a..7c33966a713 100644 --- a/crates/ra_hir_def/src/body.rs +++ b/crates/ra_hir_def/src/body.rs @@ -11,8 +11,8 @@ use either::Either; use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroDefId}; use ra_cfg::CfgOptions; use ra_db::CrateId; -use ra_syntax::{ast, AstNode, AstPtr}; use rustc_hash::FxHashMap; +use syntax::{ast, AstNode, AstPtr}; use test_utils::mark; pub(crate) use lower::LowerCtx; diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index 4823930062d..a26251cdeb5 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs @@ -10,14 +10,14 @@ use hir_expand::{ name::{name, AsName, Name}, HirFileId, MacroDefId, MacroDefKind, }; -use ra_syntax::{ +use rustc_hash::FxHashMap; +use syntax::{ ast::{ self, ArgListOwner, ArrayExprKind, AstChildren, LiteralKind, LoopBodyOwner, NameOwner, SlicePatComponents, }, AstNode, AstPtr, }; -use rustc_hash::FxHashMap; use test_utils::mark; use crate::{ diff --git a/crates/ra_hir_def/src/body/scope.rs b/crates/ra_hir_def/src/body/scope.rs index f783e18b546..079f14c2980 100644 --- a/crates/ra_hir_def/src/body/scope.rs +++ b/crates/ra_hir_def/src/body/scope.rs @@ -171,7 +171,7 @@ fn compute_expr_scopes(expr: ExprId, body: &Body, scopes: &mut ExprScopes, scope mod tests { use hir_expand::{name::AsName, InFile}; use ra_db::{fixture::WithFixture, FileId, SourceDatabase}; - use ra_syntax::{algo::find_node_at_offset, ast, AstNode}; + use syntax::{algo::find_node_at_offset, ast, AstNode}; use test_utils::{assert_eq_text, extract_offset, mark}; use crate::{db::DefDatabase, test_db::TestDB, FunctionId, ModuleDefId}; diff --git a/crates/ra_hir_def/src/data.rs b/crates/ra_hir_def/src/data.rs index 758c12f3316..9a8eb4edec7 100644 --- a/crates/ra_hir_def/src/data.rs +++ b/crates/ra_hir_def/src/data.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use hir_expand::{name::Name, InFile}; -use ra_syntax::ast; +use syntax::ast; use crate::{ attr::Attrs, diff --git a/crates/ra_hir_def/src/db.rs b/crates/ra_hir_def/src/db.rs index 1dd4197f85d..a925548b58c 100644 --- a/crates/ra_hir_def/src/db.rs +++ b/crates/ra_hir_def/src/db.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use hir_expand::{db::AstDatabase, HirFileId}; use ra_db::{salsa, CrateId, SourceDatabase, Upcast}; -use ra_syntax::SmolStr; +use syntax::SmolStr; use crate::{ adt::{EnumData, StructData}, diff --git a/crates/ra_hir_def/src/diagnostics.rs b/crates/ra_hir_def/src/diagnostics.rs index 71d177070dd..2e38a978f82 100644 --- a/crates/ra_hir_def/src/diagnostics.rs +++ b/crates/ra_hir_def/src/diagnostics.rs @@ -3,7 +3,7 @@ use std::any::Any; use hir_expand::diagnostics::Diagnostic; -use ra_syntax::{ast, AstPtr, SyntaxNodePtr}; +use syntax::{ast, AstPtr, SyntaxNodePtr}; use hir_expand::{HirFileId, InFile}; diff --git a/crates/ra_hir_def/src/docs.rs b/crates/ra_hir_def/src/docs.rs index 2630b3d895e..e9a02b11bb6 100644 --- a/crates/ra_hir_def/src/docs.rs +++ b/crates/ra_hir_def/src/docs.rs @@ -6,7 +6,7 @@ use std::sync::Arc; use either::Either; -use ra_syntax::ast; +use syntax::ast; use crate::{ db::DefDatabase, diff --git a/crates/ra_hir_def/src/expr.rs b/crates/ra_hir_def/src/expr.rs index befe41c2aea..c94b3a36f57 100644 --- a/crates/ra_hir_def/src/expr.rs +++ b/crates/ra_hir_def/src/expr.rs @@ -14,7 +14,7 @@ use arena::{Idx, RawId}; use hir_expand::name::Name; -use ra_syntax::ast::RangeOp; +use syntax::ast::RangeOp; use crate::{ builtin_type::{BuiltinFloat, BuiltinInt}, @@ -197,7 +197,7 @@ pub enum ArithOp { BitAnd, } -pub use ra_syntax::ast::PrefixOp as UnaryOp; +pub use syntax::ast::PrefixOp as UnaryOp; #[derive(Debug, Clone, Eq, PartialEq)] pub enum Array { ElementList(Vec), diff --git a/crates/ra_hir_def/src/find_path.rs b/crates/ra_hir_def/src/find_path.rs index 46e70eb48ad..5099f417d3d 100644 --- a/crates/ra_hir_def/src/find_path.rs +++ b/crates/ra_hir_def/src/find_path.rs @@ -294,7 +294,7 @@ fn find_local_import_locations( mod tests { use hir_expand::hygiene::Hygiene; use ra_db::fixture::WithFixture; - use ra_syntax::ast::AstNode; + use syntax::ast::AstNode; use test_utils::mark; use crate::test_db::TestDB; @@ -307,12 +307,9 @@ mod tests { fn check_found_path(ra_fixture: &str, path: &str) { let (db, pos) = TestDB::with_position(ra_fixture); let module = db.module_for_file(pos.file_id); - let parsed_path_file = ra_syntax::SourceFile::parse(&format!("use {};", path)); - let ast_path = parsed_path_file - .syntax_node() - .descendants() - .find_map(ra_syntax::ast::Path::cast) - .unwrap(); + let parsed_path_file = syntax::SourceFile::parse(&format!("use {};", path)); + let ast_path = + parsed_path_file.syntax_node().descendants().find_map(syntax::ast::Path::cast).unwrap(); let mod_path = ModPath::from_src(ast_path, &Hygiene::new_unhygienic()).unwrap(); let crate_def_map = db.crate_def_map(module.krate); @@ -441,12 +438,12 @@ mod tests { // already in scope. check_found_path( r#" - //- /main.rs crate:main deps:ra_syntax + //- /main.rs crate:main deps:syntax - use ra_syntax::ast; + use syntax::ast; <|> - //- /lib.rs crate:ra_syntax + //- /lib.rs crate:syntax pub mod ast { pub enum ModuleItem { A, B, C, @@ -458,18 +455,18 @@ mod tests { check_found_path( r#" - //- /main.rs crate:main deps:ra_syntax + //- /main.rs crate:main deps:syntax <|> - //- /lib.rs crate:ra_syntax + //- /lib.rs crate:syntax pub mod ast { pub enum ModuleItem { A, B, C, } } "#, - "ra_syntax::ast::ModuleItem", + "syntax::ast::ModuleItem", ); } diff --git a/crates/ra_hir_def/src/generics.rs b/crates/ra_hir_def/src/generics.rs index 0e06a0b12e8..4476f031620 100644 --- a/crates/ra_hir_def/src/generics.rs +++ b/crates/ra_hir_def/src/generics.rs @@ -11,7 +11,7 @@ use hir_expand::{ InFile, }; use ra_db::FileId; -use ra_syntax::ast::{self, GenericParamsOwner, NameOwner, TypeBoundsOwner}; +use syntax::ast::{self, GenericParamsOwner, NameOwner, TypeBoundsOwner}; use crate::{ body::LowerCtx, diff --git a/crates/ra_hir_def/src/import_map.rs b/crates/ra_hir_def/src/import_map.rs index 3a9eec8873c..431ff30abde 100644 --- a/crates/ra_hir_def/src/import_map.rs +++ b/crates/ra_hir_def/src/import_map.rs @@ -5,9 +5,9 @@ use std::{cmp::Ordering, fmt, hash::BuildHasherDefault, sync::Arc}; use fst::{self, Streamer}; use indexmap::{map::Entry, IndexMap}; use ra_db::CrateId; -use ra_syntax::SmolStr; use rustc_hash::{FxHashMap, FxHasher}; use smallvec::SmallVec; +use syntax::SmolStr; use crate::{ db::DefDatabase, diff --git a/crates/ra_hir_def/src/item_tree.rs b/crates/ra_hir_def/src/item_tree.rs index 104966c7f24..e14722caebb 100644 --- a/crates/ra_hir_def/src/item_tree.rs +++ b/crates/ra_hir_def/src/item_tree.rs @@ -22,9 +22,9 @@ use hir_expand::{ name::{name, AsName, Name}, HirFileId, InFile, }; -use ra_syntax::{ast, match_ast}; use rustc_hash::FxHashMap; use smallvec::SmallVec; +use syntax::{ast, match_ast}; use test_utils::mark; use crate::{ diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs index 4523d0fbbf5..391ab5d3928 100644 --- a/crates/ra_hir_def/src/item_tree/lower.rs +++ b/crates/ra_hir_def/src/item_tree/lower.rs @@ -4,11 +4,11 @@ use std::{collections::hash_map::Entry, mem, sync::Arc}; use arena::map::ArenaMap; use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, HirFileId}; -use ra_syntax::{ +use smallvec::SmallVec; +use syntax::{ ast::{self, ModuleItemOwner}, SyntaxNode, }; -use smallvec::SmallVec; use crate::{ attr::Attrs, diff --git a/crates/ra_hir_def/src/item_tree/tests.rs b/crates/ra_hir_def/src/item_tree/tests.rs index a81497fa8a9..6c843e339a6 100644 --- a/crates/ra_hir_def/src/item_tree/tests.rs +++ b/crates/ra_hir_def/src/item_tree/tests.rs @@ -1,10 +1,10 @@ use expect::{expect, Expect}; use hir_expand::{db::AstDatabase, HirFileId, InFile}; use ra_db::fixture::WithFixture; -use ra_syntax::{ast, AstNode}; use rustc_hash::FxHashSet; use std::sync::Arc; use stdx::format_to; +use syntax::{ast, AstNode}; use crate::{db::DefDatabase, test_db::TestDB}; @@ -228,31 +228,31 @@ fn smoke() { top-level items: #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_on_use"))] }, input: None }]) }] - Import { path: ModPath { kind: Plain, segments: [Name(Text("a"))] }, alias: None, visibility: RawVisibilityId("pub(self)"), is_glob: false, is_prelude: false, ast_id: FileAstId::(0) } + Import { path: ModPath { kind: Plain, segments: [Name(Text("a"))] }, alias: None, visibility: RawVisibilityId("pub(self)"), is_glob: false, is_prelude: false, ast_id: FileAstId::(0) } #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_on_use"))] }, input: None }]) }] - Import { path: ModPath { kind: Plain, segments: [Name(Text("b"))] }, alias: None, visibility: RawVisibilityId("pub(self)"), is_glob: true, is_prelude: false, ast_id: FileAstId::(0) } + Import { path: ModPath { kind: Plain, segments: [Name(Text("b"))] }, alias: None, visibility: RawVisibilityId("pub(self)"), is_glob: true, is_prelude: false, ast_id: FileAstId::(0) } #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("ext_crate"))] }, input: None }]) }] - ExternCrate { path: ModPath { kind: Plain, segments: [Name(Text("krate"))] }, alias: None, visibility: RawVisibilityId("pub(self)"), is_macro_use: false, ast_id: FileAstId::(1) } + ExternCrate { path: ModPath { kind: Plain, segments: [Name(Text("krate"))] }, alias: None, visibility: RawVisibilityId("pub(self)"), is_macro_use: false, ast_id: FileAstId::(1) } #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("on_trait"))] }, input: None }]) }] - Trait { name: Name(Text("Tr")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(0), auto: false, items: [TypeAlias(Idx::(0)), Const(Idx::(0)), Function(Idx::(0)), Function(Idx::(1))], ast_id: FileAstId::(2) } + Trait { name: Name(Text("Tr")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(0), auto: false, items: [TypeAlias(Idx::(0)), Const(Idx::(0)), Function(Idx::(0)), Function(Idx::(1))], ast_id: FileAstId::(2) } > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_ty"))] }, input: None }]) }] - > TypeAlias { name: Name(Text("AssocTy")), visibility: RawVisibilityId("pub(self)"), bounds: [Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Tr"))] }, generic_args: [Some(GenericArgs { args: [Type(Tuple([]))], has_self_type: false, bindings: [] })] })], generic_params: GenericParamsId(4294967295), type_ref: None, ast_id: FileAstId::(8) } + > TypeAlias { name: Name(Text("AssocTy")), visibility: RawVisibilityId("pub(self)"), bounds: [Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Tr"))] }, generic_args: [Some(GenericArgs { args: [Type(Tuple([]))], has_self_type: false, bindings: [] })] })], generic_params: GenericParamsId(4294967295), type_ref: None, ast_id: FileAstId::(8) } > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_const"))] }, input: None }]) }] - > Const { name: Some(Name(Text("CONST"))), visibility: RawVisibilityId("pub(self)"), type_ref: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("u8"))] }, generic_args: [None] }), ast_id: FileAstId::(9) } + > Const { name: Some(Name(Text("CONST"))), visibility: RawVisibilityId("pub(self)"), type_ref: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("u8"))] }, generic_args: [None] }), ast_id: FileAstId::(9) } > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_method"))] }, input: None }]) }] - > Function { name: Name(Text("method")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: true, is_unsafe: false, params: [Reference(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Self"))] }, generic_args: [None] }), Shared)], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(10) } + > Function { name: Name(Text("method")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: true, is_unsafe: false, params: [Reference(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Self"))] }, generic_args: [None] }), Shared)], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(10) } > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_dfl_method"))] }, input: None }]) }] - > Function { name: Name(Text("dfl_method")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: true, is_unsafe: false, params: [Reference(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Self"))] }, generic_args: [None] }), Mut)], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(11) } + > Function { name: Name(Text("dfl_method")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: true, is_unsafe: false, params: [Reference(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Self"))] }, generic_args: [None] }), Mut)], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(11) } #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct0"))] }, input: None }]) }] - Struct { name: Name(Text("Struct0")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(1), fields: Unit, ast_id: FileAstId::(3), kind: Unit } + Struct { name: Name(Text("Struct0")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(1), fields: Unit, ast_id: FileAstId::(3), kind: Unit } #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct1"))] }, input: None }]) }] - Struct { name: Name(Text("Struct1")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(2), fields: Tuple(IdRange::(0..1)), ast_id: FileAstId::(4), kind: Tuple } + Struct { name: Name(Text("Struct1")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(2), fields: Tuple(IdRange::(0..1)), ast_id: FileAstId::(4), kind: Tuple } #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct2"))] }, input: None }]) }] - Struct { name: Name(Text("Struct2")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(3), fields: Record(IdRange::(1..2)), ast_id: FileAstId::(5), kind: Record } + Struct { name: Name(Text("Struct2")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(3), fields: Record(IdRange::(1..2)), ast_id: FileAstId::(5), kind: Record } #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("en"))] }, input: None }]) }] - Enum { name: Name(Text("En")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), variants: IdRange::(0..1), ast_id: FileAstId::(6) } + Enum { name: Name(Text("En")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), variants: IdRange::(0..1), ast_id: FileAstId::(6) } #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("un"))] }, input: None }]) }] - Union { name: Name(Text("Un")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), fields: Record(IdRange::(3..4)), ast_id: FileAstId::(7) } + Union { name: Name(Text("Un")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), fields: Record(IdRange::(3..4)), ast_id: FileAstId::(7) } "##]], ); } @@ -274,13 +274,13 @@ fn simple_inner_items() { inner attrs: Attrs { entries: None } top-level items: - Impl { generic_params: GenericParamsId(0), target_trait: Some(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("D"))] }, generic_args: [None] })), target_type: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Response"))] }, generic_args: [Some(GenericArgs { args: [Type(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("T"))] }, generic_args: [None] }))], has_self_type: false, bindings: [] })] }), is_negative: false, items: [Function(Idx::(1))], ast_id: FileAstId::(0) } - > Function { name: Name(Text("foo")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(1) } + Impl { generic_params: GenericParamsId(0), target_trait: Some(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("D"))] }, generic_args: [None] })), target_type: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Response"))] }, generic_args: [Some(GenericArgs { args: [Type(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("T"))] }, generic_args: [None] }))], has_self_type: false, bindings: [] })] }), is_negative: false, items: [Function(Idx::(1))], ast_id: FileAstId::(0) } + > Function { name: Name(Text("foo")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(1) } inner items: - for AST FileAstId::(2): - Function { name: Name(Text("end")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(1), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(2) } + for AST FileAstId::(2): + Function { name: Name(Text("end")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(1), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(2) } "#]], ); @@ -303,9 +303,9 @@ fn extern_attrs() { top-level items: #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_a"))] }, input: None }, Attr { path: ModPath { kind: Plain, segments: [Name(Text("block_attr"))] }, input: None }]) }] - Function { name: Name(Text("a")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: true, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(1) } + Function { name: Name(Text("a")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: true, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(1) } #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_b"))] }, input: None }, Attr { path: ModPath { kind: Plain, segments: [Name(Text("block_attr"))] }, input: None }]) }] - Function { name: Name(Text("b")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: true, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(2) } + Function { name: Name(Text("b")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: true, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(2) } "##]], ); } @@ -327,11 +327,11 @@ fn trait_attrs() { top-level items: #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("trait_attr"))] }, input: None }]) }] - Trait { name: Name(Text("Tr")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(0), auto: false, items: [Function(Idx::(0)), Function(Idx::(1))], ast_id: FileAstId::(0) } + Trait { name: Name(Text("Tr")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(0), auto: false, items: [Function(Idx::(0)), Function(Idx::(1))], ast_id: FileAstId::(0) } > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_a"))] }, input: None }]) }] - > Function { name: Name(Text("a")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(1) } + > Function { name: Name(Text("a")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(1) } > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_b"))] }, input: None }]) }] - > Function { name: Name(Text("b")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(2) } + > Function { name: Name(Text("b")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(2) } "##]], ); } @@ -353,11 +353,11 @@ fn impl_attrs() { top-level items: #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("impl_attr"))] }, input: None }]) }] - Impl { generic_params: GenericParamsId(4294967295), target_trait: None, target_type: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Ty"))] }, generic_args: [None] }), is_negative: false, items: [Function(Idx::(0)), Function(Idx::(1))], ast_id: FileAstId::(0) } + Impl { generic_params: GenericParamsId(4294967295), target_trait: None, target_type: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Ty"))] }, generic_args: [None] }), is_negative: false, items: [Function(Idx::(0)), Function(Idx::(1))], ast_id: FileAstId::(0) } > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_a"))] }, input: None }]) }] - > Function { name: Name(Text("a")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(1) } + > Function { name: Name(Text("a")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(1) } > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_b"))] }, input: None }]) }] - > Function { name: Name(Text("b")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(2) } + > Function { name: Name(Text("b")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(2) } "##]], ); } @@ -408,13 +408,13 @@ fn inner_item_attrs() { inner attrs: Attrs { entries: None } top-level items: - Function { name: Name(Text("foo")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(0) } + Function { name: Name(Text("foo")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(0) } inner items: - for AST FileAstId::(1): + for AST FileAstId::(1): #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("on_inner"))] }, input: None }]) }] - Function { name: Name(Text("inner")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(1) } + Function { name: Name(Text("inner")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::(1) } "##]], ); @@ -432,8 +432,8 @@ fn assoc_item_macros() { inner attrs: Attrs { entries: None } top-level items: - Impl { generic_params: GenericParamsId(4294967295), target_trait: None, target_type: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("S"))] }, generic_args: [None] }), is_negative: false, items: [MacroCall(Idx::(0))], ast_id: FileAstId::(0) } - > MacroCall { name: None, path: ModPath { kind: Plain, segments: [Name(Text("items"))] }, is_export: false, is_local_inner: false, is_builtin: false, ast_id: FileAstId::(1) } + Impl { generic_params: GenericParamsId(4294967295), target_trait: None, target_type: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("S"))] }, generic_args: [None] }), is_negative: false, items: [MacroCall(Idx::(0))], ast_id: FileAstId::(0) } + > MacroCall { name: None, path: ModPath { kind: Plain, segments: [Name(Text("items"))] }, is_export: false, is_local_inner: false, is_builtin: false, ast_id: FileAstId::(1) } "#]], ); } diff --git a/crates/ra_hir_def/src/keys.rs b/crates/ra_hir_def/src/keys.rs index 441bdbead88..40a5d92b507 100644 --- a/crates/ra_hir_def/src/keys.rs +++ b/crates/ra_hir_def/src/keys.rs @@ -3,8 +3,8 @@ use std::marker::PhantomData; use hir_expand::{InFile, MacroDefId}; -use ra_syntax::{ast, AstNode, AstPtr}; use rustc_hash::FxHashMap; +use syntax::{ast, AstNode, AstPtr}; use crate::{ dyn_map::{DynMap, Policy}, diff --git a/crates/ra_hir_def/src/lang_item.rs b/crates/ra_hir_def/src/lang_item.rs index 3631499bf71..063eadccb2d 100644 --- a/crates/ra_hir_def/src/lang_item.rs +++ b/crates/ra_hir_def/src/lang_item.rs @@ -4,8 +4,8 @@ //! features, such as Fn family of traits. use std::sync::Arc; -use ra_syntax::SmolStr; use rustc_hash::FxHashMap; +use syntax::SmolStr; use crate::{ db::DefDatabase, AdtId, AttrDefId, CrateId, EnumId, FunctionId, ImplId, ModuleDefId, ModuleId, diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs index 8103937397d..806ac731f5d 100644 --- a/crates/ra_hir_def/src/lib.rs +++ b/crates/ra_hir_def/src/lib.rs @@ -58,7 +58,7 @@ use hir_expand::{ MacroCallId, MacroCallKind, MacroDefId, MacroDefKind, }; use ra_db::{impl_intern_key, salsa, CrateId}; -use ra_syntax::ast; +use syntax::ast; use crate::builtin_type::BuiltinType; use item_tree::{ diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/ra_hir_def/src/nameres.rs index dc239997f95..d26c837cc84 100644 --- a/crates/ra_hir_def/src/nameres.rs +++ b/crates/ra_hir_def/src/nameres.rs @@ -59,9 +59,9 @@ use std::sync::Arc; use arena::Arena; use hir_expand::{diagnostics::DiagnosticSink, name::Name, InFile}; use ra_db::{CrateId, Edition, FileId}; -use ra_syntax::ast; use rustc_hash::FxHashMap; use stdx::format_to; +use syntax::ast; use crate::{ db::DefDatabase, @@ -288,7 +288,7 @@ pub enum ModuleSource { mod diagnostics { use hir_expand::diagnostics::DiagnosticSink; - use ra_syntax::{ast, AstPtr}; + use syntax::{ast, AstPtr}; use crate::{db::DefDatabase, diagnostics::UnresolvedModule, nameres::LocalModuleId, AstId}; diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index 52ee401d9ef..f7270ec91c1 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs @@ -13,8 +13,8 @@ use hir_expand::{ }; use ra_cfg::CfgOptions; use ra_db::{CrateId, FileId, ProcMacroId}; -use ra_syntax::ast; use rustc_hash::FxHashMap; +use syntax::ast; use test_utils::mark; use crate::{ diff --git a/crates/ra_hir_def/src/nameres/mod_resolution.rs b/crates/ra_hir_def/src/nameres/mod_resolution.rs index 9539616325a..316245d6ba7 100644 --- a/crates/ra_hir_def/src/nameres/mod_resolution.rs +++ b/crates/ra_hir_def/src/nameres/mod_resolution.rs @@ -1,7 +1,7 @@ //! This module resolves `mod foo;` declaration to file. use hir_expand::name::Name; use ra_db::FileId; -use ra_syntax::SmolStr; +use syntax::SmolStr; use crate::{db::DefDatabase, HirFileId}; diff --git a/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs b/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs index ae58948c426..1f619787e1d 100644 --- a/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs +++ b/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs @@ -698,7 +698,7 @@ fn unresolved_module_diagnostics() { ), ), ), - value: FileAstId::(1), + value: FileAstId::(1), }, candidate: "bar.rs", }, diff --git a/crates/ra_hir_def/src/path.rs b/crates/ra_hir_def/src/path.rs index cc1726e9e05..88be07c8a77 100644 --- a/crates/ra_hir_def/src/path.rs +++ b/crates/ra_hir_def/src/path.rs @@ -13,7 +13,7 @@ use hir_expand::{ name::{AsName, Name}, }; use ra_db::CrateId; -use ra_syntax::ast; +use syntax::ast; use crate::{ type_ref::{TypeBound, TypeRef}, diff --git a/crates/ra_hir_def/src/path/lower.rs b/crates/ra_hir_def/src/path/lower.rs index d09fc66e4dc..07b9723ce01 100644 --- a/crates/ra_hir_def/src/path/lower.rs +++ b/crates/ra_hir_def/src/path/lower.rs @@ -9,7 +9,7 @@ use hir_expand::{ hygiene::Hygiene, name::{name, AsName}, }; -use ra_syntax::ast::{self, AstNode, TypeBoundsOwner}; +use syntax::ast::{self, AstNode, TypeBoundsOwner}; use super::AssociatedTypeBinding; use crate::{ diff --git a/crates/ra_hir_def/src/path/lower/lower_use.rs b/crates/ra_hir_def/src/path/lower/lower_use.rs index 794be45e894..53cecb05fb2 100644 --- a/crates/ra_hir_def/src/path/lower/lower_use.rs +++ b/crates/ra_hir_def/src/path/lower/lower_use.rs @@ -5,7 +5,7 @@ use std::iter; use either::Either; use hir_expand::{hygiene::Hygiene, name::AsName}; -use ra_syntax::ast::{self, NameOwner}; +use syntax::ast::{self, NameOwner}; use test_utils::mark; use crate::path::{ImportAlias, ModPath, PathKind}; diff --git a/crates/ra_hir_def/src/type_ref.rs b/crates/ra_hir_def/src/type_ref.rs index 6f7884ffe59..1a78c1444c4 100644 --- a/crates/ra_hir_def/src/type_ref.rs +++ b/crates/ra_hir_def/src/type_ref.rs @@ -1,6 +1,6 @@ //! HIR for references to types. Paths in these are not yet resolved. They can //! be directly created from an ast::TypeRef, without further queries. -use ra_syntax::ast::{self}; +use syntax::ast::{self}; use crate::{body::LowerCtx, path::Path}; diff --git a/crates/ra_hir_def/src/visibility.rs b/crates/ra_hir_def/src/visibility.rs index 1abffb4c3ca..e6e0853a30a 100644 --- a/crates/ra_hir_def/src/visibility.rs +++ b/crates/ra_hir_def/src/visibility.rs @@ -1,7 +1,7 @@ //! Defines hir-level representation of visibility (e.g. `pub` and `pub(crate)`). use hir_expand::{hygiene::Hygiene, InFile}; -use ra_syntax::ast; +use syntax::ast; use crate::{ db::DefDatabase, diff --git a/crates/ra_hir_expand/Cargo.toml b/crates/ra_hir_expand/Cargo.toml index 052330fdefa..153a70bdf51 100644 --- a/crates/ra_hir_expand/Cargo.toml +++ b/crates/ra_hir_expand/Cargo.toml @@ -15,7 +15,7 @@ rustc-hash = "1.0.0" arena = { path = "../arena" } ra_db = { path = "../ra_db" } -ra_syntax = { path = "../ra_syntax" } +syntax = { path = "../syntax" } parser = { path = "../parser" } profile = { path = "../profile" } tt = { path = "../tt" } diff --git a/crates/ra_hir_expand/src/ast_id_map.rs b/crates/ra_hir_expand/src/ast_id_map.rs index 703a85b0f7a..f63629b3053 100644 --- a/crates/ra_hir_expand/src/ast_id_map.rs +++ b/crates/ra_hir_expand/src/ast_id_map.rs @@ -13,7 +13,7 @@ use std::{ }; use arena::{Arena, Idx}; -use ra_syntax::{ast, AstNode, AstPtr, SyntaxNode, SyntaxNodePtr}; +use syntax::{ast, AstNode, AstPtr, SyntaxNode, SyntaxNodePtr}; /// `AstId` points to an AST node in a specific file. pub struct FileAstId { diff --git a/crates/ra_hir_expand/src/builtin_derive.rs b/crates/ra_hir_expand/src/builtin_derive.rs index 95e6977f24a..2d2f8bcb842 100644 --- a/crates/ra_hir_expand/src/builtin_derive.rs +++ b/crates/ra_hir_expand/src/builtin_derive.rs @@ -3,7 +3,7 @@ use log::debug; use parser::FragmentKind; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode, GenericParamsOwner, ModuleItemOwner, NameOwner}, match_ast, }; diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/ra_hir_expand/src/builtin_macro.rs index 24dc0b4e7fd..ae4c8438209 100644 --- a/crates/ra_hir_expand/src/builtin_macro.rs +++ b/crates/ra_hir_expand/src/builtin_macro.rs @@ -8,7 +8,7 @@ use either::Either; use mbe::parse_to_token_tree; use parser::FragmentKind; use ra_db::FileId; -use ra_syntax::ast::{self, AstToken, HasStringValue}; +use syntax::ast::{self, AstToken, HasStringValue}; macro_rules! register_builtin { ( LAZY: $(($name:ident, $kind: ident) => $expand:ident),* , EAGER: $(($e_name:ident, $e_kind: ident) => $e_expand:ident),* ) => { @@ -427,8 +427,8 @@ mod tests { MacroCallLoc, }; use ra_db::{fixture::WithFixture, SourceDatabase}; - use ra_syntax::ast::NameOwner; use std::sync::Arc; + use syntax::ast::NameOwner; fn expand_builtin_macro(ra_fixture: &str) -> String { let (db, file_id) = TestDB::with_single_file(&ra_fixture); diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs index d83c391a90b..c275f6b017b 100644 --- a/crates/ra_hir_expand/src/db.rs +++ b/crates/ra_hir_expand/src/db.rs @@ -5,7 +5,7 @@ use std::sync::Arc; use mbe::{ExpandResult, MacroRules}; use parser::FragmentKind; use ra_db::{salsa, SourceDatabase}; -use ra_syntax::{algo::diff, AstNode, GreenNode, Parse, SyntaxKind::*, SyntaxNode}; +use syntax::{algo::diff, AstNode, GreenNode, Parse, SyntaxKind::*, SyntaxNode}; use crate::{ ast_id_map::AstIdMap, BuiltinDeriveExpander, BuiltinFnLikeExpander, EagerCallLoc, EagerMacroId, @@ -92,9 +92,9 @@ pub trait AstDatabase: SourceDatabase { pub fn expand_hypothetical( db: &dyn AstDatabase, actual_macro_call: MacroCallId, - hypothetical_args: &ra_syntax::ast::TokenTree, - token_to_map: ra_syntax::SyntaxToken, -) -> Option<(SyntaxNode, ra_syntax::SyntaxToken)> { + hypothetical_args: &syntax::ast::TokenTree, + token_to_map: syntax::SyntaxToken, +) -> Option<(SyntaxNode, syntax::SyntaxToken)> { let macro_file = MacroFile { macro_call_id: actual_macro_call }; let (tt, tmap_1) = mbe::syntax_node_to_token_tree(hypothetical_args.syntax()).unwrap(); let range = @@ -105,7 +105,7 @@ pub fn expand_hypothetical( parse_macro_with_arg(db, macro_file, Some(std::sync::Arc::new((tt, tmap_1))))?; let token_id = macro_def.0.map_id_down(token_id); let range = tmap_2.range_by_token(token_id)?.by_kind(token_to_map.kind())?; - let token = ra_syntax::algo::find_covering_element(&node.syntax_node(), range).into_token()?; + let token = syntax::algo::find_covering_element(&node.syntax_node(), range).into_token()?; Some((node.syntax_node(), token)) } diff --git a/crates/ra_hir_expand/src/diagnostics.rs b/crates/ra_hir_expand/src/diagnostics.rs index b138500e734..59d35debe33 100644 --- a/crates/ra_hir_expand/src/diagnostics.rs +++ b/crates/ra_hir_expand/src/diagnostics.rs @@ -16,7 +16,7 @@ use std::{any::Any, fmt}; -use ra_syntax::SyntaxNodePtr; +use syntax::SyntaxNodePtr; use crate::InFile; diff --git a/crates/ra_hir_expand/src/eager.rs b/crates/ra_hir_expand/src/eager.rs index dc83044ea4e..bd3409f973b 100644 --- a/crates/ra_hir_expand/src/eager.rs +++ b/crates/ra_hir_expand/src/eager.rs @@ -27,8 +27,8 @@ use crate::{ use parser::FragmentKind; use ra_db::CrateId; -use ra_syntax::{algo::SyntaxRewriter, SyntaxNode}; use std::sync::Arc; +use syntax::{algo::SyntaxRewriter, SyntaxNode}; pub fn expand_eager_macro( db: &dyn AstDatabase, diff --git a/crates/ra_hir_expand/src/hygiene.rs b/crates/ra_hir_expand/src/hygiene.rs index aefe47bd32a..23b5eac2704 100644 --- a/crates/ra_hir_expand/src/hygiene.rs +++ b/crates/ra_hir_expand/src/hygiene.rs @@ -4,7 +4,7 @@ //! this moment, this is horribly incomplete and handles only `$crate`. use either::Either; use ra_db::CrateId; -use ra_syntax::ast; +use syntax::ast; use crate::{ db::AstDatabase, diff --git a/crates/ra_hir_expand/src/lib.rs b/crates/ra_hir_expand/src/lib.rs index 38f0ffff81c..af0cc445f7e 100644 --- a/crates/ra_hir_expand/src/lib.rs +++ b/crates/ra_hir_expand/src/lib.rs @@ -19,7 +19,7 @@ use std::hash::Hash; use std::sync::Arc; use ra_db::{impl_intern_key, salsa, CrateId, FileId}; -use ra_syntax::{ +use syntax::{ algo, ast::{self, AstNode}, SyntaxNode, SyntaxToken, TextSize, diff --git a/crates/ra_hir_expand/src/name.rs b/crates/ra_hir_expand/src/name.rs index 969a2e5b834..4dcaff08853 100644 --- a/crates/ra_hir_expand/src/name.rs +++ b/crates/ra_hir_expand/src/name.rs @@ -2,7 +2,7 @@ use std::fmt; -use ra_syntax::{ast, SmolStr}; +use syntax::{ast, SmolStr}; /// `Name` is a wrapper around string, which is used in hir for both references /// and declarations. In theory, names should also carry hygiene info, but we are @@ -37,8 +37,8 @@ impl Name { Name(Repr::TupleField(idx)) } - pub fn new_lifetime(lt: &ra_syntax::SyntaxToken) -> Name { - assert!(lt.kind() == ra_syntax::SyntaxKind::LIFETIME); + pub fn new_lifetime(lt: &syntax::SyntaxToken) -> Name { + assert!(lt.kind() == syntax::SyntaxKind::LIFETIME); Name(Repr::Text(lt.text().clone())) } diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/ra_hir_ty/Cargo.toml index 380d5e6015d..6156e4a854b 100644 --- a/crates/ra_hir_ty/Cargo.toml +++ b/crates/ra_hir_ty/Cargo.toml @@ -23,7 +23,7 @@ hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } arena = { path = "../arena" } ra_db = { path = "../ra_db" } profile = { path = "../profile" } -ra_syntax = { path = "../ra_syntax" } +syntax = { path = "../syntax" } test_utils = { path = "../test_utils" } scoped-tls = "1" diff --git a/crates/ra_hir_ty/src/diagnostics.rs b/crates/ra_hir_ty/src/diagnostics.rs index 55c02c1febc..bf35d2d0ee0 100644 --- a/crates/ra_hir_ty/src/diagnostics.rs +++ b/crates/ra_hir_ty/src/diagnostics.rs @@ -8,8 +8,8 @@ use std::any::Any; use hir_def::DefWithBodyId; use hir_expand::diagnostics::{Diagnostic, DiagnosticSink}; use hir_expand::{name::Name, HirFileId, InFile}; -use ra_syntax::{ast, AstPtr, SyntaxNodePtr}; use stdx::format_to; +use syntax::{ast, AstPtr, SyntaxNodePtr}; use crate::db::HirDatabase; @@ -214,8 +214,8 @@ mod tests { diagnostics::{Diagnostic, DiagnosticSinkBuilder}, }; use ra_db::{fixture::WithFixture, FileId, SourceDatabase, SourceDatabaseExt}; - use ra_syntax::{TextRange, TextSize}; use rustc_hash::FxHashMap; + use syntax::{TextRange, TextSize}; use crate::{diagnostics::validate_body, test_db::TestDB}; diff --git a/crates/ra_hir_ty/src/diagnostics/expr.rs b/crates/ra_hir_ty/src/diagnostics/expr.rs index 51adcecafae..fb76e2e4ecf 100644 --- a/crates/ra_hir_ty/src/diagnostics/expr.rs +++ b/crates/ra_hir_ty/src/diagnostics/expr.rs @@ -4,8 +4,8 @@ use std::sync::Arc; use hir_def::{path::path, resolver::HasResolver, AdtId, DefWithBodyId}; use hir_expand::diagnostics::DiagnosticSink; -use ra_syntax::{ast, AstPtr}; use rustc_hash::FxHashSet; +use syntax::{ast, AstPtr}; use crate::{ db::HirDatabase, diff --git a/crates/ra_hir_ty/src/infer.rs b/crates/ra_hir_ty/src/infer.rs index 784ae1c3ccf..03b00b101c2 100644 --- a/crates/ra_hir_ty/src/infer.rs +++ b/crates/ra_hir_ty/src/infer.rs @@ -31,9 +31,9 @@ use hir_def::{ TypeAliasId, VariantId, }; use hir_expand::{diagnostics::DiagnosticSink, name::name}; -use ra_syntax::SmolStr; use rustc_hash::FxHashMap; use stdx::impl_from; +use syntax::SmolStr; use super::{ primitive::{FloatTy, IntTy}, diff --git a/crates/ra_hir_ty/src/infer/expr.rs b/crates/ra_hir_ty/src/infer/expr.rs index 731b062c2da..a2f849d0213 100644 --- a/crates/ra_hir_ty/src/infer/expr.rs +++ b/crates/ra_hir_ty/src/infer/expr.rs @@ -11,7 +11,7 @@ use hir_def::{ AdtId, AssocContainerId, FieldId, Lookup, }; use hir_expand::name::{name, Name}; -use ra_syntax::ast::RangeOp; +use syntax::ast::RangeOp; use crate::{ autoderef, method_resolution, op, diff --git a/crates/ra_hir_ty/src/test_db.rs b/crates/ra_hir_ty/src/test_db.rs index a1714ff0fcd..0e2a69eec2a 100644 --- a/crates/ra_hir_ty/src/test_db.rs +++ b/crates/ra_hir_ty/src/test_db.rs @@ -8,8 +8,8 @@ use std::{ use hir_def::{db::DefDatabase, ModuleId}; use hir_expand::db::AstDatabase; use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast}; -use ra_syntax::TextRange; use rustc_hash::{FxHashMap, FxHashSet}; +use syntax::TextRange; use test_utils::extract_annotations; #[salsa::database( diff --git a/crates/ra_hir_ty/src/tests.rs b/crates/ra_hir_ty/src/tests.rs index 016e689fff2..5f6f8869ae0 100644 --- a/crates/ra_hir_ty/src/tests.rs +++ b/crates/ra_hir_ty/src/tests.rs @@ -22,12 +22,12 @@ use hir_def::{ }; use hir_expand::{db::AstDatabase, InFile}; use ra_db::{fixture::WithFixture, FileRange, SourceDatabase, SourceDatabaseExt}; -use ra_syntax::{ +use stdx::format_to; +use syntax::{ algo, ast::{self, AstNode}, SyntaxNode, }; -use stdx::format_to; use crate::{ db::HirDatabase, display::HirDisplay, infer::TypeMismatch, test_db::TestDB, InferenceResult, Ty, diff --git a/crates/ra_hir_ty/src/tests/macros.rs b/crates/ra_hir_ty/src/tests/macros.rs index 24c53eb0222..d887c7a7992 100644 --- a/crates/ra_hir_ty/src/tests/macros.rs +++ b/crates/ra_hir_ty/src/tests/macros.rs @@ -543,7 +543,7 @@ fn bar() -> u32 {0} #[test] #[ignore] fn include_accidentally_quadratic() { - let file = project_dir().join("crates/ra_syntax/test_data/accidentally_quadratic"); + let file = project_dir().join("crates/syntax/test_data/accidentally_quadratic"); let big_file = fs::read_to_string(file).unwrap(); let big_file = vec![big_file; 10].join("\n"); diff --git a/crates/ra_ide/Cargo.toml b/crates/ra_ide/Cargo.toml index 84c25f0b8a2..8e0fa59178d 100644 --- a/crates/ra_ide/Cargo.toml +++ b/crates/ra_ide/Cargo.toml @@ -21,7 +21,7 @@ oorandom = "11.1.2" stdx = { path = "../stdx" } -ra_syntax = { path = "../ra_syntax" } +syntax = { path = "../syntax" } text_edit = { path = "../text_edit" } ra_db = { path = "../ra_db" } ra_ide_db = { path = "../ra_ide_db" } diff --git a/crates/ra_ide/src/call_hierarchy.rs b/crates/ra_ide/src/call_hierarchy.rs index 1fcaf4a32b7..116e6bf83e1 100644 --- a/crates/ra_ide/src/call_hierarchy.rs +++ b/crates/ra_ide/src/call_hierarchy.rs @@ -4,7 +4,7 @@ use indexmap::IndexMap; use hir::Semantics; use ra_ide_db::RootDatabase; -use ra_syntax::{ast, match_ast, AstNode, TextRange}; +use syntax::{ast, match_ast, AstNode, TextRange}; use crate::{ call_info::FnCallNode, display::ToNav, goto_definition, references, FilePosition, diff --git a/crates/ra_ide/src/call_info.rs b/crates/ra_ide/src/call_info.rs index ff602202f2d..703cbc6b433 100644 --- a/crates/ra_ide/src/call_info.rs +++ b/crates/ra_ide/src/call_info.rs @@ -2,11 +2,11 @@ use either::Either; use hir::{Docs, HirDisplay, Semantics, Type}; use ra_ide_db::RootDatabase; -use ra_syntax::{ +use stdx::format_to; +use syntax::{ ast::{self, ArgListOwner}, match_ast, AstNode, SyntaxNode, SyntaxToken, TextRange, TextSize, }; -use stdx::format_to; use test_utils::mark; use crate::FilePosition; diff --git a/crates/ra_ide/src/completion/complete_attribute.rs b/crates/ra_ide/src/completion/complete_attribute.rs index 2faaae97460..603d935deb7 100644 --- a/crates/ra_ide/src/completion/complete_attribute.rs +++ b/crates/ra_ide/src/completion/complete_attribute.rs @@ -3,8 +3,8 @@ //! This module uses a bit of static metadata to provide completions //! for built-in attributes. -use ra_syntax::{ast, AstNode, SyntaxKind}; use rustc_hash::FxHashSet; +use syntax::{ast, AstNode, SyntaxKind}; use crate::completion::{ completion_context::CompletionContext, diff --git a/crates/ra_ide/src/completion/complete_fn_param.rs b/crates/ra_ide/src/completion/complete_fn_param.rs index 4063342572b..7c63ce58f89 100644 --- a/crates/ra_ide/src/completion/complete_fn_param.rs +++ b/crates/ra_ide/src/completion/complete_fn_param.rs @@ -1,10 +1,10 @@ //! See `complete_fn_param`. -use ra_syntax::{ +use rustc_hash::FxHashMap; +use syntax::{ ast::{self, ModuleItemOwner}, match_ast, AstNode, }; -use rustc_hash::FxHashMap; use crate::completion::{CompletionContext, CompletionItem, CompletionKind, Completions}; diff --git a/crates/ra_ide/src/completion/complete_keyword.rs b/crates/ra_ide/src/completion/complete_keyword.rs index b62064797b0..a80708935ea 100644 --- a/crates/ra_ide/src/completion/complete_keyword.rs +++ b/crates/ra_ide/src/completion/complete_keyword.rs @@ -1,6 +1,6 @@ //! FIXME: write short doc here -use ra_syntax::{ast, SyntaxKind}; +use syntax::{ast, SyntaxKind}; use test_utils::mark; use crate::completion::{ diff --git a/crates/ra_ide/src/completion/complete_postfix.rs b/crates/ra_ide/src/completion/complete_postfix.rs index 42087da8dc5..05e15d4647b 100644 --- a/crates/ra_ide/src/completion/complete_postfix.rs +++ b/crates/ra_ide/src/completion/complete_postfix.rs @@ -1,6 +1,6 @@ //! FIXME: write short doc here use ra_assists::utils::TryEnum; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode}, TextRange, TextSize, }; diff --git a/crates/ra_ide/src/completion/complete_qualified_path.rs b/crates/ra_ide/src/completion/complete_qualified_path.rs index b08f5b9b45e..cb7dd23c187 100644 --- a/crates/ra_ide/src/completion/complete_qualified_path.rs +++ b/crates/ra_ide/src/completion/complete_qualified_path.rs @@ -1,8 +1,8 @@ //! Completion of paths, i.e. `some::prefix::<|>`. use hir::{Adt, HasVisibility, PathResolution, ScopeDef}; -use ra_syntax::AstNode; use rustc_hash::FxHashSet; +use syntax::AstNode; use test_utils::mark; use crate::completion::{CompletionContext, Completions}; diff --git a/crates/ra_ide/src/completion/complete_trait_impl.rs b/crates/ra_ide/src/completion/complete_trait_impl.rs index b397baf1078..d7edd92cf04 100644 --- a/crates/ra_ide/src/completion/complete_trait_impl.rs +++ b/crates/ra_ide/src/completion/complete_trait_impl.rs @@ -33,7 +33,7 @@ use hir::{self, Docs, HasSource}; use ra_assists::utils::get_missing_assoc_items; -use ra_syntax::{ +use syntax::{ ast::{self, edit, Impl}, AstNode, SyntaxKind, SyntaxNode, TextRange, T, }; diff --git a/crates/ra_ide/src/completion/complete_unqualified_path.rs b/crates/ra_ide/src/completion/complete_unqualified_path.rs index bd9551f358a..824227f310a 100644 --- a/crates/ra_ide/src/completion/complete_unqualified_path.rs +++ b/crates/ra_ide/src/completion/complete_unqualified_path.rs @@ -1,7 +1,7 @@ //! Completion of names from the current scope, e.g. locals and imported items. use hir::{Adt, ModuleDef, ScopeDef, Type}; -use ra_syntax::AstNode; +use syntax::AstNode; use test_utils::mark; use crate::completion::{CompletionContext, Completions}; diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs index 0cb57fb1b42..b5efb6cd675 100644 --- a/crates/ra_ide/src/completion/completion_context.rs +++ b/crates/ra_ide/src/completion/completion_context.rs @@ -3,7 +3,7 @@ use hir::{Semantics, SemanticsScope, Type}; use ra_db::SourceDatabase; use ra_ide_db::RootDatabase; -use ra_syntax::{ +use syntax::{ algo::{find_covering_element, find_node_at_offset}, ast, match_ast, AstNode, NodeOrToken, SyntaxKind::*, diff --git a/crates/ra_ide/src/completion/completion_item.rs b/crates/ra_ide/src/completion/completion_item.rs index 1c0684f4ed5..9377cdc577e 100644 --- a/crates/ra_ide/src/completion/completion_item.rs +++ b/crates/ra_ide/src/completion/completion_item.rs @@ -3,7 +3,7 @@ use std::fmt; use hir::Documentation; -use ra_syntax::TextRange; +use syntax::TextRange; use text_edit::TextEdit; use crate::completion::completion_config::SnippetCap; diff --git a/crates/ra_ide/src/completion/patterns.rs b/crates/ra_ide/src/completion/patterns.rs index 7c4feff6d16..ffc97c076a2 100644 --- a/crates/ra_ide/src/completion/patterns.rs +++ b/crates/ra_ide/src/completion/patterns.rs @@ -1,6 +1,6 @@ //! Patterns telling us certain facts about current syntax element, they are used in completion context -use ra_syntax::{ +use syntax::{ algo::non_trivia_sibling, ast::{self, LoopBodyOwner}, match_ast, AstNode, Direction, NodeOrToken, SyntaxElement, diff --git a/crates/ra_ide/src/completion/presentation.rs b/crates/ra_ide/src/completion/presentation.rs index 59f1b14246f..e1b1ea4ce44 100644 --- a/crates/ra_ide/src/completion/presentation.rs +++ b/crates/ra_ide/src/completion/presentation.rs @@ -3,7 +3,7 @@ use hir::{Docs, HasAttrs, HasSource, HirDisplay, ModPath, ScopeDef, StructKind, Type}; use itertools::Itertools; -use ra_syntax::ast::NameOwner; +use syntax::ast::NameOwner; use test_utils::mark; use crate::{ diff --git a/crates/ra_ide/src/completion/test_utils.rs b/crates/ra_ide/src/completion/test_utils.rs index 9191777455b..1452d7e9e54 100644 --- a/crates/ra_ide/src/completion/test_utils.rs +++ b/crates/ra_ide/src/completion/test_utils.rs @@ -2,8 +2,8 @@ use hir::Semantics; use itertools::Itertools; -use ra_syntax::{AstNode, NodeOrToken, SyntaxElement}; use stdx::{format_to, trim_indent}; +use syntax::{AstNode, NodeOrToken, SyntaxElement}; use test_utils::assert_eq_text; use crate::{ diff --git a/crates/ra_ide/src/diagnostics.rs b/crates/ra_ide/src/diagnostics.rs index 54810d5bbf0..18def6115d7 100644 --- a/crates/ra_ide/src/diagnostics.rs +++ b/crates/ra_ide/src/diagnostics.rs @@ -10,7 +10,7 @@ use hir::{diagnostics::DiagnosticSinkBuilder, Semantics}; use itertools::Itertools; use ra_db::SourceDatabase; use ra_ide_db::RootDatabase; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode}, SyntaxNode, TextRange, T, }; diff --git a/crates/ra_ide/src/diagnostics/diagnostics_with_fix.rs b/crates/ra_ide/src/diagnostics/diagnostics_with_fix.rs index 8fb25de6c16..efcd631b31b 100644 --- a/crates/ra_ide/src/diagnostics/diagnostics_with_fix.rs +++ b/crates/ra_ide/src/diagnostics/diagnostics_with_fix.rs @@ -12,7 +12,7 @@ use ra_ide_db::{ source_change::{FileSystemEdit, SourceFileEdit}, RootDatabase, }; -use ra_syntax::{algo, ast, AstNode}; +use syntax::{algo, ast, AstNode}; use text_edit::TextEdit; /// A [Diagnostic] that potentially has a fix available. diff --git a/crates/ra_ide/src/display.rs b/crates/ra_ide/src/display.rs index fd42aa4352e..41b5bdc490c 100644 --- a/crates/ra_ide/src/display.rs +++ b/crates/ra_ide/src/display.rs @@ -4,7 +4,7 @@ mod navigation_target; mod short_label; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode, AttrsOwner, GenericParamsOwner, NameOwner}, SyntaxKind::{ATTR, COMMENT}, }; diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index fdbf75abd91..683088a7484 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs @@ -4,7 +4,7 @@ use either::Either; use hir::{original_range, AssocItem, FieldSource, HasSource, InFile, ModuleSource}; use ra_db::{FileId, SourceDatabase}; use ra_ide_db::{defs::Definition, RootDatabase}; -use ra_syntax::{ +use syntax::{ ast::{self, DocCommentsOwner, NameOwner}, match_ast, AstNode, SmolStr, SyntaxKind::{self, IDENT_PAT, TYPE_PARAM}, diff --git a/crates/ra_ide/src/display/short_label.rs b/crates/ra_ide/src/display/short_label.rs index 010c34705c7..ea49d9f9707 100644 --- a/crates/ra_ide/src/display/short_label.rs +++ b/crates/ra_ide/src/display/short_label.rs @@ -1,7 +1,7 @@ //! FIXME: write short doc here -use ra_syntax::ast::{self, AstNode, NameOwner, VisibilityOwner}; use stdx::format_to; +use syntax::ast::{self, AstNode, NameOwner, VisibilityOwner}; pub(crate) trait ShortLabel { fn short_label(&self) -> Option; diff --git a/crates/ra_ide/src/expand_macro.rs b/crates/ra_ide/src/expand_macro.rs index 043515f541f..c25e068d60f 100644 --- a/crates/ra_ide/src/expand_macro.rs +++ b/crates/ra_ide/src/expand_macro.rs @@ -1,6 +1,6 @@ use hir::Semantics; use ra_ide_db::RootDatabase; -use ra_syntax::{ +use syntax::{ algo::{find_node_at_offset, SyntaxRewriter}, ast, AstNode, NodeOrToken, SyntaxKind, SyntaxKind::*, diff --git a/crates/ra_ide/src/extend_selection.rs b/crates/ra_ide/src/extend_selection.rs index 7230a0ff9ee..f30df2bff47 100644 --- a/crates/ra_ide/src/extend_selection.rs +++ b/crates/ra_ide/src/extend_selection.rs @@ -2,7 +2,7 @@ use std::iter::successors; use hir::Semantics; use ra_ide_db::RootDatabase; -use ra_syntax::{ +use syntax::{ algo::{self, find_covering_element, skip_trivia_token}, ast::{self, AstNode, AstToken}, Direction, NodeOrToken, diff --git a/crates/ra_ide/src/file_structure.rs b/crates/ra_ide/src/file_structure.rs index 87cab450373..c90247ba658 100644 --- a/crates/ra_ide/src/file_structure.rs +++ b/crates/ra_ide/src/file_structure.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{self, AttrsOwner, GenericParamsOwner, NameOwner}, match_ast, AstNode, SourceFile, SyntaxKind, SyntaxNode, TextRange, WalkEvent, }; diff --git a/crates/ra_ide/src/folding_ranges.rs b/crates/ra_ide/src/folding_ranges.rs index 0fbc9babd58..7523aec5573 100644 --- a/crates/ra_ide/src/folding_ranges.rs +++ b/crates/ra_ide/src/folding_ranges.rs @@ -2,7 +2,7 @@ use rustc_hash::FxHashSet; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode, AstToken, VisibilityOwner}, Direction, NodeOrToken, SourceFile, SyntaxKind::{self, *}, diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs index 45389fd23fe..77f374ea2a2 100644 --- a/crates/ra_ide/src/goto_definition.rs +++ b/crates/ra_ide/src/goto_definition.rs @@ -3,7 +3,7 @@ use ra_ide_db::{ defs::{classify_name, classify_name_ref}, symbol_index, RootDatabase, }; -use ra_syntax::{ +use syntax::{ ast::{self}, match_ast, AstNode, SyntaxKind::*, @@ -101,7 +101,7 @@ pub(crate) fn reference_definition( #[cfg(test)] mod tests { use ra_db::FileRange; - use ra_syntax::{TextRange, TextSize}; + use syntax::{TextRange, TextSize}; use crate::mock_analysis::MockAnalysis; diff --git a/crates/ra_ide/src/goto_implementation.rs b/crates/ra_ide/src/goto_implementation.rs index 9912b714214..91a8c1dd17a 100644 --- a/crates/ra_ide/src/goto_implementation.rs +++ b/crates/ra_ide/src/goto_implementation.rs @@ -1,6 +1,6 @@ use hir::{Crate, ImplDef, Semantics}; use ra_ide_db::RootDatabase; -use ra_syntax::{algo::find_node_at_offset, ast, AstNode}; +use syntax::{algo::find_node_at_offset, ast, AstNode}; use crate::{display::ToNav, FilePosition, NavigationTarget, RangeInfo}; diff --git a/crates/ra_ide/src/goto_type_definition.rs b/crates/ra_ide/src/goto_type_definition.rs index 8f52feea6e9..3ec2ee59ded 100644 --- a/crates/ra_ide/src/goto_type_definition.rs +++ b/crates/ra_ide/src/goto_type_definition.rs @@ -1,5 +1,5 @@ use ra_ide_db::RootDatabase; -use ra_syntax::{ast, match_ast, AstNode, SyntaxKind::*, SyntaxToken, TokenAtOffset, T}; +use syntax::{ast, match_ast, AstNode, SyntaxKind::*, SyntaxToken, TokenAtOffset, T}; use crate::{display::ToNav, FilePosition, NavigationTarget, RangeInfo}; diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs index f66f62bfb5e..37e68ff7a5d 100644 --- a/crates/ra_ide/src/hover.rs +++ b/crates/ra_ide/src/hover.rs @@ -8,8 +8,8 @@ use ra_ide_db::{ defs::{classify_name, classify_name_ref, Definition}, RootDatabase, }; -use ra_syntax::{ast, match_ast, AstNode, SyntaxKind::*, SyntaxToken, TokenAtOffset, T}; use stdx::format_to; +use syntax::{ast, match_ast, AstNode, SyntaxKind::*, SyntaxToken, TokenAtOffset, T}; use test_utils::mark; use crate::{ diff --git a/crates/ra_ide/src/inlay_hints.rs b/crates/ra_ide/src/inlay_hints.rs index 920b04e8d73..46ddc528e52 100644 --- a/crates/ra_ide/src/inlay_hints.rs +++ b/crates/ra_ide/src/inlay_hints.rs @@ -1,10 +1,10 @@ use hir::{Adt, Callable, HirDisplay, Semantics, Type}; use ra_ide_db::RootDatabase; -use ra_syntax::{ +use stdx::to_lower_snake_case; +use syntax::{ ast::{self, ArgListOwner, AstNode}, match_ast, Direction, NodeOrToken, SmolStr, SyntaxKind, TextRange, T, }; -use stdx::to_lower_snake_case; use crate::FileId; use ast::NameOwner; diff --git a/crates/ra_ide/src/join_lines.rs b/crates/ra_ide/src/join_lines.rs index caf63933a9b..35cec87f670 100644 --- a/crates/ra_ide/src/join_lines.rs +++ b/crates/ra_ide/src/join_lines.rs @@ -1,6 +1,6 @@ use itertools::Itertools; use ra_fmt::{compute_ws, extract_trivial_expression}; -use ra_syntax::{ +use syntax::{ algo::{find_covering_element, non_trivia_sibling}, ast::{self, AstNode, AstToken}, Direction, NodeOrToken, SourceFile, @@ -170,7 +170,7 @@ fn is_trailing_comma(left: SyntaxKind, right: SyntaxKind) -> bool { #[cfg(test)] mod tests { - use ra_syntax::SourceFile; + use syntax::SourceFile; use test_utils::{add_cursor, assert_eq_text, extract_offset, extract_range}; use super::*; @@ -437,11 +437,11 @@ fn foo() { // No space after the '{' check_join_lines( r" -<|>use ra_syntax::{ +<|>use syntax::{ TextSize, TextRange, };", r" -<|>use ra_syntax::{TextSize, TextRange, +<|>use syntax::{TextSize, TextRange, };", ); } @@ -451,11 +451,11 @@ fn foo() { // No space after the '}' check_join_lines( r" -use ra_syntax::{ +use syntax::{ <|> TextSize, TextRange };", r" -use ra_syntax::{ +use syntax::{ <|> TextSize, TextRange};", ); } @@ -465,11 +465,11 @@ use ra_syntax::{ // No space after the '}' check_join_lines( r" -use ra_syntax::{ +use syntax::{ <|> TextSize, TextRange, };", r" -use ra_syntax::{ +use syntax::{ <|> TextSize, TextRange};", ); } @@ -478,14 +478,14 @@ use ra_syntax::{ fn test_join_lines_use_tree() { check_join_lines( r" -use ra_syntax::{ +use syntax::{ algo::<|>{ find_token_at_offset, }, ast, };", r" -use ra_syntax::{ +use syntax::{ algo::<|>find_token_at_offset, ast, };", diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs index 09cb5faf68f..20967ba9900 100644 --- a/crates/ra_ide/src/lib.rs +++ b/crates/ra_ide/src/lib.rs @@ -56,7 +56,7 @@ use ra_ide_db::{ symbol_index::{self, FileSymbol}, LineIndexDatabase, }; -use ra_syntax::{SourceFile, TextRange, TextSize}; +use syntax::{SourceFile, TextRange, TextSize}; use crate::display::ToNav; diff --git a/crates/ra_ide/src/matching_brace.rs b/crates/ra_ide/src/matching_brace.rs index 742d70c9c08..cb6abb0db94 100644 --- a/crates/ra_ide/src/matching_brace.rs +++ b/crates/ra_ide/src/matching_brace.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{self, AstNode}, SourceFile, SyntaxKind, TextSize, T, }; diff --git a/crates/ra_ide/src/parent_module.rs b/crates/ra_ide/src/parent_module.rs index e3e0c763923..69af0c86ad0 100644 --- a/crates/ra_ide/src/parent_module.rs +++ b/crates/ra_ide/src/parent_module.rs @@ -1,7 +1,7 @@ use hir::Semantics; use ra_db::{CrateId, FileId, FilePosition}; use ra_ide_db::RootDatabase; -use ra_syntax::{ +use syntax::{ algo::find_node_at_offset, ast::{self, AstNode}, }; diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs index c4eea3a45bb..e89dca869ca 100644 --- a/crates/ra_ide/src/references.rs +++ b/crates/ra_ide/src/references.rs @@ -17,7 +17,7 @@ use ra_ide_db::{ search::SearchScope, RootDatabase, }; -use ra_syntax::{ +use syntax::{ algo::find_node_at_offset, ast::{self, NameOwner}, AstNode, SyntaxKind, SyntaxNode, TextRange, TokenAtOffset, diff --git a/crates/ra_ide/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs index 9c688fb0631..a075618e74f 100644 --- a/crates/ra_ide/src/references/rename.rs +++ b/crates/ra_ide/src/references/rename.rs @@ -6,12 +6,12 @@ use ra_ide_db::{ defs::{classify_name, classify_name_ref, Definition, NameClass, NameRefClass}, RootDatabase, }; -use ra_syntax::{ +use std::convert::TryInto; +use syntax::{ algo::find_node_at_offset, ast::{self, NameOwner}, lex_single_valid_syntax_kind, match_ast, AstNode, SyntaxKind, SyntaxNode, SyntaxToken, }; -use std::convert::TryInto; use test_utils::mark; use text_edit::TextEdit; diff --git a/crates/ra_ide/src/runnables.rs b/crates/ra_ide/src/runnables.rs index 3b7162b8416..54cb3b30944 100644 --- a/crates/ra_ide/src/runnables.rs +++ b/crates/ra_ide/src/runnables.rs @@ -4,7 +4,7 @@ use hir::{AsAssocItem, Attrs, HirFileId, InFile, Semantics}; use itertools::Itertools; use ra_cfg::CfgExpr; use ra_ide_db::RootDatabase; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode, AttrsOwner, DocCommentsOwner, ModuleItemOwner, NameOwner}, match_ast, SyntaxNode, }; diff --git a/crates/ra_ide/src/status.rs b/crates/ra_ide/src/status.rs index 009bb662f77..797ead1adab 100644 --- a/crates/ra_ide/src/status.rs +++ b/crates/ra_ide/src/status.rs @@ -10,8 +10,8 @@ use ra_ide_db::{ symbol_index::{LibrarySymbolsQuery, SymbolIndex}, RootDatabase, }; -use ra_syntax::{ast, Parse, SyntaxNode}; use rustc_hash::FxHashMap; +use syntax::{ast, Parse, SyntaxNode}; use crate::FileId; diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs index ebdf05127a9..4b41ceb1dc4 100644 --- a/crates/ra_ide/src/syntax_highlighting.rs +++ b/crates/ra_ide/src/syntax_highlighting.rs @@ -9,13 +9,13 @@ use ra_ide_db::{ defs::{classify_name, classify_name_ref, Definition, NameClass, NameRefClass}, RootDatabase, }; -use ra_syntax::{ +use rustc_hash::FxHashMap; +use syntax::{ ast::{self, HasFormatSpecifier}, AstNode, AstToken, Direction, NodeOrToken, SyntaxElement, SyntaxKind::*, TextRange, WalkEvent, T, }; -use rustc_hash::FxHashMap; use crate::FileId; diff --git a/crates/ra_ide/src/syntax_highlighting/html.rs b/crates/ra_ide/src/syntax_highlighting/html.rs index a5e7d28676d..418122648a6 100644 --- a/crates/ra_ide/src/syntax_highlighting/html.rs +++ b/crates/ra_ide/src/syntax_highlighting/html.rs @@ -2,7 +2,7 @@ use oorandom::Rand32; use ra_db::SourceDatabase; -use ra_syntax::{AstNode, TextRange, TextSize}; +use syntax::{AstNode, TextRange, TextSize}; use crate::{syntax_highlighting::highlight, FileId, RootDatabase}; diff --git a/crates/ra_ide/src/syntax_highlighting/injection.rs b/crates/ra_ide/src/syntax_highlighting/injection.rs index 6046643ef1e..43f4e6feab3 100644 --- a/crates/ra_ide/src/syntax_highlighting/injection.rs +++ b/crates/ra_ide/src/syntax_highlighting/injection.rs @@ -5,7 +5,7 @@ use std::{collections::BTreeMap, convert::TryFrom}; use ast::{HasQuotes, HasStringValue}; use hir::Semantics; use itertools::Itertools; -use ra_syntax::{ast, AstToken, SyntaxNode, SyntaxToken, TextRange, TextSize}; +use syntax::{ast, AstToken, SyntaxNode, SyntaxToken, TextRange, TextSize}; use crate::{ call_info::ActiveParameter, Analysis, Highlight, HighlightModifier, HighlightTag, diff --git a/crates/ra_ide/src/syntax_highlighting/tests.rs b/crates/ra_ide/src/syntax_highlighting/tests.rs index a8087635a87..594f61e85b7 100644 --- a/crates/ra_ide/src/syntax_highlighting/tests.rs +++ b/crates/ra_ide/src/syntax_highlighting/tests.rs @@ -135,7 +135,7 @@ fn bar() { #[test] fn accidentally_quadratic() { - let file = project_dir().join("crates/ra_syntax/test_data/accidentally_quadratic"); + let file = project_dir().join("crates/syntax/test_data/accidentally_quadratic"); let src = fs::read_to_string(file).unwrap(); let (analysis, file_id) = single_file(&src); diff --git a/crates/ra_ide/src/syntax_tree.rs b/crates/ra_ide/src/syntax_tree.rs index 07217e8087a..d05ff221497 100644 --- a/crates/ra_ide/src/syntax_tree.rs +++ b/crates/ra_ide/src/syntax_tree.rs @@ -1,6 +1,6 @@ use ra_db::{FileId, SourceDatabase}; use ra_ide_db::RootDatabase; -use ra_syntax::{ +use syntax::{ algo, AstNode, NodeOrToken, SourceFile, SyntaxKind::{RAW_STRING, STRING}, SyntaxToken, TextRange, TextSize, diff --git a/crates/ra_ide/src/typing.rs b/crates/ra_ide/src/typing.rs index 952429cde65..c408b1d5218 100644 --- a/crates/ra_ide/src/typing.rs +++ b/crates/ra_ide/src/typing.rs @@ -18,7 +18,7 @@ mod on_enter; use ra_db::{FilePosition, SourceDatabase}; use ra_fmt::leading_indent; use ra_ide_db::{source_change::SourceFileEdit, RootDatabase}; -use ra_syntax::{ +use syntax::{ algo::find_node_at_offset, ast::{self, AstToken}, AstNode, SourceFile, diff --git a/crates/ra_ide/src/typing/on_enter.rs b/crates/ra_ide/src/typing/on_enter.rs index c0c5ce3bcd2..9cd153f94ab 100644 --- a/crates/ra_ide/src/typing/on_enter.rs +++ b/crates/ra_ide/src/typing/on_enter.rs @@ -3,7 +3,7 @@ use ra_db::{FilePosition, SourceDatabase}; use ra_ide_db::RootDatabase; -use ra_syntax::{ +use syntax::{ ast::{self, AstToken}, AstNode, SmolStr, SourceFile, SyntaxKind::*, diff --git a/crates/ra_ide_db/Cargo.toml b/crates/ra_ide_db/Cargo.toml index 5446a596141..9ed13a13dbd 100644 --- a/crates/ra_ide_db/Cargo.toml +++ b/crates/ra_ide_db/Cargo.toml @@ -21,7 +21,7 @@ either = "1.5.3" stdx = { path = "../stdx" } -ra_syntax = { path = "../ra_syntax" } +syntax = { path = "../syntax" } text_edit = { path = "../text_edit" } ra_db = { path = "../ra_db" } profile = { path = "../profile" } diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs index d46d1fe71ba..7b5d6ac491b 100644 --- a/crates/ra_ide_db/src/defs.rs +++ b/crates/ra_ide_db/src/defs.rs @@ -9,7 +9,7 @@ use hir::{ db::HirDatabase, Crate, Field, HasVisibility, ImplDef, Local, MacroDef, Module, ModuleDef, Name, PathResolution, Semantics, TypeParam, Visibility, }; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode}, match_ast, SyntaxNode, }; diff --git a/crates/ra_ide_db/src/imports_locator.rs b/crates/ra_ide_db/src/imports_locator.rs index d510ce3b76e..1d0c202915e 100644 --- a/crates/ra_ide_db/src/imports_locator.rs +++ b/crates/ra_ide_db/src/imports_locator.rs @@ -2,7 +2,7 @@ //! Later, this should be moved away to a separate crate that is accessible from the ra_assists module. use hir::{Crate, MacroDef, ModuleDef, Semantics}; -use ra_syntax::{ast, AstNode, SyntaxKind::NAME}; +use syntax::{ast, AstNode, SyntaxKind::NAME}; use crate::{ defs::{classify_name, Definition}, diff --git a/crates/ra_ide_db/src/line_index.rs b/crates/ra_ide_db/src/line_index.rs index 2ab662098a6..a381f7fb8d5 100644 --- a/crates/ra_ide_db/src/line_index.rs +++ b/crates/ra_ide_db/src/line_index.rs @@ -2,9 +2,9 @@ //! representation. use std::iter; -use ra_syntax::{TextRange, TextSize}; use rustc_hash::FxHashMap; use stdx::partition_point; +use syntax::{TextRange, TextSize}; #[derive(Clone, Debug, PartialEq, Eq)] pub struct LineIndex { diff --git a/crates/ra_ide_db/src/search.rs b/crates/ra_ide_db/src/search.rs index d90b830d0c9..7827cc71cf9 100644 --- a/crates/ra_ide_db/src/search.rs +++ b/crates/ra_ide_db/src/search.rs @@ -9,8 +9,8 @@ use std::{convert::TryInto, mem}; use hir::{DefWithBody, HasSource, Module, ModuleSource, Semantics, Visibility}; use once_cell::unsync::Lazy; use ra_db::{FileId, FileRange, SourceDatabaseExt}; -use ra_syntax::{ast, match_ast, AstNode, TextRange, TextSize}; use rustc_hash::FxHashMap; +use syntax::{ast, match_ast, AstNode, TextRange, TextSize}; use crate::{ defs::{classify_name_ref, Definition, NameRefClass}, diff --git a/crates/ra_ide_db/src/symbol_index.rs b/crates/ra_ide_db/src/symbol_index.rs index 6ca8bb51698..896092b4675 100644 --- a/crates/ra_ide_db/src/symbol_index.rs +++ b/crates/ra_ide_db/src/symbol_index.rs @@ -34,14 +34,14 @@ use ra_db::{ salsa::{self, ParallelDatabase}, CrateId, FileId, SourceDatabaseExt, SourceRootId, }; -use ra_syntax::{ +use rayon::prelude::*; +use rustc_hash::{FxHashMap, FxHashSet}; +use syntax::{ ast::{self, NameOwner}, match_ast, AstNode, Parse, SmolStr, SourceFile, SyntaxKind::{self, *}, SyntaxNode, SyntaxNodePtr, TextRange, WalkEvent, }; -use rayon::prelude::*; -use rustc_hash::{FxHashMap, FxHashSet}; use crate::RootDatabase; diff --git a/crates/ra_mbe/Cargo.toml b/crates/ra_mbe/Cargo.toml index e518f73e32c..4a4be65ebcc 100644 --- a/crates/ra_mbe/Cargo.toml +++ b/crates/ra_mbe/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0" doctest = false [dependencies] -ra_syntax = { path = "../ra_syntax" } +syntax = { path = "../syntax" } parser = { path = "../parser" } tt = { path = "../tt" } rustc-hash = "1.1.0" diff --git a/crates/ra_mbe/src/mbe_expander.rs b/crates/ra_mbe/src/mbe_expander.rs index b1eacf1242c..1ad8b9f8a58 100644 --- a/crates/ra_mbe/src/mbe_expander.rs +++ b/crates/ra_mbe/src/mbe_expander.rs @@ -5,8 +5,8 @@ mod matcher; mod transcriber; -use ra_syntax::SmolStr; use rustc_hash::FxHashMap; +use syntax::SmolStr; use crate::{ExpandError, ExpandResult}; @@ -123,7 +123,7 @@ enum Fragment { #[cfg(test)] mod tests { - use ra_syntax::{ast, AstNode}; + use syntax::{ast, AstNode}; use super::*; use crate::ast_to_token_tree; diff --git a/crates/ra_mbe/src/mbe_expander/matcher.rs b/crates/ra_mbe/src/mbe_expander/matcher.rs index c752804b29d..b698b98326d 100644 --- a/crates/ra_mbe/src/mbe_expander/matcher.rs +++ b/crates/ra_mbe/src/mbe_expander/matcher.rs @@ -10,7 +10,7 @@ use crate::{ use super::ExpandResult; use parser::{FragmentKind::*, TreeSink}; -use ra_syntax::{SmolStr, SyntaxKind}; +use syntax::{SmolStr, SyntaxKind}; use tt::buffer::{Cursor, TokenBuffer}; impl Bindings { diff --git a/crates/ra_mbe/src/mbe_expander/transcriber.rs b/crates/ra_mbe/src/mbe_expander/transcriber.rs index 7c9bb4d00e1..c9525c5bf20 100644 --- a/crates/ra_mbe/src/mbe_expander/transcriber.rs +++ b/crates/ra_mbe/src/mbe_expander/transcriber.rs @@ -1,7 +1,7 @@ //! Transcriber takes a template, like `fn $ident() {}`, a set of bindings like //! `$ident => foo`, interpolates variables in the template, to get `fn foo() {}` -use ra_syntax::SmolStr; +use syntax::SmolStr; use super::ExpandResult; use crate::{ diff --git a/crates/ra_mbe/src/parser.rs b/crates/ra_mbe/src/parser.rs index 1e5dafbdf91..6b46a1673c3 100644 --- a/crates/ra_mbe/src/parser.rs +++ b/crates/ra_mbe/src/parser.rs @@ -1,8 +1,8 @@ //! Parser recognizes special macro syntax, `$var` and `$(repeat)*`, in token //! trees. -use ra_syntax::SmolStr; use smallvec::SmallVec; +use syntax::SmolStr; use crate::{tt_iter::TtIter, ExpandError}; diff --git a/crates/ra_mbe/src/subtree_source.rs b/crates/ra_mbe/src/subtree_source.rs index 1a1cb08cf77..41461b3150a 100644 --- a/crates/ra_mbe/src/subtree_source.rs +++ b/crates/ra_mbe/src/subtree_source.rs @@ -1,8 +1,8 @@ //! FIXME: write short doc here use parser::{Token, TokenSource}; -use ra_syntax::{lex_single_syntax_kind, SmolStr, SyntaxKind, SyntaxKind::*, T}; use std::cell::{Cell, Ref, RefCell}; +use syntax::{lex_single_syntax_kind, SmolStr, SyntaxKind, SyntaxKind::*, T}; use tt::buffer::{Cursor, TokenBuffer}; #[derive(Debug, Clone, Eq, PartialEq)] diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs index 7b9c88ae643..a8ad917fb88 100644 --- a/crates/ra_mbe/src/syntax_bridge.rs +++ b/crates/ra_mbe/src/syntax_bridge.rs @@ -1,13 +1,13 @@ //! FIXME: write short doc here use parser::{FragmentKind, ParseError, TreeSink}; -use ra_syntax::{ +use rustc_hash::FxHashMap; +use syntax::{ ast::{self, make::tokens::doc_comment}, tokenize, AstToken, Parse, SmolStr, SyntaxKind, SyntaxKind::*, SyntaxNode, SyntaxToken, SyntaxTreeBuilder, TextRange, TextSize, Token as RawToken, T, }; -use rustc_hash::FxHashMap; use tt::buffer::{Cursor, TokenBuffer}; use crate::subtree_source::SubtreeTokenSource; @@ -176,7 +176,7 @@ fn doc_comment_text(comment: &ast::Comment) -> SmolStr { text.into() } -fn convert_doc_comment(token: &ra_syntax::SyntaxToken) -> Option> { +fn convert_doc_comment(token: &syntax::SyntaxToken) -> Option> { let comment = ast::Comment::cast(token.clone())?; let doc = comment.kind().doc?; @@ -716,7 +716,7 @@ mod tests { use super::*; use crate::tests::parse_macro; use parser::TokenSource; - use ra_syntax::{ + use syntax::{ algo::{insert_children, InsertPosition}, ast::AstNode, }; diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs index be39b0e45ee..0796ceee1a7 100644 --- a/crates/ra_mbe/src/tests.rs +++ b/crates/ra_mbe/src/tests.rs @@ -1,13 +1,13 @@ use std::fmt::Write; use ::parser::FragmentKind; -use ra_syntax::{ast, AstNode, NodeOrToken, SyntaxKind::IDENT, SyntaxNode, WalkEvent, T}; +use syntax::{ast, AstNode, NodeOrToken, SyntaxKind::IDENT, SyntaxNode, WalkEvent, T}; use test_utils::assert_eq_text; use super::*; mod rule_parsing { - use ra_syntax::{ast, AstNode}; + use syntax::{ast, AstNode}; use crate::ast_to_token_tree; @@ -1698,7 +1698,7 @@ pub(crate) fn parse_to_token_tree_by_syntax(ra_fixture: &str) -> tt::Subtree { parsed } -fn debug_dump_ignore_spaces(node: &ra_syntax::SyntaxNode) -> String { +fn debug_dump_ignore_spaces(node: &syntax::SyntaxNode) -> String { let mut level = 0; let mut buf = String::new(); macro_rules! indent { @@ -1718,7 +1718,7 @@ fn debug_dump_ignore_spaces(node: &ra_syntax::SyntaxNode) -> String { writeln!(buf, "{:?}", node.kind()).unwrap(); } NodeOrToken::Token(token) => match token.kind() { - ra_syntax::SyntaxKind::WHITESPACE => {} + syntax::SyntaxKind::WHITESPACE => {} _ => { indent!(); writeln!(buf, "{:?}", token.kind()).unwrap(); diff --git a/crates/ra_ssr/Cargo.toml b/crates/ra_ssr/Cargo.toml index d0f2ae73393..958baa2df73 100644 --- a/crates/ra_ssr/Cargo.toml +++ b/crates/ra_ssr/Cargo.toml @@ -12,7 +12,7 @@ doctest = false [dependencies] text_edit = { path = "../text_edit" } -ra_syntax = { path = "../ra_syntax" } +syntax = { path = "../syntax" } ra_db = { path = "../ra_db" } ra_ide_db = { path = "../ra_ide_db" } hir = { path = "../ra_hir", package = "ra_hir" } diff --git a/crates/ra_ssr/src/lib.rs b/crates/ra_ssr/src/lib.rs index c780b460a72..fb53212a3a5 100644 --- a/crates/ra_ssr/src/lib.rs +++ b/crates/ra_ssr/src/lib.rs @@ -21,9 +21,9 @@ use crate::matching::MatchFailureReason; use hir::Semantics; use ra_db::{FileId, FilePosition, FileRange}; use ra_ide_db::source_change::SourceFileEdit; -use ra_syntax::{ast, AstNode, SyntaxNode, TextRange}; use resolving::ResolvedRule; use rustc_hash::FxHashMap; +use syntax::{ast, AstNode, SyntaxNode, TextRange}; // A structured search replace rule. Create by calling `parse` on a str. #[derive(Debug)] diff --git a/crates/ra_ssr/src/matching.rs b/crates/ra_ssr/src/matching.rs index 0f72fea6911..125bf38951a 100644 --- a/crates/ra_ssr/src/matching.rs +++ b/crates/ra_ssr/src/matching.rs @@ -8,10 +8,10 @@ use crate::{ }; use hir::Semantics; use ra_db::FileRange; -use ra_syntax::ast::{AstNode, AstToken}; -use ra_syntax::{ast, SyntaxElement, SyntaxElementChildren, SyntaxKind, SyntaxNode, SyntaxToken}; use rustc_hash::FxHashMap; use std::{cell::Cell, iter::Peekable}; +use syntax::ast::{AstNode, AstToken}; +use syntax::{ast, SyntaxElement, SyntaxElementChildren, SyntaxKind, SyntaxNode, SyntaxToken}; use test_utils::mark; // Creates a match error. If we're currently attempting to match some code that we thought we were @@ -264,7 +264,7 @@ impl<'db, 'sema> Matcher<'db, 'sema> { &self, phase: &mut Phase, pattern: &mut Peekable, - code: &ra_syntax::SyntaxToken, + code: &syntax::SyntaxToken, ) -> Result<(), MatchFailed> { phase.record_ignored_comments(code); // Ignore whitespace and comments. @@ -444,7 +444,7 @@ impl<'db, 'sema> Matcher<'db, 'sema> { &self, phase: &mut Phase, pattern: &SyntaxNode, - code: &ra_syntax::SyntaxNode, + code: &syntax::SyntaxNode, ) -> Result<(), MatchFailed> { let mut pattern = PatternIterator::new(pattern).peekable(); let mut children = code.children_with_tokens(); diff --git a/crates/ra_ssr/src/nester.rs b/crates/ra_ssr/src/nester.rs index b3e20579bda..8be570d3cf9 100644 --- a/crates/ra_ssr/src/nester.rs +++ b/crates/ra_ssr/src/nester.rs @@ -8,8 +8,8 @@ //! middle match would take the second `foo` from the outer match. use crate::{Match, SsrMatches}; -use ra_syntax::SyntaxNode; use rustc_hash::FxHashMap; +use syntax::SyntaxNode; pub(crate) fn nest_and_remove_collisions( mut matches: Vec, diff --git a/crates/ra_ssr/src/parsing.rs b/crates/ra_ssr/src/parsing.rs index f455eb5b7e5..9570e96e36e 100644 --- a/crates/ra_ssr/src/parsing.rs +++ b/crates/ra_ssr/src/parsing.rs @@ -7,9 +7,9 @@ use crate::errors::bail; use crate::{SsrError, SsrPattern, SsrRule}; -use ra_syntax::{ast, AstNode, SmolStr, SyntaxKind, SyntaxNode, T}; use rustc_hash::{FxHashMap, FxHashSet}; use std::str::FromStr; +use syntax::{ast, AstNode, SmolStr, SyntaxKind, SyntaxNode, T}; use test_utils::mark; #[derive(Debug)] @@ -243,7 +243,7 @@ fn validate_rule(rule: &SsrRule) -> Result<(), SsrError> { fn tokenize(source: &str) -> Result, SsrError> { let mut start = 0; - let (raw_tokens, errors) = ra_syntax::tokenize(source); + let (raw_tokens, errors) = syntax::tokenize(source); if let Some(first_error) = errors.first() { bail!("Failed to parse pattern: {}", first_error); } diff --git a/crates/ra_ssr/src/replacing.rs b/crates/ra_ssr/src/replacing.rs index 74f9e7db616..8f8fe6149a5 100644 --- a/crates/ra_ssr/src/replacing.rs +++ b/crates/ra_ssr/src/replacing.rs @@ -2,9 +2,9 @@ use crate::matching::Var; use crate::{resolving::ResolvedRule, Match, SsrMatches}; -use ra_syntax::ast::{self, AstToken}; -use ra_syntax::{SyntaxElement, SyntaxKind, SyntaxNode, SyntaxToken, TextRange, TextSize}; use rustc_hash::{FxHashMap, FxHashSet}; +use syntax::ast::{self, AstToken}; +use syntax::{SyntaxElement, SyntaxKind, SyntaxNode, SyntaxToken, TextRange, TextSize}; use text_edit::TextEdit; /// Returns a text edit that will replace each match in `matches` with its corresponding replacement @@ -92,7 +92,7 @@ impl ReplacementRenderer<'_> { } fn render_node(&mut self, node: &SyntaxNode) { - use ra_syntax::ast::AstNode; + use syntax::ast::AstNode; if let Some(mod_path) = self.match_info.rendered_template_paths.get(&node) { self.out.push_str(&mod_path.to_string()); // Emit everything except for the segment's name-ref, since we already effectively @@ -180,7 +180,7 @@ impl ReplacementRenderer<'_> { } fn parse_as_kind(code: &str, kind: SyntaxKind) -> Option { - use ra_syntax::ast::AstNode; + use syntax::ast::AstNode; if ast::Expr::can_cast(kind) { if let Ok(expr) = ast::Expr::parse(code) { return Some(expr.syntax().clone()); diff --git a/crates/ra_ssr/src/resolving.rs b/crates/ra_ssr/src/resolving.rs index d53bd46c77f..7e7585c8bbe 100644 --- a/crates/ra_ssr/src/resolving.rs +++ b/crates/ra_ssr/src/resolving.rs @@ -4,8 +4,8 @@ use crate::errors::error; use crate::{parsing, SsrError}; use parsing::Placeholder; use ra_db::FilePosition; -use ra_syntax::{ast, SmolStr, SyntaxKind, SyntaxNode, SyntaxToken}; use rustc_hash::FxHashMap; +use syntax::{ast, SmolStr, SyntaxKind, SyntaxNode, SyntaxToken}; use test_utils::mark; pub(crate) struct ResolutionScope<'db> { @@ -70,7 +70,7 @@ struct Resolver<'a, 'db> { impl Resolver<'_, '_> { fn resolve_pattern_tree(&self, pattern: SyntaxNode) -> Result { - use ra_syntax::{SyntaxElement, T}; + use syntax::{SyntaxElement, T}; let mut resolved_paths = FxHashMap::default(); self.resolve(pattern.clone(), 0, &mut resolved_paths)?; let ufcs_function_calls = resolved_paths @@ -108,7 +108,7 @@ impl Resolver<'_, '_> { depth: u32, resolved_paths: &mut FxHashMap, ) -> Result<(), SsrError> { - use ra_syntax::ast::AstNode; + use syntax::ast::AstNode; if let Some(path) = ast::Path::cast(node.clone()) { if is_self(&path) { // Self cannot be resolved like other paths. @@ -179,7 +179,7 @@ impl<'db> ResolutionScope<'db> { sema: &hir::Semantics<'db, ra_ide_db::RootDatabase>, resolve_context: FilePosition, ) -> ResolutionScope<'db> { - use ra_syntax::ast::AstNode; + use syntax::ast::AstNode; let file = sema.parse(resolve_context.file_id); // Find a node at the requested position, falling back to the whole file. let node = file diff --git a/crates/ra_ssr/src/search.rs b/crates/ra_ssr/src/search.rs index 85ffa2ac23f..e44e1495992 100644 --- a/crates/ra_ssr/src/search.rs +++ b/crates/ra_ssr/src/search.rs @@ -10,8 +10,8 @@ use ra_ide_db::{ defs::Definition, search::{Reference, SearchScope}, }; -use ra_syntax::{ast, AstNode, SyntaxKind, SyntaxNode}; use rustc_hash::FxHashSet; +use syntax::{ast, AstNode, SyntaxKind, SyntaxNode}; use test_utils::mark; /// A cache for the results of find_usages. This is for when we have multiple patterns that have the diff --git a/crates/ra_syntax/Cargo.toml b/crates/ra_syntax/Cargo.toml deleted file mode 100644 index eec4bd845ed..00000000000 --- a/crates/ra_syntax/Cargo.toml +++ /dev/null @@ -1,36 +0,0 @@ -[package] -edition = "2018" -name = "ra_syntax" -version = "0.1.0" -authors = ["rust-analyzer developers"] -license = "MIT OR Apache-2.0" -description = "Comment and whitespace preserving parser for the Rust language" -repository = "https://github.com/rust-analyzer/rust-analyzer" - -[lib] -doctest = false - -[dependencies] -itertools = "0.9.0" -rowan = "0.10.0" -rustc_lexer = { version = "671.0.0", package = "rustc-ap-rustc_lexer" } -rustc-hash = "1.1.0" -arrayvec = "0.5.1" -once_cell = "1.3.1" - -stdx = { path = "../stdx" } - -text_edit = { path = "../text_edit" } -parser = { path = "../parser" } - -# This crate transitively depends on `smol_str` via `rowan`. -# ideally, `serde` should be enabled by `rust-analyzer`, but we enable it here -# to reduce number of compilations -smol_str = { version = "0.1.15", features = ["serde"] } -serde = { version = "1.0.106", features = ["derive"] } - -[dev-dependencies] -test_utils = { path = "../test_utils" } -expect = { path = "../expect" } -walkdir = "2.3.1" -rayon = "1" diff --git a/crates/ra_syntax/fuzz/.gitignore b/crates/ra_syntax/fuzz/.gitignore deleted file mode 100644 index f734abd499c..00000000000 --- a/crates/ra_syntax/fuzz/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -Cargo.lock -target -corpus -artifacts diff --git a/crates/ra_syntax/fuzz/Cargo.toml b/crates/ra_syntax/fuzz/Cargo.toml deleted file mode 100644 index 4cec3c4cd8b..00000000000 --- a/crates/ra_syntax/fuzz/Cargo.toml +++ /dev/null @@ -1,27 +0,0 @@ - -[package] -name = "ra_syntax-fuzz" -version = "0.0.1" -authors = ["rust-analyzer developers"] -publish = false -edition = "2018" - -[package.metadata] -cargo-fuzz = true - -[dependencies] -ra_syntax = { path = ".." } -text_edit = { path = "../../text_edit" } -libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git" } - -# Prevent this from interfering with workspaces -[workspace] -members = ["."] - -[[bin]] -name = "parser" -path = "fuzz_targets/parser.rs" - -[[bin]] -name = "reparse" -path = "fuzz_targets/reparse.rs" diff --git a/crates/ra_syntax/fuzz/fuzz_targets/parser.rs b/crates/ra_syntax/fuzz/fuzz_targets/parser.rs deleted file mode 100644 index 7bc4ef30d0e..00000000000 --- a/crates/ra_syntax/fuzz/fuzz_targets/parser.rs +++ /dev/null @@ -1,11 +0,0 @@ -//! FIXME: write short doc here - -#![no_main] -use libfuzzer_sys::fuzz_target; -use ra_syntax::fuzz::check_parser; - -fuzz_target!(|data: &[u8]| { - if let Ok(text) = std::str::from_utf8(data) { - check_parser(text) - } -}); diff --git a/crates/ra_syntax/fuzz/fuzz_targets/reparse.rs b/crates/ra_syntax/fuzz/fuzz_targets/reparse.rs deleted file mode 100644 index 16598f5f110..00000000000 --- a/crates/ra_syntax/fuzz/fuzz_targets/reparse.rs +++ /dev/null @@ -1,11 +0,0 @@ -//! FIXME: write short doc here - -#![no_main] -use libfuzzer_sys::fuzz_target; -use ra_syntax::fuzz::CheckReparse; - -fuzz_target!(|data: &[u8]| { - if let Some(check) = CheckReparse::from_data(data) { - check.run(); - } -}); diff --git a/crates/ra_syntax/src/algo.rs b/crates/ra_syntax/src/algo.rs deleted file mode 100644 index 6254b38ba1c..00000000000 --- a/crates/ra_syntax/src/algo.rs +++ /dev/null @@ -1,406 +0,0 @@ -//! FIXME: write short doc here - -use std::{ - fmt, - ops::{self, RangeInclusive}, -}; - -use itertools::Itertools; -use rustc_hash::FxHashMap; -use text_edit::TextEditBuilder; - -use crate::{ - AstNode, Direction, NodeOrToken, SyntaxElement, SyntaxKind, SyntaxNode, SyntaxNodePtr, - SyntaxToken, TextRange, TextSize, -}; - -/// Returns ancestors of the node at the offset, sorted by length. This should -/// do the right thing at an edge, e.g. when searching for expressions at `{ -/// <|>foo }` we will get the name reference instead of the whole block, which -/// we would get if we just did `find_token_at_offset(...).flat_map(|t| -/// t.parent().ancestors())`. -pub fn ancestors_at_offset( - node: &SyntaxNode, - offset: TextSize, -) -> impl Iterator { - node.token_at_offset(offset) - .map(|token| token.parent().ancestors()) - .kmerge_by(|node1, node2| node1.text_range().len() < node2.text_range().len()) -} - -/// Finds a node of specific Ast type at offset. Note that this is slightly -/// imprecise: if the cursor is strictly between two nodes of the desired type, -/// as in -/// -/// ```no-run -/// struct Foo {}|struct Bar; -/// ``` -/// -/// then the shorter node will be silently preferred. -pub fn find_node_at_offset(syntax: &SyntaxNode, offset: TextSize) -> Option { - ancestors_at_offset(syntax, offset).find_map(N::cast) -} - -pub fn find_node_at_range(syntax: &SyntaxNode, range: TextRange) -> Option { - find_covering_element(syntax, range).ancestors().find_map(N::cast) -} - -/// Skip to next non `trivia` token -pub fn skip_trivia_token(mut token: SyntaxToken, direction: Direction) -> Option { - while token.kind().is_trivia() { - token = match direction { - Direction::Next => token.next_token()?, - Direction::Prev => token.prev_token()?, - } - } - Some(token) -} - -/// Finds the first sibling in the given direction which is not `trivia` -pub fn non_trivia_sibling(element: SyntaxElement, direction: Direction) -> Option { - return match element { - NodeOrToken::Node(node) => node.siblings_with_tokens(direction).skip(1).find(not_trivia), - NodeOrToken::Token(token) => token.siblings_with_tokens(direction).skip(1).find(not_trivia), - }; - - fn not_trivia(element: &SyntaxElement) -> bool { - match element { - NodeOrToken::Node(_) => true, - NodeOrToken::Token(token) => !token.kind().is_trivia(), - } - } -} - -pub fn find_covering_element(root: &SyntaxNode, range: TextRange) -> SyntaxElement { - root.covering_element(range) -} - -pub fn least_common_ancestor(u: &SyntaxNode, v: &SyntaxNode) -> Option { - if u == v { - return Some(u.clone()); - } - - let u_depth = u.ancestors().count(); - let v_depth = v.ancestors().count(); - let keep = u_depth.min(v_depth); - - let u_candidates = u.ancestors().skip(u_depth - keep); - let v_canidates = v.ancestors().skip(v_depth - keep); - let (res, _) = u_candidates.zip(v_canidates).find(|(x, y)| x == y)?; - Some(res) -} - -pub fn neighbor(me: &T, direction: Direction) -> Option { - me.syntax().siblings(direction).skip(1).find_map(T::cast) -} - -pub fn has_errors(node: &SyntaxNode) -> bool { - node.children().any(|it| it.kind() == SyntaxKind::ERROR) -} - -#[derive(Debug, PartialEq, Eq, Clone, Copy)] -pub enum InsertPosition { - First, - Last, - Before(T), - After(T), -} - -pub struct TreeDiff { - replacements: FxHashMap, -} - -impl TreeDiff { - pub fn into_text_edit(&self, builder: &mut TextEditBuilder) { - for (from, to) in self.replacements.iter() { - builder.replace(from.text_range(), to.to_string()) - } - } - - pub fn is_empty(&self) -> bool { - self.replacements.is_empty() - } -} - -/// Finds minimal the diff, which, applied to `from`, will result in `to`. -/// -/// Specifically, returns a map whose keys are descendants of `from` and values -/// are descendants of `to`, such that `replace_descendants(from, map) == to`. -/// -/// A trivial solution is a singleton map `{ from: to }`, but this function -/// tries to find a more fine-grained diff. -pub fn diff(from: &SyntaxNode, to: &SyntaxNode) -> TreeDiff { - let mut buf = FxHashMap::default(); - // FIXME: this is both horrible inefficient and gives larger than - // necessary diff. I bet there's a cool algorithm to diff trees properly. - go(&mut buf, from.clone().into(), to.clone().into()); - return TreeDiff { replacements: buf }; - - fn go( - buf: &mut FxHashMap, - lhs: SyntaxElement, - rhs: SyntaxElement, - ) { - if lhs.kind() == rhs.kind() - && lhs.text_range().len() == rhs.text_range().len() - && match (&lhs, &rhs) { - (NodeOrToken::Node(lhs), NodeOrToken::Node(rhs)) => { - lhs.green() == rhs.green() || lhs.text() == rhs.text() - } - (NodeOrToken::Token(lhs), NodeOrToken::Token(rhs)) => lhs.text() == rhs.text(), - _ => false, - } - { - return; - } - if let (Some(lhs), Some(rhs)) = (lhs.as_node(), rhs.as_node()) { - if lhs.children_with_tokens().count() == rhs.children_with_tokens().count() { - for (lhs, rhs) in lhs.children_with_tokens().zip(rhs.children_with_tokens()) { - go(buf, lhs, rhs) - } - return; - } - } - buf.insert(lhs, rhs); - } -} - -/// Adds specified children (tokens or nodes) to the current node at the -/// specific position. -/// -/// This is a type-unsafe low-level editing API, if you need to use it, -/// prefer to create a type-safe abstraction on top of it instead. -pub fn insert_children( - parent: &SyntaxNode, - position: InsertPosition, - to_insert: impl IntoIterator, -) -> SyntaxNode { - let mut to_insert = to_insert.into_iter(); - _insert_children(parent, position, &mut to_insert) -} - -fn _insert_children( - parent: &SyntaxNode, - position: InsertPosition, - to_insert: &mut dyn Iterator, -) -> SyntaxNode { - let mut delta = TextSize::default(); - let to_insert = to_insert.map(|element| { - delta += element.text_range().len(); - to_green_element(element) - }); - - let mut old_children = parent.green().children().map(|it| match it { - NodeOrToken::Token(it) => NodeOrToken::Token(it.clone()), - NodeOrToken::Node(it) => NodeOrToken::Node(it.clone()), - }); - - let new_children = match &position { - InsertPosition::First => to_insert.chain(old_children).collect::>(), - InsertPosition::Last => old_children.chain(to_insert).collect::>(), - InsertPosition::Before(anchor) | InsertPosition::After(anchor) => { - let take_anchor = if let InsertPosition::After(_) = position { 1 } else { 0 }; - let split_at = position_of_child(parent, anchor.clone()) + take_anchor; - let before = old_children.by_ref().take(split_at).collect::>(); - before.into_iter().chain(to_insert).chain(old_children).collect::>() - } - }; - - with_children(parent, new_children) -} - -/// Replaces all nodes in `to_delete` with nodes from `to_insert` -/// -/// This is a type-unsafe low-level editing API, if you need to use it, -/// prefer to create a type-safe abstraction on top of it instead. -pub fn replace_children( - parent: &SyntaxNode, - to_delete: RangeInclusive, - to_insert: impl IntoIterator, -) -> SyntaxNode { - let mut to_insert = to_insert.into_iter(); - _replace_children(parent, to_delete, &mut to_insert) -} - -fn _replace_children( - parent: &SyntaxNode, - to_delete: RangeInclusive, - to_insert: &mut dyn Iterator, -) -> SyntaxNode { - let start = position_of_child(parent, to_delete.start().clone()); - let end = position_of_child(parent, to_delete.end().clone()); - let mut old_children = parent.green().children().map(|it| match it { - NodeOrToken::Token(it) => NodeOrToken::Token(it.clone()), - NodeOrToken::Node(it) => NodeOrToken::Node(it.clone()), - }); - - let before = old_children.by_ref().take(start).collect::>(); - let new_children = before - .into_iter() - .chain(to_insert.map(to_green_element)) - .chain(old_children.skip(end + 1 - start)) - .collect::>(); - with_children(parent, new_children) -} - -#[derive(Default)] -pub struct SyntaxRewriter<'a> { - f: Option Option + 'a>>, - //FIXME: add debug_assertions that all elements are in fact from the same file. - replacements: FxHashMap, -} - -impl fmt::Debug for SyntaxRewriter<'_> { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("SyntaxRewriter").field("replacements", &self.replacements).finish() - } -} - -impl<'a> SyntaxRewriter<'a> { - pub fn from_fn(f: impl Fn(&SyntaxElement) -> Option + 'a) -> SyntaxRewriter<'a> { - SyntaxRewriter { f: Some(Box::new(f)), replacements: FxHashMap::default() } - } - pub fn delete>(&mut self, what: &T) { - let what = what.clone().into(); - let replacement = Replacement::Delete; - self.replacements.insert(what, replacement); - } - pub fn replace>(&mut self, what: &T, with: &T) { - let what = what.clone().into(); - let replacement = Replacement::Single(with.clone().into()); - self.replacements.insert(what, replacement); - } - pub fn replace_with_many>( - &mut self, - what: &T, - with: Vec, - ) { - let what = what.clone().into(); - let replacement = Replacement::Many(with); - self.replacements.insert(what, replacement); - } - pub fn replace_ast(&mut self, what: &T, with: &T) { - self.replace(what.syntax(), with.syntax()) - } - - pub fn rewrite(&self, node: &SyntaxNode) -> SyntaxNode { - if self.f.is_none() && self.replacements.is_empty() { - return node.clone(); - } - self.rewrite_children(node) - } - - pub fn rewrite_ast(self, node: &N) -> N { - N::cast(self.rewrite(node.syntax())).unwrap() - } - - /// Returns a node that encompasses all replacements to be done by this rewriter. - /// - /// Passing the returned node to `rewrite` will apply all replacements queued up in `self`. - /// - /// Returns `None` when there are no replacements. - pub fn rewrite_root(&self) -> Option { - assert!(self.f.is_none()); - self.replacements - .keys() - .map(|element| match element { - SyntaxElement::Node(it) => it.clone(), - SyntaxElement::Token(it) => it.parent(), - }) - // If we only have one replacement, we must return its parent node, since `rewrite` does - // not replace the node passed to it. - .map(|it| it.parent().unwrap_or(it)) - .fold1(|a, b| least_common_ancestor(&a, &b).unwrap()) - } - - fn replacement(&self, element: &SyntaxElement) -> Option { - if let Some(f) = &self.f { - assert!(self.replacements.is_empty()); - return f(element).map(Replacement::Single); - } - self.replacements.get(element).cloned() - } - - fn rewrite_children(&self, node: &SyntaxNode) -> SyntaxNode { - // FIXME: this could be made much faster. - let mut new_children = Vec::new(); - for child in node.children_with_tokens() { - self.rewrite_self(&mut new_children, &child); - } - with_children(node, new_children) - } - - fn rewrite_self( - &self, - acc: &mut Vec>, - element: &SyntaxElement, - ) { - if let Some(replacement) = self.replacement(&element) { - match replacement { - Replacement::Single(NodeOrToken::Node(it)) => { - acc.push(NodeOrToken::Node(it.green().clone())) - } - Replacement::Single(NodeOrToken::Token(it)) => { - acc.push(NodeOrToken::Token(it.green().clone())) - } - Replacement::Many(replacements) => { - acc.extend(replacements.iter().map(|it| match it { - NodeOrToken::Node(it) => NodeOrToken::Node(it.green().clone()), - NodeOrToken::Token(it) => NodeOrToken::Token(it.green().clone()), - })) - } - Replacement::Delete => (), - }; - return; - } - let res = match element { - NodeOrToken::Token(it) => NodeOrToken::Token(it.green().clone()), - NodeOrToken::Node(it) => NodeOrToken::Node(self.rewrite_children(it).green().clone()), - }; - acc.push(res) - } -} - -impl ops::AddAssign for SyntaxRewriter<'_> { - fn add_assign(&mut self, rhs: SyntaxRewriter) { - assert!(rhs.f.is_none()); - self.replacements.extend(rhs.replacements) - } -} - -#[derive(Clone, Debug)] -enum Replacement { - Delete, - Single(SyntaxElement), - Many(Vec), -} - -fn with_children( - parent: &SyntaxNode, - new_children: Vec>, -) -> SyntaxNode { - let len = new_children.iter().map(|it| it.text_len()).sum::(); - let new_node = rowan::GreenNode::new(rowan::SyntaxKind(parent.kind() as u16), new_children); - let new_root_node = parent.replace_with(new_node); - let new_root_node = SyntaxNode::new_root(new_root_node); - - // FIXME: use a more elegant way to re-fetch the node (#1185), make - // `range` private afterwards - let mut ptr = SyntaxNodePtr::new(parent); - ptr.range = TextRange::at(ptr.range.start(), len); - ptr.to_node(&new_root_node) -} - -fn position_of_child(parent: &SyntaxNode, child: SyntaxElement) -> usize { - parent - .children_with_tokens() - .position(|it| it == child) - .expect("element is not a child of current element") -} - -fn to_green_element(element: SyntaxElement) -> NodeOrToken { - match element { - NodeOrToken::Node(it) => it.green().clone().into(), - NodeOrToken::Token(it) => it.green().clone().into(), - } -} diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs deleted file mode 100644 index d536bb1e7d6..00000000000 --- a/crates/ra_syntax/src/ast.rs +++ /dev/null @@ -1,331 +0,0 @@ -//! Abstract Syntax Tree, layered on top of untyped `SyntaxNode`s - -mod generated; -mod traits; -mod token_ext; -mod node_ext; -mod expr_ext; -pub mod edit; -pub mod make; - -use std::marker::PhantomData; - -use crate::{ - syntax_node::{SyntaxNode, SyntaxNodeChildren, SyntaxToken}, - SmolStr, SyntaxKind, -}; - -pub use self::{ - expr_ext::{ArrayExprKind, BinOp, Effect, ElseBranch, LiteralKind, PrefixOp, RangeOp}, - generated::*, - node_ext::{ - AttrKind, FieldKind, NameOrNameRef, PathSegmentKind, SelfParamKind, SlicePatComponents, - StructKind, TypeBoundKind, VisibilityKind, - }, - token_ext::*, - traits::*, -}; - -/// The main trait to go from untyped `SyntaxNode` to a typed ast. The -/// conversion itself has zero runtime cost: ast and syntax nodes have exactly -/// the same representation: a pointer to the tree root and a pointer to the -/// node itself. -pub trait AstNode { - fn can_cast(kind: SyntaxKind) -> bool - where - Self: Sized; - - fn cast(syntax: SyntaxNode) -> Option - where - Self: Sized; - - fn syntax(&self) -> &SyntaxNode; -} - -/// Like `AstNode`, but wraps tokens rather than interior nodes. -pub trait AstToken { - fn can_cast(token: SyntaxKind) -> bool - where - Self: Sized; - - fn cast(syntax: SyntaxToken) -> Option - where - Self: Sized; - - fn syntax(&self) -> &SyntaxToken; - - fn text(&self) -> &SmolStr { - self.syntax().text() - } -} - -/// An iterator over `SyntaxNode` children of a particular AST type. -#[derive(Debug, Clone)] -pub struct AstChildren { - inner: SyntaxNodeChildren, - ph: PhantomData, -} - -impl AstChildren { - fn new(parent: &SyntaxNode) -> Self { - AstChildren { inner: parent.children(), ph: PhantomData } - } -} - -impl Iterator for AstChildren { - type Item = N; - fn next(&mut self) -> Option { - self.inner.find_map(N::cast) - } -} - -mod support { - use super::{AstChildren, AstNode, SyntaxKind, SyntaxNode, SyntaxToken}; - - pub(super) fn child(parent: &SyntaxNode) -> Option { - parent.children().find_map(N::cast) - } - - pub(super) fn children(parent: &SyntaxNode) -> AstChildren { - AstChildren::new(parent) - } - - pub(super) fn token(parent: &SyntaxNode, kind: SyntaxKind) -> Option { - parent.children_with_tokens().filter_map(|it| it.into_token()).find(|it| it.kind() == kind) - } -} - -#[test] -fn assert_ast_is_object_safe() { - fn _f(_: &dyn AstNode, _: &dyn NameOwner) {} -} - -#[test] -fn test_doc_comment_none() { - let file = SourceFile::parse( - r#" - // non-doc - mod foo {} - "#, - ) - .ok() - .unwrap(); - let module = file.syntax().descendants().find_map(Module::cast).unwrap(); - assert!(module.doc_comment_text().is_none()); -} - -#[test] -fn test_doc_comment_of_items() { - let file = SourceFile::parse( - r#" - //! doc - // non-doc - mod foo {} - "#, - ) - .ok() - .unwrap(); - let module = file.syntax().descendants().find_map(Module::cast).unwrap(); - assert_eq!("doc", module.doc_comment_text().unwrap()); -} - -#[test] -fn test_doc_comment_of_statics() { - let file = SourceFile::parse( - r#" - /// Number of levels - static LEVELS: i32 = 0; - "#, - ) - .ok() - .unwrap(); - let st = file.syntax().descendants().find_map(Static::cast).unwrap(); - assert_eq!("Number of levels", st.doc_comment_text().unwrap()); -} - -#[test] -fn test_doc_comment_preserves_indents() { - let file = SourceFile::parse( - r#" - /// doc1 - /// ``` - /// fn foo() { - /// // ... - /// } - /// ``` - mod foo {} - "#, - ) - .ok() - .unwrap(); - let module = file.syntax().descendants().find_map(Module::cast).unwrap(); - assert_eq!("doc1\n```\nfn foo() {\n // ...\n}\n```", module.doc_comment_text().unwrap()); -} - -#[test] -fn test_doc_comment_preserves_newlines() { - let file = SourceFile::parse( - r#" - /// this - /// is - /// mod - /// foo - mod foo {} - "#, - ) - .ok() - .unwrap(); - let module = file.syntax().descendants().find_map(Module::cast).unwrap(); - assert_eq!("this\nis\nmod\nfoo", module.doc_comment_text().unwrap()); -} - -#[test] -fn test_doc_comment_single_line_block_strips_suffix() { - let file = SourceFile::parse( - r#" - /** this is mod foo*/ - mod foo {} - "#, - ) - .ok() - .unwrap(); - let module = file.syntax().descendants().find_map(Module::cast).unwrap(); - assert_eq!("this is mod foo", module.doc_comment_text().unwrap()); -} - -#[test] -fn test_doc_comment_single_line_block_strips_suffix_whitespace() { - let file = SourceFile::parse( - r#" - /** this is mod foo */ - mod foo {} - "#, - ) - .ok() - .unwrap(); - let module = file.syntax().descendants().find_map(Module::cast).unwrap(); - assert_eq!("this is mod foo ", module.doc_comment_text().unwrap()); -} - -#[test] -fn test_doc_comment_multi_line_block_strips_suffix() { - let file = SourceFile::parse( - r#" - /** - this - is - mod foo - */ - mod foo {} - "#, - ) - .ok() - .unwrap(); - let module = file.syntax().descendants().find_map(Module::cast).unwrap(); - assert_eq!( - " this\n is\n mod foo\n ", - module.doc_comment_text().unwrap() - ); -} - -#[test] -fn test_comments_preserve_trailing_whitespace() { - let file = SourceFile::parse( - "\n/// Representation of a Realm. \n/// In the specification these are called Realm Records.\nstruct Realm {}", - ) - .ok() - .unwrap(); - let def = file.syntax().descendants().find_map(Struct::cast).unwrap(); - assert_eq!( - "Representation of a Realm. \nIn the specification these are called Realm Records.", - def.doc_comment_text().unwrap() - ); -} - -#[test] -fn test_four_slash_line_comment() { - let file = SourceFile::parse( - r#" - //// too many slashes to be a doc comment - /// doc comment - mod foo {} - "#, - ) - .ok() - .unwrap(); - let module = file.syntax().descendants().find_map(Module::cast).unwrap(); - assert_eq!("doc comment", module.doc_comment_text().unwrap()); -} - -#[test] -fn test_where_predicates() { - fn assert_bound(text: &str, bound: Option) { - assert_eq!(text, bound.unwrap().syntax().text().to_string()); - } - - let file = SourceFile::parse( - r#" -fn foo() -where - T: Clone + Copy + Debug + 'static, - 'a: 'b + 'c, - Iterator::Item: 'a + Debug, - Iterator::Item: Debug + 'a, - ::Item: Debug + 'a, - for<'a> F: Fn(&'a str) -{} - "#, - ) - .ok() - .unwrap(); - let where_clause = file.syntax().descendants().find_map(WhereClause::cast).unwrap(); - - let mut predicates = where_clause.predicates(); - - let pred = predicates.next().unwrap(); - let mut bounds = pred.type_bound_list().unwrap().bounds(); - - assert!(pred.for_token().is_none()); - assert!(pred.generic_param_list().is_none()); - assert_eq!("T", pred.ty().unwrap().syntax().text().to_string()); - assert_bound("Clone", bounds.next()); - assert_bound("Copy", bounds.next()); - assert_bound("Debug", bounds.next()); - assert_bound("'static", bounds.next()); - - let pred = predicates.next().unwrap(); - let mut bounds = pred.type_bound_list().unwrap().bounds(); - - assert_eq!("'a", pred.lifetime_token().unwrap().text()); - - assert_bound("'b", bounds.next()); - assert_bound("'c", bounds.next()); - - let pred = predicates.next().unwrap(); - let mut bounds = pred.type_bound_list().unwrap().bounds(); - - assert_eq!("Iterator::Item", pred.ty().unwrap().syntax().text().to_string()); - assert_bound("'a", bounds.next()); - - let pred = predicates.next().unwrap(); - let mut bounds = pred.type_bound_list().unwrap().bounds(); - - assert_eq!("Iterator::Item", pred.ty().unwrap().syntax().text().to_string()); - assert_bound("Debug", bounds.next()); - assert_bound("'a", bounds.next()); - - let pred = predicates.next().unwrap(); - let mut bounds = pred.type_bound_list().unwrap().bounds(); - - assert_eq!("::Item", pred.ty().unwrap().syntax().text().to_string()); - assert_bound("Debug", bounds.next()); - assert_bound("'a", bounds.next()); - - let pred = predicates.next().unwrap(); - let mut bounds = pred.type_bound_list().unwrap().bounds(); - - assert!(pred.for_token().is_some()); - assert_eq!("<'a>", pred.generic_param_list().unwrap().syntax().text().to_string()); - assert_eq!("F", pred.ty().unwrap().syntax().text().to_string()); - assert_bound("Fn(&'a str)", bounds.next()); -} diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs deleted file mode 100644 index 5ed123f91fe..00000000000 --- a/crates/ra_syntax/src/ast/edit.rs +++ /dev/null @@ -1,642 +0,0 @@ -//! This module contains functions for editing syntax trees. As the trees are -//! immutable, all function here return a fresh copy of the tree, instead of -//! doing an in-place modification. -use std::{ - fmt, iter, - ops::{self, RangeInclusive}, -}; - -use arrayvec::ArrayVec; - -use crate::{ - algo::{self, neighbor, SyntaxRewriter}, - ast::{ - self, - make::{self, tokens}, - AstNode, TypeBoundsOwner, - }, - AstToken, Direction, InsertPosition, SmolStr, SyntaxElement, SyntaxKind, - SyntaxKind::{ATTR, COMMENT, WHITESPACE}, - SyntaxNode, SyntaxToken, T, -}; - -impl ast::BinExpr { - #[must_use] - pub fn replace_op(&self, op: SyntaxKind) -> Option { - let op_node: SyntaxElement = self.op_details()?.0.into(); - let to_insert: Option = Some(make::token(op).into()); - Some(self.replace_children(single_node(op_node), to_insert)) - } -} - -impl ast::Fn { - #[must_use] - pub fn with_body(&self, body: ast::BlockExpr) -> ast::Fn { - let mut to_insert: ArrayVec<[SyntaxElement; 2]> = ArrayVec::new(); - let old_body_or_semi: SyntaxElement = if let Some(old_body) = self.body() { - old_body.syntax().clone().into() - } else if let Some(semi) = self.semicolon_token() { - to_insert.push(make::tokens::single_space().into()); - semi.into() - } else { - to_insert.push(make::tokens::single_space().into()); - to_insert.push(body.syntax().clone().into()); - return self.insert_children(InsertPosition::Last, to_insert); - }; - to_insert.push(body.syntax().clone().into()); - self.replace_children(single_node(old_body_or_semi), to_insert) - } -} - -fn make_multiline(node: N) -> N -where - N: AstNode + Clone, -{ - let l_curly = match node.syntax().children_with_tokens().find(|it| it.kind() == T!['{']) { - Some(it) => it, - None => return node, - }; - let sibling = match l_curly.next_sibling_or_token() { - Some(it) => it, - None => return node, - }; - let existing_ws = match sibling.as_token() { - None => None, - Some(tok) if tok.kind() != WHITESPACE => None, - Some(ws) => { - if ws.text().contains('\n') { - return node; - } - Some(ws.clone()) - } - }; - - let indent = leading_indent(node.syntax()).unwrap_or_default(); - let ws = tokens::WsBuilder::new(&format!("\n{}", indent)); - let to_insert = iter::once(ws.ws().into()); - match existing_ws { - None => node.insert_children(InsertPosition::After(l_curly), to_insert), - Some(ws) => node.replace_children(single_node(ws), to_insert), - } -} - -impl ast::AssocItemList { - #[must_use] - pub fn append_items( - &self, - items: impl IntoIterator, - ) -> ast::AssocItemList { - let mut res = self.clone(); - if !self.syntax().text().contains_char('\n') { - res = make_multiline(res); - } - items.into_iter().for_each(|it| res = res.append_item(it)); - res - } - - #[must_use] - pub fn append_item(&self, item: ast::AssocItem) -> ast::AssocItemList { - let (indent, position) = match self.assoc_items().last() { - Some(it) => ( - leading_indent(it.syntax()).unwrap_or_default().to_string(), - InsertPosition::After(it.syntax().clone().into()), - ), - None => match self.l_curly_token() { - Some(it) => ( - " ".to_string() + &leading_indent(self.syntax()).unwrap_or_default(), - InsertPosition::After(it.into()), - ), - None => return self.clone(), - }, - }; - let ws = tokens::WsBuilder::new(&format!("\n{}", indent)); - let to_insert: ArrayVec<[SyntaxElement; 2]> = - [ws.ws().into(), item.syntax().clone().into()].into(); - self.insert_children(position, to_insert) - } -} - -impl ast::RecordExprFieldList { - #[must_use] - pub fn append_field(&self, field: &ast::RecordExprField) -> ast::RecordExprFieldList { - self.insert_field(InsertPosition::Last, field) - } - - #[must_use] - pub fn insert_field( - &self, - position: InsertPosition<&'_ ast::RecordExprField>, - field: &ast::RecordExprField, - ) -> ast::RecordExprFieldList { - let is_multiline = self.syntax().text().contains_char('\n'); - let ws; - let space = if is_multiline { - ws = tokens::WsBuilder::new(&format!( - "\n{} ", - leading_indent(self.syntax()).unwrap_or_default() - )); - ws.ws() - } else { - tokens::single_space() - }; - - let mut to_insert: ArrayVec<[SyntaxElement; 4]> = ArrayVec::new(); - to_insert.push(space.into()); - to_insert.push(field.syntax().clone().into()); - to_insert.push(make::token(T![,]).into()); - - macro_rules! after_l_curly { - () => {{ - let anchor = match self.l_curly_token() { - Some(it) => it.into(), - None => return self.clone(), - }; - InsertPosition::After(anchor) - }}; - } - - macro_rules! after_field { - ($anchor:expr) => { - if let Some(comma) = $anchor - .syntax() - .siblings_with_tokens(Direction::Next) - .find(|it| it.kind() == T![,]) - { - InsertPosition::After(comma) - } else { - to_insert.insert(0, make::token(T![,]).into()); - InsertPosition::After($anchor.syntax().clone().into()) - } - }; - }; - - let position = match position { - InsertPosition::First => after_l_curly!(), - InsertPosition::Last => { - if !is_multiline { - // don't insert comma before curly - to_insert.pop(); - } - match self.fields().last() { - Some(it) => after_field!(it), - None => after_l_curly!(), - } - } - InsertPosition::Before(anchor) => { - InsertPosition::Before(anchor.syntax().clone().into()) - } - InsertPosition::After(anchor) => after_field!(anchor), - }; - - self.insert_children(position, to_insert) - } -} - -impl ast::TypeAlias { - #[must_use] - pub fn remove_bounds(&self) -> ast::TypeAlias { - let colon = match self.colon_token() { - Some(it) => it, - None => return self.clone(), - }; - let end = match self.type_bound_list() { - Some(it) => it.syntax().clone().into(), - None => colon.clone().into(), - }; - self.replace_children(colon.into()..=end, iter::empty()) - } -} - -impl ast::TypeParam { - #[must_use] - pub fn remove_bounds(&self) -> ast::TypeParam { - let colon = match self.colon_token() { - Some(it) => it, - None => return self.clone(), - }; - let end = match self.type_bound_list() { - Some(it) => it.syntax().clone().into(), - None => colon.clone().into(), - }; - self.replace_children(colon.into()..=end, iter::empty()) - } -} - -impl ast::Path { - #[must_use] - pub fn with_segment(&self, segment: ast::PathSegment) -> ast::Path { - if let Some(old) = self.segment() { - return self.replace_children( - single_node(old.syntax().clone()), - iter::once(segment.syntax().clone().into()), - ); - } - self.clone() - } -} - -impl ast::PathSegment { - #[must_use] - pub fn with_type_args(&self, type_args: ast::GenericArgList) -> ast::PathSegment { - self._with_type_args(type_args, false) - } - - #[must_use] - pub fn with_turbo_fish(&self, type_args: ast::GenericArgList) -> ast::PathSegment { - self._with_type_args(type_args, true) - } - - fn _with_type_args(&self, type_args: ast::GenericArgList, turbo: bool) -> ast::PathSegment { - if let Some(old) = self.generic_arg_list() { - return self.replace_children( - single_node(old.syntax().clone()), - iter::once(type_args.syntax().clone().into()), - ); - } - let mut to_insert: ArrayVec<[SyntaxElement; 2]> = ArrayVec::new(); - if turbo { - to_insert.push(make::token(T![::]).into()); - } - to_insert.push(type_args.syntax().clone().into()); - self.insert_children(InsertPosition::Last, to_insert) - } -} - -impl ast::Use { - #[must_use] - pub fn with_use_tree(&self, use_tree: ast::UseTree) -> ast::Use { - if let Some(old) = self.use_tree() { - return self.replace_descendant(old, use_tree); - } - self.clone() - } - - pub fn remove(&self) -> SyntaxRewriter<'static> { - let mut res = SyntaxRewriter::default(); - res.delete(self.syntax()); - let next_ws = self - .syntax() - .next_sibling_or_token() - .and_then(|it| it.into_token()) - .and_then(ast::Whitespace::cast); - if let Some(next_ws) = next_ws { - let ws_text = next_ws.syntax().text(); - if ws_text.starts_with('\n') { - let rest = &ws_text[1..]; - if rest.is_empty() { - res.delete(next_ws.syntax()) - } else { - res.replace(next_ws.syntax(), &make::tokens::whitespace(rest)); - } - } - } - res - } -} - -impl ast::UseTree { - #[must_use] - pub fn with_path(&self, path: ast::Path) -> ast::UseTree { - if let Some(old) = self.path() { - return self.replace_descendant(old, path); - } - self.clone() - } - - #[must_use] - pub fn with_use_tree_list(&self, use_tree_list: ast::UseTreeList) -> ast::UseTree { - if let Some(old) = self.use_tree_list() { - return self.replace_descendant(old, use_tree_list); - } - self.clone() - } - - #[must_use] - pub fn split_prefix(&self, prefix: &ast::Path) -> ast::UseTree { - let suffix = match split_path_prefix(&prefix) { - Some(it) => it, - None => return self.clone(), - }; - let use_tree = make::use_tree( - suffix, - self.use_tree_list(), - self.rename(), - self.star_token().is_some(), - ); - let nested = make::use_tree_list(iter::once(use_tree)); - return make::use_tree(prefix.clone(), Some(nested), None, false); - - fn split_path_prefix(prefix: &ast::Path) -> Option { - let parent = prefix.parent_path()?; - let segment = parent.segment()?; - if algo::has_errors(segment.syntax()) { - return None; - } - let mut res = make::path_unqualified(segment); - for p in iter::successors(parent.parent_path(), |it| it.parent_path()) { - res = make::path_qualified(res, p.segment()?); - } - Some(res) - } - } - - pub fn remove(&self) -> SyntaxRewriter<'static> { - let mut res = SyntaxRewriter::default(); - res.delete(self.syntax()); - for &dir in [Direction::Next, Direction::Prev].iter() { - if let Some(nb) = neighbor(self, dir) { - self.syntax() - .siblings_with_tokens(dir) - .skip(1) - .take_while(|it| it.as_node() != Some(nb.syntax())) - .for_each(|el| res.delete(&el)); - return res; - } - } - res - } -} - -impl ast::MatchArmList { - #[must_use] - pub fn append_arms(&self, items: impl IntoIterator) -> ast::MatchArmList { - let mut res = self.clone(); - res = res.strip_if_only_whitespace(); - if !res.syntax().text().contains_char('\n') { - res = make_multiline(res); - } - items.into_iter().for_each(|it| res = res.append_arm(it)); - res - } - - fn strip_if_only_whitespace(&self) -> ast::MatchArmList { - let mut iter = self.syntax().children_with_tokens().skip_while(|it| it.kind() != T!['{']); - iter.next(); // Eat the curly - let mut inner = iter.take_while(|it| it.kind() != T!['}']); - if !inner.clone().all(|it| it.kind() == WHITESPACE) { - return self.clone(); - } - let start = match inner.next() { - Some(s) => s, - None => return self.clone(), - }; - let end = match inner.last() { - Some(s) => s, - None => start.clone(), - }; - self.replace_children(start..=end, &mut iter::empty()) - } - - #[must_use] - pub fn remove_placeholder(&self) -> ast::MatchArmList { - let placeholder = - self.arms().find(|arm| matches!(arm.pat(), Some(ast::Pat::WildcardPat(_)))); - if let Some(placeholder) = placeholder { - self.remove_arm(&placeholder) - } else { - self.clone() - } - } - - #[must_use] - fn remove_arm(&self, arm: &ast::MatchArm) -> ast::MatchArmList { - let start = arm.syntax().clone(); - let end = if let Some(comma) = start - .siblings_with_tokens(Direction::Next) - .skip(1) - .skip_while(|it| it.kind().is_trivia()) - .next() - .filter(|it| it.kind() == T![,]) - { - comma - } else { - start.clone().into() - }; - self.replace_children(start.into()..=end, None) - } - - #[must_use] - pub fn append_arm(&self, item: ast::MatchArm) -> ast::MatchArmList { - let r_curly = match self.syntax().children_with_tokens().find(|it| it.kind() == T!['}']) { - Some(t) => t, - None => return self.clone(), - }; - let position = InsertPosition::Before(r_curly.into()); - let arm_ws = tokens::WsBuilder::new(" "); - let match_indent = &leading_indent(self.syntax()).unwrap_or_default(); - let match_ws = tokens::WsBuilder::new(&format!("\n{}", match_indent)); - let to_insert: ArrayVec<[SyntaxElement; 3]> = - [arm_ws.ws().into(), item.syntax().clone().into(), match_ws.ws().into()].into(); - self.insert_children(position, to_insert) - } -} - -#[must_use] -pub fn remove_attrs_and_docs(node: &N) -> N { - N::cast(remove_attrs_and_docs_inner(node.syntax().clone())).unwrap() -} - -fn remove_attrs_and_docs_inner(mut node: SyntaxNode) -> SyntaxNode { - while let Some(start) = - node.children_with_tokens().find(|it| it.kind() == ATTR || it.kind() == COMMENT) - { - let end = match &start.next_sibling_or_token() { - Some(el) if el.kind() == WHITESPACE => el.clone(), - Some(_) | None => start.clone(), - }; - node = algo::replace_children(&node, start..=end, &mut iter::empty()); - } - node -} - -#[derive(Debug, Clone, Copy)] -pub struct IndentLevel(pub u8); - -impl From for IndentLevel { - fn from(level: u8) -> IndentLevel { - IndentLevel(level) - } -} - -impl fmt::Display for IndentLevel { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let spaces = " "; - let buf; - let len = self.0 as usize * 4; - let indent = if len <= spaces.len() { - &spaces[..len] - } else { - buf = iter::repeat(' ').take(len).collect::(); - &buf - }; - fmt::Display::fmt(indent, f) - } -} - -impl ops::Add for IndentLevel { - type Output = IndentLevel; - fn add(self, rhs: u8) -> IndentLevel { - IndentLevel(self.0 + rhs) - } -} - -impl IndentLevel { - pub fn from_node(node: &SyntaxNode) -> IndentLevel { - let first_token = match node.first_token() { - Some(it) => it, - None => return IndentLevel(0), - }; - for ws in prev_tokens(first_token).filter_map(ast::Whitespace::cast) { - let text = ws.syntax().text(); - if let Some(pos) = text.rfind('\n') { - let level = text[pos + 1..].chars().count() / 4; - return IndentLevel(level as u8); - } - } - IndentLevel(0) - } - - /// XXX: this intentionally doesn't change the indent of the very first token. - /// Ie, in something like - /// ``` - /// fn foo() { - /// 92 - /// } - /// ``` - /// if you indent the block, the `{` token would stay put. - fn increase_indent(self, node: SyntaxNode) -> SyntaxNode { - let mut rewriter = SyntaxRewriter::default(); - node.descendants_with_tokens() - .filter_map(|el| el.into_token()) - .filter_map(ast::Whitespace::cast) - .filter(|ws| { - let text = ws.syntax().text(); - text.contains('\n') - }) - .for_each(|ws| { - let new_ws = make::tokens::whitespace(&format!("{}{}", ws.syntax(), self,)); - rewriter.replace(ws.syntax(), &new_ws) - }); - rewriter.rewrite(&node) - } - - fn decrease_indent(self, node: SyntaxNode) -> SyntaxNode { - let mut rewriter = SyntaxRewriter::default(); - node.descendants_with_tokens() - .filter_map(|el| el.into_token()) - .filter_map(ast::Whitespace::cast) - .filter(|ws| { - let text = ws.syntax().text(); - text.contains('\n') - }) - .for_each(|ws| { - let new_ws = make::tokens::whitespace( - &ws.syntax().text().replace(&format!("\n{}", self), "\n"), - ); - rewriter.replace(ws.syntax(), &new_ws) - }); - rewriter.rewrite(&node) - } -} - -// FIXME: replace usages with IndentLevel above -fn leading_indent(node: &SyntaxNode) -> Option { - for token in prev_tokens(node.first_token()?) { - if let Some(ws) = ast::Whitespace::cast(token.clone()) { - let ws_text = ws.text(); - if let Some(pos) = ws_text.rfind('\n') { - return Some(ws_text[pos + 1..].into()); - } - } - if token.text().contains('\n') { - break; - } - } - None -} - -fn prev_tokens(token: SyntaxToken) -> impl Iterator { - iter::successors(Some(token), |token| token.prev_token()) -} - -pub trait AstNodeEdit: AstNode + Clone + Sized { - #[must_use] - fn insert_children( - &self, - position: InsertPosition, - to_insert: impl IntoIterator, - ) -> Self { - let new_syntax = algo::insert_children(self.syntax(), position, to_insert); - Self::cast(new_syntax).unwrap() - } - - #[must_use] - fn replace_children( - &self, - to_replace: RangeInclusive, - to_insert: impl IntoIterator, - ) -> Self { - let new_syntax = algo::replace_children(self.syntax(), to_replace, to_insert); - Self::cast(new_syntax).unwrap() - } - - #[must_use] - fn replace_descendant(&self, old: D, new: D) -> Self { - self.replace_descendants(iter::once((old, new))) - } - - #[must_use] - fn replace_descendants( - &self, - replacement_map: impl IntoIterator, - ) -> Self { - let mut rewriter = SyntaxRewriter::default(); - for (from, to) in replacement_map { - rewriter.replace(from.syntax(), to.syntax()) - } - rewriter.rewrite_ast(self) - } - #[must_use] - fn indent(&self, level: IndentLevel) -> Self { - Self::cast(level.increase_indent(self.syntax().clone())).unwrap() - } - #[must_use] - fn dedent(&self, level: IndentLevel) -> Self { - Self::cast(level.decrease_indent(self.syntax().clone())).unwrap() - } - #[must_use] - fn reset_indent(&self) -> Self { - let level = IndentLevel::from_node(self.syntax()); - self.dedent(level) - } -} - -impl AstNodeEdit for N {} - -fn single_node(element: impl Into) -> RangeInclusive { - let element = element.into(); - element.clone()..=element -} - -#[test] -fn test_increase_indent() { - let arm_list = { - let arm = make::match_arm(iter::once(make::wildcard_pat().into()), make::expr_unit()); - make::match_arm_list(vec![arm.clone(), arm]) - }; - assert_eq!( - arm_list.syntax().to_string(), - "{ - _ => (), - _ => (), -}" - ); - let indented = arm_list.indent(IndentLevel(2)); - assert_eq!( - indented.syntax().to_string(), - "{ - _ => (), - _ => (), - }" - ); -} diff --git a/crates/ra_syntax/src/ast/expr_ext.rs b/crates/ra_syntax/src/ast/expr_ext.rs deleted file mode 100644 index f5ba872233f..00000000000 --- a/crates/ra_syntax/src/ast/expr_ext.rs +++ /dev/null @@ -1,418 +0,0 @@ -//! Various extension methods to ast Expr Nodes, which are hard to code-generate. - -use crate::{ - ast::{self, support, AstChildren, AstNode}, - SmolStr, - SyntaxKind::*, - SyntaxToken, T, -}; - -impl ast::AttrsOwner for ast::Expr {} - -impl ast::Expr { - pub fn is_block_like(&self) -> bool { - match self { - ast::Expr::IfExpr(_) - | ast::Expr::LoopExpr(_) - | ast::Expr::ForExpr(_) - | ast::Expr::WhileExpr(_) - | ast::Expr::BlockExpr(_) - | ast::Expr::MatchExpr(_) - | ast::Expr::EffectExpr(_) => true, - _ => false, - } - } -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum ElseBranch { - Block(ast::BlockExpr), - IfExpr(ast::IfExpr), -} - -impl ast::IfExpr { - pub fn then_branch(&self) -> Option { - self.blocks().next() - } - pub fn else_branch(&self) -> Option { - let res = match self.blocks().nth(1) { - Some(block) => ElseBranch::Block(block), - None => { - let elif: ast::IfExpr = support::child(self.syntax())?; - ElseBranch::IfExpr(elif) - } - }; - Some(res) - } - - pub fn blocks(&self) -> AstChildren { - support::children(self.syntax()) - } -} - -#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] -pub enum PrefixOp { - /// The `*` operator for dereferencing - Deref, - /// The `!` operator for logical inversion - Not, - /// The `-` operator for negation - Neg, -} - -impl ast::PrefixExpr { - pub fn op_kind(&self) -> Option { - match self.op_token()?.kind() { - T![*] => Some(PrefixOp::Deref), - T![!] => Some(PrefixOp::Not), - T![-] => Some(PrefixOp::Neg), - _ => None, - } - } - - pub fn op_token(&self) -> Option { - self.syntax().first_child_or_token()?.into_token() - } -} - -#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] -pub enum BinOp { - /// The `||` operator for boolean OR - BooleanOr, - /// The `&&` operator for boolean AND - BooleanAnd, - /// The `==` operator for equality testing - EqualityTest, - /// The `!=` operator for equality testing - NegatedEqualityTest, - /// The `<=` operator for lesser-equal testing - LesserEqualTest, - /// The `>=` operator for greater-equal testing - GreaterEqualTest, - /// The `<` operator for comparison - LesserTest, - /// The `>` operator for comparison - GreaterTest, - /// The `+` operator for addition - Addition, - /// The `*` operator for multiplication - Multiplication, - /// The `-` operator for subtraction - Subtraction, - /// The `/` operator for division - Division, - /// The `%` operator for remainder after division - Remainder, - /// The `<<` operator for left shift - LeftShift, - /// The `>>` operator for right shift - RightShift, - /// The `^` operator for bitwise XOR - BitwiseXor, - /// The `|` operator for bitwise OR - BitwiseOr, - /// The `&` operator for bitwise AND - BitwiseAnd, - /// The `=` operator for assignment - Assignment, - /// The `+=` operator for assignment after addition - AddAssign, - /// The `/=` operator for assignment after division - DivAssign, - /// The `*=` operator for assignment after multiplication - MulAssign, - /// The `%=` operator for assignment after remainders - RemAssign, - /// The `>>=` operator for assignment after shifting right - ShrAssign, - /// The `<<=` operator for assignment after shifting left - ShlAssign, - /// The `-=` operator for assignment after subtraction - SubAssign, - /// The `|=` operator for assignment after bitwise OR - BitOrAssign, - /// The `&=` operator for assignment after bitwise AND - BitAndAssign, - /// The `^=` operator for assignment after bitwise XOR - BitXorAssign, -} - -impl BinOp { - pub fn is_assignment(self) -> bool { - match self { - BinOp::Assignment - | BinOp::AddAssign - | BinOp::DivAssign - | BinOp::MulAssign - | BinOp::RemAssign - | BinOp::ShrAssign - | BinOp::ShlAssign - | BinOp::SubAssign - | BinOp::BitOrAssign - | BinOp::BitAndAssign - | BinOp::BitXorAssign => true, - _ => false, - } - } -} - -impl ast::BinExpr { - pub fn op_details(&self) -> Option<(SyntaxToken, BinOp)> { - self.syntax().children_with_tokens().filter_map(|it| it.into_token()).find_map(|c| { - let bin_op = match c.kind() { - T![||] => BinOp::BooleanOr, - T![&&] => BinOp::BooleanAnd, - T![==] => BinOp::EqualityTest, - T![!=] => BinOp::NegatedEqualityTest, - T![<=] => BinOp::LesserEqualTest, - T![>=] => BinOp::GreaterEqualTest, - T![<] => BinOp::LesserTest, - T![>] => BinOp::GreaterTest, - T![+] => BinOp::Addition, - T![*] => BinOp::Multiplication, - T![-] => BinOp::Subtraction, - T![/] => BinOp::Division, - T![%] => BinOp::Remainder, - T![<<] => BinOp::LeftShift, - T![>>] => BinOp::RightShift, - T![^] => BinOp::BitwiseXor, - T![|] => BinOp::BitwiseOr, - T![&] => BinOp::BitwiseAnd, - T![=] => BinOp::Assignment, - T![+=] => BinOp::AddAssign, - T![/=] => BinOp::DivAssign, - T![*=] => BinOp::MulAssign, - T![%=] => BinOp::RemAssign, - T![>>=] => BinOp::ShrAssign, - T![<<=] => BinOp::ShlAssign, - T![-=] => BinOp::SubAssign, - T![|=] => BinOp::BitOrAssign, - T![&=] => BinOp::BitAndAssign, - T![^=] => BinOp::BitXorAssign, - _ => return None, - }; - Some((c, bin_op)) - }) - } - - pub fn op_kind(&self) -> Option { - self.op_details().map(|t| t.1) - } - - pub fn op_token(&self) -> Option { - self.op_details().map(|t| t.0) - } - - pub fn lhs(&self) -> Option { - support::children(self.syntax()).next() - } - - pub fn rhs(&self) -> Option { - support::children(self.syntax()).nth(1) - } - - pub fn sub_exprs(&self) -> (Option, Option) { - let mut children = support::children(self.syntax()); - let first = children.next(); - let second = children.next(); - (first, second) - } -} - -#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] -pub enum RangeOp { - /// `..` - Exclusive, - /// `..=` - Inclusive, -} - -impl ast::RangeExpr { - fn op_details(&self) -> Option<(usize, SyntaxToken, RangeOp)> { - self.syntax().children_with_tokens().enumerate().find_map(|(ix, child)| { - let token = child.into_token()?; - let bin_op = match token.kind() { - T![..] => RangeOp::Exclusive, - T![..=] => RangeOp::Inclusive, - _ => return None, - }; - Some((ix, token, bin_op)) - }) - } - - pub fn op_kind(&self) -> Option { - self.op_details().map(|t| t.2) - } - - pub fn op_token(&self) -> Option { - self.op_details().map(|t| t.1) - } - - pub fn start(&self) -> Option { - let op_ix = self.op_details()?.0; - self.syntax() - .children_with_tokens() - .take(op_ix) - .find_map(|it| ast::Expr::cast(it.into_node()?)) - } - - pub fn end(&self) -> Option { - let op_ix = self.op_details()?.0; - self.syntax() - .children_with_tokens() - .skip(op_ix + 1) - .find_map(|it| ast::Expr::cast(it.into_node()?)) - } -} - -impl ast::IndexExpr { - pub fn base(&self) -> Option { - support::children(self.syntax()).next() - } - pub fn index(&self) -> Option { - support::children(self.syntax()).nth(1) - } -} - -pub enum ArrayExprKind { - Repeat { initializer: Option, repeat: Option }, - ElementList(AstChildren), -} - -impl ast::ArrayExpr { - pub fn kind(&self) -> ArrayExprKind { - if self.is_repeat() { - ArrayExprKind::Repeat { - initializer: support::children(self.syntax()).next(), - repeat: support::children(self.syntax()).nth(1), - } - } else { - ArrayExprKind::ElementList(support::children(self.syntax())) - } - } - - fn is_repeat(&self) -> bool { - self.syntax().children_with_tokens().any(|it| it.kind() == T![;]) - } -} - -#[derive(Clone, Debug, PartialEq, Eq, Hash)] -pub enum LiteralKind { - String, - ByteString, - Char, - Byte, - IntNumber { suffix: Option }, - FloatNumber { suffix: Option }, - Bool(bool), -} - -impl ast::Literal { - pub fn token(&self) -> SyntaxToken { - self.syntax() - .children_with_tokens() - .find(|e| e.kind() != ATTR && !e.kind().is_trivia()) - .and_then(|e| e.into_token()) - .unwrap() - } - - fn find_suffix(text: &str, possible_suffixes: &[&str]) -> Option { - possible_suffixes - .iter() - .find(|&suffix| text.ends_with(suffix)) - .map(|&suffix| SmolStr::new(suffix)) - } - - pub fn kind(&self) -> LiteralKind { - const INT_SUFFIXES: [&str; 12] = [ - "u64", "u32", "u16", "u8", "usize", "isize", "i64", "i32", "i16", "i8", "u128", "i128", - ]; - const FLOAT_SUFFIXES: [&str; 2] = ["f32", "f64"]; - - let token = self.token(); - - match token.kind() { - INT_NUMBER => { - // FYI: there was a bug here previously, thus the if statement below is necessary. - // The lexer treats e.g. `1f64` as an integer literal. See - // https://github.com/rust-analyzer/rust-analyzer/issues/1592 - // and the comments on the linked PR. - - let text = token.text(); - if let suffix @ Some(_) = Self::find_suffix(&text, &FLOAT_SUFFIXES) { - LiteralKind::FloatNumber { suffix } - } else { - LiteralKind::IntNumber { suffix: Self::find_suffix(&text, &INT_SUFFIXES) } - } - } - FLOAT_NUMBER => { - let text = token.text(); - LiteralKind::FloatNumber { suffix: Self::find_suffix(&text, &FLOAT_SUFFIXES) } - } - STRING | RAW_STRING => LiteralKind::String, - T![true] => LiteralKind::Bool(true), - T![false] => LiteralKind::Bool(false), - BYTE_STRING | RAW_BYTE_STRING => LiteralKind::ByteString, - CHAR => LiteralKind::Char, - BYTE => LiteralKind::Byte, - _ => unreachable!(), - } - } -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum Effect { - Async(SyntaxToken), - Unsafe(SyntaxToken), - Try(SyntaxToken), - // Very much not an effect, but we stuff it into this node anyway - Label(ast::Label), -} - -impl ast::EffectExpr { - pub fn effect(&self) -> Effect { - if let Some(token) = self.async_token() { - return Effect::Async(token); - } - if let Some(token) = self.unsafe_token() { - return Effect::Unsafe(token); - } - if let Some(token) = self.try_token() { - return Effect::Try(token); - } - if let Some(label) = self.label() { - return Effect::Label(label); - } - unreachable!("ast::EffectExpr without Effect") - } -} - -impl ast::BlockExpr { - /// false if the block is an intrinsic part of the syntax and can't be - /// replaced with arbitrary expression. - /// - /// ```not_rust - /// fn foo() { not_stand_alone } - /// const FOO: () = { stand_alone }; - /// ``` - pub fn is_standalone(&self) -> bool { - let parent = match self.syntax().parent() { - Some(it) => it, - None => return true, - }; - !matches!(parent.kind(), FN | IF_EXPR | WHILE_EXPR | LOOP_EXPR | EFFECT_EXPR) - } -} - -#[test] -fn test_literal_with_attr() { - let parse = ast::SourceFile::parse(r#"const _: &str = { #[attr] "Hello" };"#); - let lit = parse.tree().syntax().descendants().find_map(ast::Literal::cast).unwrap(); - assert_eq!(lit.token().text(), r#""Hello""#); -} - -impl ast::RecordExprField { - pub fn parent_record_lit(&self) -> ast::RecordExpr { - self.syntax().ancestors().find_map(ast::RecordExpr::cast).unwrap() - } -} diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs deleted file mode 100644 index 4a6f41ee71f..00000000000 --- a/crates/ra_syntax/src/ast/generated.rs +++ /dev/null @@ -1,41 +0,0 @@ -//! This file is actually hand-written, but the submodules are indeed generated. -#[rustfmt::skip] -mod nodes; -#[rustfmt::skip] -mod tokens; - -use crate::{ - AstNode, - SyntaxKind::{self, *}, - SyntaxNode, -}; - -pub use {nodes::*, tokens::*}; - -// Stmt is the only nested enum, so it's easier to just hand-write it -impl AstNode for Stmt { - fn can_cast(kind: SyntaxKind) -> bool { - match kind { - LET_STMT | EXPR_STMT => true, - _ => Item::can_cast(kind), - } - } - fn cast(syntax: SyntaxNode) -> Option { - let res = match syntax.kind() { - LET_STMT => Stmt::LetStmt(LetStmt { syntax }), - EXPR_STMT => Stmt::ExprStmt(ExprStmt { syntax }), - _ => { - let item = Item::cast(syntax)?; - Stmt::Item(item) - } - }; - Some(res) - } - fn syntax(&self) -> &SyntaxNode { - match self { - Stmt::LetStmt(it) => &it.syntax, - Stmt::ExprStmt(it) => &it.syntax, - Stmt::Item(it) => it.syntax(), - } - } -} diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs deleted file mode 100644 index 3d49309d148..00000000000 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ /dev/null @@ -1,4067 +0,0 @@ -//! Generated file, do not edit by hand, see `xtask/src/codegen` - -use crate::{ - ast::{self, support, AstChildren, AstNode}, - SyntaxKind::{self, *}, - SyntaxNode, SyntaxToken, T, -}; -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Name { - pub(crate) syntax: SyntaxNode, -} -impl Name { - pub fn ident_token(&self) -> Option { support::token(&self.syntax, T![ident]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct NameRef { - pub(crate) syntax: SyntaxNode, -} -impl NameRef { - pub fn ident_token(&self) -> Option { support::token(&self.syntax, T![ident]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Path { - pub(crate) syntax: SyntaxNode, -} -impl Path { - pub fn qualifier(&self) -> Option { support::child(&self.syntax) } - pub fn coloncolon_token(&self) -> Option { support::token(&self.syntax, T![::]) } - pub fn segment(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct PathSegment { - pub(crate) syntax: SyntaxNode, -} -impl PathSegment { - pub fn crate_token(&self) -> Option { support::token(&self.syntax, T![crate]) } - pub fn self_token(&self) -> Option { support::token(&self.syntax, T![self]) } - pub fn super_token(&self) -> Option { support::token(&self.syntax, T![super]) } - pub fn coloncolon_token(&self) -> Option { support::token(&self.syntax, T![::]) } - pub fn name_ref(&self) -> Option { support::child(&self.syntax) } - pub fn generic_arg_list(&self) -> Option { support::child(&self.syntax) } - pub fn param_list(&self) -> Option { support::child(&self.syntax) } - pub fn ret_type(&self) -> Option { support::child(&self.syntax) } - pub fn l_angle_token(&self) -> Option { support::token(&self.syntax, T![<]) } - pub fn path_type(&self) -> Option { support::child(&self.syntax) } - pub fn as_token(&self) -> Option { support::token(&self.syntax, T![as]) } - pub fn r_angle_token(&self) -> Option { support::token(&self.syntax, T![>]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct GenericArgList { - pub(crate) syntax: SyntaxNode, -} -impl GenericArgList { - pub fn coloncolon_token(&self) -> Option { support::token(&self.syntax, T![::]) } - pub fn l_angle_token(&self) -> Option { support::token(&self.syntax, T![<]) } - pub fn generic_args(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_angle_token(&self) -> Option { support::token(&self.syntax, T![>]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct ParamList { - pub(crate) syntax: SyntaxNode, -} -impl ParamList { - pub fn l_paren_token(&self) -> Option { support::token(&self.syntax, T!['(']) } - pub fn self_param(&self) -> Option { support::child(&self.syntax) } - pub fn comma_token(&self) -> Option { support::token(&self.syntax, T![,]) } - pub fn params(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_paren_token(&self) -> Option { support::token(&self.syntax, T![')']) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct RetType { - pub(crate) syntax: SyntaxNode, -} -impl RetType { - pub fn thin_arrow_token(&self) -> Option { support::token(&self.syntax, T![->]) } - pub fn ty(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct PathType { - pub(crate) syntax: SyntaxNode, -} -impl PathType { - pub fn path(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct TypeArg { - pub(crate) syntax: SyntaxNode, -} -impl TypeArg { - pub fn ty(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct AssocTypeArg { - pub(crate) syntax: SyntaxNode, -} -impl ast::TypeBoundsOwner for AssocTypeArg {} -impl AssocTypeArg { - pub fn name_ref(&self) -> Option { support::child(&self.syntax) } - pub fn eq_token(&self) -> Option { support::token(&self.syntax, T![=]) } - pub fn ty(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct LifetimeArg { - pub(crate) syntax: SyntaxNode, -} -impl LifetimeArg { - pub fn lifetime_token(&self) -> Option { - support::token(&self.syntax, T![lifetime]) - } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct ConstArg { - pub(crate) syntax: SyntaxNode, -} -impl ConstArg { - pub fn expr(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct TypeBoundList { - pub(crate) syntax: SyntaxNode, -} -impl TypeBoundList { - pub fn bounds(&self) -> AstChildren { support::children(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct MacroCall { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for MacroCall {} -impl ast::NameOwner for MacroCall {} -impl MacroCall { - pub fn path(&self) -> Option { support::child(&self.syntax) } - pub fn excl_token(&self) -> Option { support::token(&self.syntax, T![!]) } - pub fn token_tree(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Attr { - pub(crate) syntax: SyntaxNode, -} -impl Attr { - pub fn pound_token(&self) -> Option { support::token(&self.syntax, T![#]) } - pub fn excl_token(&self) -> Option { support::token(&self.syntax, T![!]) } - pub fn l_brack_token(&self) -> Option { support::token(&self.syntax, T!['[']) } - pub fn path(&self) -> Option { support::child(&self.syntax) } - pub fn eq_token(&self) -> Option { support::token(&self.syntax, T![=]) } - pub fn literal(&self) -> Option { support::child(&self.syntax) } - pub fn token_tree(&self) -> Option { support::child(&self.syntax) } - pub fn r_brack_token(&self) -> Option { support::token(&self.syntax, T![']']) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct TokenTree { - pub(crate) syntax: SyntaxNode, -} -impl TokenTree { - pub fn l_paren_token(&self) -> Option { support::token(&self.syntax, T!['(']) } - pub fn r_paren_token(&self) -> Option { support::token(&self.syntax, T![')']) } - pub fn l_curly_token(&self) -> Option { support::token(&self.syntax, T!['{']) } - pub fn r_curly_token(&self) -> Option { support::token(&self.syntax, T!['}']) } - pub fn l_brack_token(&self) -> Option { support::token(&self.syntax, T!['[']) } - pub fn r_brack_token(&self) -> Option { support::token(&self.syntax, T![']']) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct MacroItems { - pub(crate) syntax: SyntaxNode, -} -impl ast::ModuleItemOwner for MacroItems {} -impl MacroItems {} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct MacroStmts { - pub(crate) syntax: SyntaxNode, -} -impl MacroStmts { - pub fn statements(&self) -> AstChildren { support::children(&self.syntax) } - pub fn expr(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct SourceFile { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for SourceFile {} -impl ast::ModuleItemOwner for SourceFile {} -impl SourceFile { - pub fn shebang_token(&self) -> Option { support::token(&self.syntax, T![shebang]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Const { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for Const {} -impl ast::NameOwner for Const {} -impl ast::VisibilityOwner for Const {} -impl Const { - pub fn default_token(&self) -> Option { support::token(&self.syntax, T![default]) } - pub fn const_token(&self) -> Option { support::token(&self.syntax, T![const]) } - pub fn underscore_token(&self) -> Option { support::token(&self.syntax, T![_]) } - pub fn colon_token(&self) -> Option { support::token(&self.syntax, T![:]) } - pub fn ty(&self) -> Option { support::child(&self.syntax) } - pub fn eq_token(&self) -> Option { support::token(&self.syntax, T![=]) } - pub fn body(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Enum { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for Enum {} -impl ast::NameOwner for Enum {} -impl ast::VisibilityOwner for Enum {} -impl ast::GenericParamsOwner for Enum {} -impl Enum { - pub fn enum_token(&self) -> Option { support::token(&self.syntax, T![enum]) } - pub fn variant_list(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct ExternBlock { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for ExternBlock {} -impl ExternBlock { - pub fn abi(&self) -> Option { support::child(&self.syntax) } - pub fn extern_item_list(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct ExternCrate { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for ExternCrate {} -impl ast::VisibilityOwner for ExternCrate {} -impl ExternCrate { - pub fn extern_token(&self) -> Option { support::token(&self.syntax, T![extern]) } - pub fn crate_token(&self) -> Option { support::token(&self.syntax, T![crate]) } - pub fn name_ref(&self) -> Option { support::child(&self.syntax) } - pub fn self_token(&self) -> Option { support::token(&self.syntax, T![self]) } - pub fn rename(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Fn { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for Fn {} -impl ast::NameOwner for Fn {} -impl ast::VisibilityOwner for Fn {} -impl ast::GenericParamsOwner for Fn {} -impl Fn { - pub fn default_token(&self) -> Option { support::token(&self.syntax, T![default]) } - pub fn async_token(&self) -> Option { support::token(&self.syntax, T![async]) } - pub fn const_token(&self) -> Option { support::token(&self.syntax, T![const]) } - pub fn unsafe_token(&self) -> Option { support::token(&self.syntax, T![unsafe]) } - pub fn abi(&self) -> Option { support::child(&self.syntax) } - pub fn fn_token(&self) -> Option { support::token(&self.syntax, T![fn]) } - pub fn param_list(&self) -> Option { support::child(&self.syntax) } - pub fn ret_type(&self) -> Option { support::child(&self.syntax) } - pub fn body(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Impl { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for Impl {} -impl ast::VisibilityOwner for Impl {} -impl ast::GenericParamsOwner for Impl {} -impl Impl { - pub fn default_token(&self) -> Option { support::token(&self.syntax, T![default]) } - pub fn unsafe_token(&self) -> Option { support::token(&self.syntax, T![unsafe]) } - pub fn impl_token(&self) -> Option { support::token(&self.syntax, T![impl]) } - pub fn const_token(&self) -> Option { support::token(&self.syntax, T![const]) } - pub fn excl_token(&self) -> Option { support::token(&self.syntax, T![!]) } - pub fn for_token(&self) -> Option { support::token(&self.syntax, T![for]) } - pub fn assoc_item_list(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Module { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for Module {} -impl ast::NameOwner for Module {} -impl ast::VisibilityOwner for Module {} -impl Module { - pub fn mod_token(&self) -> Option { support::token(&self.syntax, T![mod]) } - pub fn item_list(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Static { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for Static {} -impl ast::NameOwner for Static {} -impl ast::VisibilityOwner for Static {} -impl Static { - pub fn static_token(&self) -> Option { support::token(&self.syntax, T![static]) } - pub fn mut_token(&self) -> Option { support::token(&self.syntax, T![mut]) } - pub fn colon_token(&self) -> Option { support::token(&self.syntax, T![:]) } - pub fn ty(&self) -> Option { support::child(&self.syntax) } - pub fn eq_token(&self) -> Option { support::token(&self.syntax, T![=]) } - pub fn body(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Struct { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for Struct {} -impl ast::NameOwner for Struct {} -impl ast::VisibilityOwner for Struct {} -impl ast::GenericParamsOwner for Struct {} -impl Struct { - pub fn struct_token(&self) -> Option { support::token(&self.syntax, T![struct]) } - pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } - pub fn field_list(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Trait { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for Trait {} -impl ast::NameOwner for Trait {} -impl ast::VisibilityOwner for Trait {} -impl ast::GenericParamsOwner for Trait {} -impl ast::TypeBoundsOwner for Trait {} -impl Trait { - pub fn unsafe_token(&self) -> Option { support::token(&self.syntax, T![unsafe]) } - pub fn auto_token(&self) -> Option { support::token(&self.syntax, T![auto]) } - pub fn trait_token(&self) -> Option { support::token(&self.syntax, T![trait]) } - pub fn assoc_item_list(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct TypeAlias { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for TypeAlias {} -impl ast::NameOwner for TypeAlias {} -impl ast::VisibilityOwner for TypeAlias {} -impl ast::GenericParamsOwner for TypeAlias {} -impl ast::TypeBoundsOwner for TypeAlias {} -impl TypeAlias { - pub fn default_token(&self) -> Option { support::token(&self.syntax, T![default]) } - pub fn type_token(&self) -> Option { support::token(&self.syntax, T![type]) } - pub fn eq_token(&self) -> Option { support::token(&self.syntax, T![=]) } - pub fn ty(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Union { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for Union {} -impl ast::NameOwner for Union {} -impl ast::VisibilityOwner for Union {} -impl ast::GenericParamsOwner for Union {} -impl Union { - pub fn union_token(&self) -> Option { support::token(&self.syntax, T![union]) } - pub fn record_field_list(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Use { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for Use {} -impl ast::VisibilityOwner for Use {} -impl Use { - pub fn use_token(&self) -> Option { support::token(&self.syntax, T![use]) } - pub fn use_tree(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Visibility { - pub(crate) syntax: SyntaxNode, -} -impl Visibility { - pub fn pub_token(&self) -> Option { support::token(&self.syntax, T![pub]) } - pub fn l_paren_token(&self) -> Option { support::token(&self.syntax, T!['(']) } - pub fn super_token(&self) -> Option { support::token(&self.syntax, T![super]) } - pub fn self_token(&self) -> Option { support::token(&self.syntax, T![self]) } - pub fn crate_token(&self) -> Option { support::token(&self.syntax, T![crate]) } - pub fn in_token(&self) -> Option { support::token(&self.syntax, T![in]) } - pub fn path(&self) -> Option { support::child(&self.syntax) } - pub fn r_paren_token(&self) -> Option { support::token(&self.syntax, T![')']) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct ItemList { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for ItemList {} -impl ast::ModuleItemOwner for ItemList {} -impl ItemList { - pub fn l_curly_token(&self) -> Option { support::token(&self.syntax, T!['{']) } - pub fn r_curly_token(&self) -> Option { support::token(&self.syntax, T!['}']) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Rename { - pub(crate) syntax: SyntaxNode, -} -impl ast::NameOwner for Rename {} -impl Rename { - pub fn as_token(&self) -> Option { support::token(&self.syntax, T![as]) } - pub fn underscore_token(&self) -> Option { support::token(&self.syntax, T![_]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct UseTree { - pub(crate) syntax: SyntaxNode, -} -impl UseTree { - pub fn path(&self) -> Option { support::child(&self.syntax) } - pub fn coloncolon_token(&self) -> Option { support::token(&self.syntax, T![::]) } - pub fn star_token(&self) -> Option { support::token(&self.syntax, T![*]) } - pub fn use_tree_list(&self) -> Option { support::child(&self.syntax) } - pub fn rename(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct UseTreeList { - pub(crate) syntax: SyntaxNode, -} -impl UseTreeList { - pub fn l_curly_token(&self) -> Option { support::token(&self.syntax, T!['{']) } - pub fn use_trees(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_curly_token(&self) -> Option { support::token(&self.syntax, T!['}']) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Abi { - pub(crate) syntax: SyntaxNode, -} -impl Abi { - pub fn extern_token(&self) -> Option { support::token(&self.syntax, T![extern]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct GenericParamList { - pub(crate) syntax: SyntaxNode, -} -impl GenericParamList { - pub fn l_angle_token(&self) -> Option { support::token(&self.syntax, T![<]) } - pub fn generic_params(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_angle_token(&self) -> Option { support::token(&self.syntax, T![>]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct WhereClause { - pub(crate) syntax: SyntaxNode, -} -impl WhereClause { - pub fn where_token(&self) -> Option { support::token(&self.syntax, T![where]) } - pub fn predicates(&self) -> AstChildren { support::children(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct BlockExpr { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for BlockExpr {} -impl BlockExpr { - pub fn l_curly_token(&self) -> Option { support::token(&self.syntax, T!['{']) } - pub fn statements(&self) -> AstChildren { support::children(&self.syntax) } - pub fn expr(&self) -> Option { support::child(&self.syntax) } - pub fn r_curly_token(&self) -> Option { support::token(&self.syntax, T!['}']) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct SelfParam { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for SelfParam {} -impl SelfParam { - pub fn amp_token(&self) -> Option { support::token(&self.syntax, T![&]) } - pub fn lifetime_token(&self) -> Option { - support::token(&self.syntax, T![lifetime]) - } - pub fn mut_token(&self) -> Option { support::token(&self.syntax, T![mut]) } - pub fn self_token(&self) -> Option { support::token(&self.syntax, T![self]) } - pub fn colon_token(&self) -> Option { support::token(&self.syntax, T![:]) } - pub fn ty(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Param { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for Param {} -impl Param { - pub fn pat(&self) -> Option { support::child(&self.syntax) } - pub fn colon_token(&self) -> Option { support::token(&self.syntax, T![:]) } - pub fn ty(&self) -> Option { support::child(&self.syntax) } - pub fn dotdotdot_token(&self) -> Option { support::token(&self.syntax, T![...]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct RecordFieldList { - pub(crate) syntax: SyntaxNode, -} -impl RecordFieldList { - pub fn l_curly_token(&self) -> Option { support::token(&self.syntax, T!['{']) } - pub fn fields(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_curly_token(&self) -> Option { support::token(&self.syntax, T!['}']) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct TupleFieldList { - pub(crate) syntax: SyntaxNode, -} -impl TupleFieldList { - pub fn l_paren_token(&self) -> Option { support::token(&self.syntax, T!['(']) } - pub fn fields(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_paren_token(&self) -> Option { support::token(&self.syntax, T![')']) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct RecordField { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for RecordField {} -impl ast::NameOwner for RecordField {} -impl ast::VisibilityOwner for RecordField {} -impl RecordField { - pub fn colon_token(&self) -> Option { support::token(&self.syntax, T![:]) } - pub fn ty(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct TupleField { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for TupleField {} -impl ast::VisibilityOwner for TupleField {} -impl TupleField { - pub fn ty(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct VariantList { - pub(crate) syntax: SyntaxNode, -} -impl VariantList { - pub fn l_curly_token(&self) -> Option { support::token(&self.syntax, T!['{']) } - pub fn variants(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_curly_token(&self) -> Option { support::token(&self.syntax, T!['}']) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Variant { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for Variant {} -impl ast::NameOwner for Variant {} -impl ast::VisibilityOwner for Variant {} -impl Variant { - pub fn field_list(&self) -> Option { support::child(&self.syntax) } - pub fn eq_token(&self) -> Option { support::token(&self.syntax, T![=]) } - pub fn expr(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct AssocItemList { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for AssocItemList {} -impl AssocItemList { - pub fn l_curly_token(&self) -> Option { support::token(&self.syntax, T!['{']) } - pub fn assoc_items(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_curly_token(&self) -> Option { support::token(&self.syntax, T!['}']) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct ExternItemList { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for ExternItemList {} -impl ExternItemList { - pub fn l_curly_token(&self) -> Option { support::token(&self.syntax, T!['{']) } - pub fn extern_items(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_curly_token(&self) -> Option { support::token(&self.syntax, T!['}']) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct ConstParam { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for ConstParam {} -impl ast::NameOwner for ConstParam {} -impl ConstParam { - pub fn const_token(&self) -> Option { support::token(&self.syntax, T![const]) } - pub fn colon_token(&self) -> Option { support::token(&self.syntax, T![:]) } - pub fn ty(&self) -> Option { support::child(&self.syntax) } - pub fn eq_token(&self) -> Option { support::token(&self.syntax, T![=]) } - pub fn default_val(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct LifetimeParam { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for LifetimeParam {} -impl ast::TypeBoundsOwner for LifetimeParam {} -impl LifetimeParam { - pub fn lifetime_token(&self) -> Option { - support::token(&self.syntax, T![lifetime]) - } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct TypeParam { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for TypeParam {} -impl ast::NameOwner for TypeParam {} -impl ast::TypeBoundsOwner for TypeParam {} -impl TypeParam { - pub fn eq_token(&self) -> Option { support::token(&self.syntax, T![=]) } - pub fn default_type(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct WherePred { - pub(crate) syntax: SyntaxNode, -} -impl ast::TypeBoundsOwner for WherePred {} -impl WherePred { - pub fn for_token(&self) -> Option { support::token(&self.syntax, T![for]) } - pub fn generic_param_list(&self) -> Option { support::child(&self.syntax) } - pub fn lifetime_token(&self) -> Option { - support::token(&self.syntax, T![lifetime]) - } - pub fn ty(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct Literal { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for Literal {} -impl Literal {} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct ExprStmt { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for ExprStmt {} -impl ExprStmt { - pub fn expr(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct LetStmt { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for LetStmt {} -impl LetStmt { - pub fn let_token(&self) -> Option { support::token(&self.syntax, T![let]) } - pub fn pat(&self) -> Option { support::child(&self.syntax) } - pub fn colon_token(&self) -> Option { support::token(&self.syntax, T![:]) } - pub fn ty(&self) -> Option { support::child(&self.syntax) } - pub fn eq_token(&self) -> Option { support::token(&self.syntax, T![=]) } - pub fn initializer(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct ArrayExpr { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for ArrayExpr {} -impl ArrayExpr { - pub fn l_brack_token(&self) -> Option { support::token(&self.syntax, T!['[']) } - pub fn exprs(&self) -> AstChildren { support::children(&self.syntax) } - pub fn expr(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } - pub fn r_brack_token(&self) -> Option { support::token(&self.syntax, T![']']) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct AwaitExpr { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for AwaitExpr {} -impl AwaitExpr { - pub fn expr(&self) -> Option { support::child(&self.syntax) } - pub fn dot_token(&self) -> Option { support::token(&self.syntax, T![.]) } - pub fn await_token(&self) -> Option { support::token(&self.syntax, T![await]) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct BinExpr { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for BinExpr {} -impl BinExpr {} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct BoxExpr { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for BoxExpr {} -impl BoxExpr { - pub fn box_token(&self) -> Option { support::token(&self.syntax, T![box]) } - pub fn expr(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct BreakExpr { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for BreakExpr {} -impl BreakExpr { - pub fn break_token(&self) -> Option { support::token(&self.syntax, T![break]) } - pub fn lifetime_token(&self) -> Option { - support::token(&self.syntax, T![lifetime]) - } - pub fn expr(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct CallExpr { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for CallExpr {} -impl ast::ArgListOwner for CallExpr {} -impl CallExpr { - pub fn expr(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct CastExpr { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for CastExpr {} -impl CastExpr { - pub fn expr(&self) -> Option { support::child(&self.syntax) } - pub fn as_token(&self) -> Option { support::token(&self.syntax, T![as]) } - pub fn ty(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct ClosureExpr { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for ClosureExpr {} -impl ClosureExpr { - pub fn static_token(&self) -> Option { support::token(&self.syntax, T![static]) } - pub fn async_token(&self) -> Option { support::token(&self.syntax, T![async]) } - pub fn move_token(&self) -> Option { support::token(&self.syntax, T![move]) } - pub fn param_list(&self) -> Option { support::child(&self.syntax) } - pub fn ret_type(&self) -> Option { support::child(&self.syntax) } - pub fn body(&self) -> Option { support::child(&self.syntax) } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct ContinueExpr { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for ContinueExpr {} -impl ContinueExpr { - pub fn continue_token(&self) -> Option { - support::token(&self.syntax, T![continue]) - } - pub fn lifetime_token(&self) -> Option { - support::token(&self.syntax, T![lifetime]) - } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct EffectExpr { - pub(crate) syntax: SyntaxNode, -} -impl ast::AttrsOwner for EffectExpr {} -impl EffectExpr { - pub fn label(&self) -> Option