diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/arena/Cargo.toml | 9 | ||||
-rw-r--r-- | crates/arena/src/lib.rs (renamed from crates/ra_arena/src/lib.rs) | 0 | ||||
-rw-r--r-- | crates/arena/src/map.rs (renamed from crates/ra_arena/src/map.rs) | 0 | ||||
-rw-r--r-- | crates/assists/Cargo.toml | 23 | ||||
-rw-r--r-- | crates/assists/src/assist_config.rs (renamed from crates/ra_assists/src/assist_config.rs) | 0 | ||||
-rw-r--r-- | crates/assists/src/assist_context.rs | 291 | ||||
-rw-r--r-- | crates/assists/src/ast_transform.rs | 200 | ||||
-rw-r--r-- | crates/assists/src/handlers/add_custom_impl.rs | 208 | ||||
-rw-r--r-- | crates/assists/src/handlers/add_explicit_type.rs | 211 | ||||
-rw-r--r-- | crates/assists/src/handlers/add_missing_impl_members.rs | 766 | ||||
-rw-r--r-- | crates/assists/src/handlers/add_turbo_fish.rs | 164 | ||||
-rw-r--r-- | crates/assists/src/handlers/apply_demorgan.rs | 93 | ||||
-rw-r--r-- | crates/assists/src/handlers/auto_import.rs | 1088 | ||||
-rw-r--r-- | crates/assists/src/handlers/change_return_type_to_result.rs | 998 | ||||
-rw-r--r-- | crates/assists/src/handlers/change_visibility.rs | 200 | ||||
-rw-r--r-- | crates/assists/src/handlers/early_return.rs | 515 | ||||
-rw-r--r-- | crates/assists/src/handlers/expand_glob_import.rs | 385 | ||||
-rw-r--r-- | crates/assists/src/handlers/extract_struct_from_enum_variant.rs | 322 | ||||
-rw-r--r-- | crates/assists/src/handlers/extract_variable.rs | 588 | ||||
-rw-r--r-- | crates/assists/src/handlers/fill_match_arms.rs | 747 | ||||
-rw-r--r-- | crates/assists/src/handlers/fix_visibility.rs | 607 | ||||
-rw-r--r-- | crates/assists/src/handlers/flip_binexpr.rs | 142 | ||||
-rw-r--r-- | crates/assists/src/handlers/flip_comma.rs | 84 | ||||
-rw-r--r-- | crates/assists/src/handlers/flip_trait_bound.rs | 121 | ||||
-rw-r--r-- | crates/assists/src/handlers/generate_derive.rs | 132 | ||||
-rw-r--r-- | crates/assists/src/handlers/generate_from_impl_for_enum.rs | 200 | ||||
-rw-r--r-- | crates/assists/src/handlers/generate_function.rs | 1058 | ||||
-rw-r--r-- | crates/assists/src/handlers/generate_impl.rs | 110 | ||||
-rw-r--r-- | crates/assists/src/handlers/generate_new.rs | 421 | ||||
-rw-r--r-- | crates/assists/src/handlers/inline_local_variable.rs | 695 | ||||
-rw-r--r-- | crates/assists/src/handlers/introduce_named_lifetime.rs | 318 | ||||
-rw-r--r-- | crates/assists/src/handlers/invert_if.rs | 109 | ||||
-rw-r--r-- | crates/assists/src/handlers/merge_imports.rs | 321 | ||||
-rw-r--r-- | crates/assists/src/handlers/merge_match_arms.rs | 248 | ||||
-rw-r--r-- | crates/assists/src/handlers/move_bounds.rs | 152 | ||||
-rw-r--r-- | crates/assists/src/handlers/move_guard.rs | 293 | ||||
-rw-r--r-- | crates/assists/src/handlers/raw_string.rs | 504 | ||||
-rw-r--r-- | crates/assists/src/handlers/remove_dbg.rs | 205 | ||||
-rw-r--r-- | crates/assists/src/handlers/remove_mut.rs | 37 | ||||
-rw-r--r-- | crates/assists/src/handlers/reorder_fields.rs | 220 | ||||
-rw-r--r-- | crates/assists/src/handlers/replace_if_let_with_match.rs | 257 | ||||
-rw-r--r-- | crates/assists/src/handlers/replace_let_with_if_let.rs | 100 | ||||
-rw-r--r-- | crates/assists/src/handlers/replace_qualified_name_with_use.rs | 680 | ||||
-rw-r--r-- | crates/assists/src/handlers/replace_unwrap_with_match.rs | 187 | ||||
-rw-r--r-- | crates/assists/src/handlers/split_import.rs | 79 | ||||
-rw-r--r-- | crates/assists/src/handlers/unwrap_block.rs | 517 | ||||
-rw-r--r-- | crates/assists/src/lib.rs | 224 | ||||
-rw-r--r-- | crates/assists/src/tests.rs | 179 | ||||
-rw-r--r-- | crates/assists/src/tests/generated.rs | 891 | ||||
-rw-r--r-- | crates/assists/src/utils.rs | 313 | ||||
-rw-r--r-- | crates/assists/src/utils/insert_use.rs | 546 | ||||
-rw-r--r-- | crates/base_db/Cargo.toml | 21 | ||||
-rw-r--r-- | crates/base_db/src/cancellation.rs (renamed from crates/ra_db/src/cancellation.rs) | 0 | ||||
-rw-r--r-- | crates/base_db/src/fixture.rs | 228 | ||||
-rw-r--r-- | crates/base_db/src/input.rs | 453 | ||||
-rw-r--r-- | crates/base_db/src/lib.rs | 167 | ||||
-rw-r--r-- | crates/cfg/Cargo.toml | 18 | ||||
-rw-r--r-- | crates/cfg/src/cfg_expr.rs | 133 | ||||
-rw-r--r-- | crates/cfg/src/lib.rs | 51 | ||||
-rw-r--r-- | crates/expect/Cargo.toml | 5 | ||||
-rw-r--r-- | crates/expect/src/lib.rs | 2 | ||||
-rw-r--r-- | crates/flycheck/Cargo.toml | 9 | ||||
-rw-r--r-- | crates/flycheck/src/lib.rs | 12 | ||||
-rw-r--r-- | crates/hir/Cargo.toml | 24 | ||||
-rw-r--r-- | crates/hir/src/code_model.rs | 1716 | ||||
-rw-r--r-- | crates/hir/src/db.rs (renamed from crates/ra_hir/src/db.rs) | 0 | ||||
-rw-r--r-- | crates/hir/src/diagnostics.rs | 6 | ||||
-rw-r--r-- | crates/hir/src/from_id.rs | 247 | ||||
-rw-r--r-- | crates/hir/src/has_source.rs | 135 | ||||
-rw-r--r-- | crates/hir/src/lib.rs | 66 | ||||
-rw-r--r-- | crates/hir/src/semantics.rs | 818 | ||||
-rw-r--r-- | crates/hir/src/semantics/source_to_def.rs | 275 | ||||
-rw-r--r-- | crates/hir/src/source_analyzer.rs | 534 | ||||
-rw-r--r-- | crates/hir_def/Cargo.toml | 35 | ||||
-rw-r--r-- | crates/hir_def/src/adt.rs | 329 | ||||
-rw-r--r-- | crates/hir_def/src/attr.rs | 212 | ||||
-rw-r--r-- | crates/hir_def/src/body.rs | 360 | ||||
-rw-r--r-- | crates/hir_def/src/body/lower.rs | 931 | ||||
-rw-r--r-- | crates/hir_def/src/body/scope.rs | 456 | ||||
-rw-r--r-- | crates/hir_def/src/builtin_type.rs (renamed from crates/ra_hir_def/src/builtin_type.rs) | 0 | ||||
-rw-r--r-- | crates/hir_def/src/child_by_source.rs (renamed from crates/ra_hir_def/src/child_by_source.rs) | 0 | ||||
-rw-r--r-- | crates/hir_def/src/data.rs | 278 | ||||
-rw-r--r-- | crates/hir_def/src/db.rs | 120 | ||||
-rw-r--r-- | crates/hir_def/src/diagnostics.rs | 27 | ||||
-rw-r--r-- | crates/hir_def/src/docs.rs | 121 | ||||
-rw-r--r-- | crates/hir_def/src/dyn_map.rs (renamed from crates/ra_hir_def/src/dyn_map.rs) | 0 | ||||
-rw-r--r-- | crates/hir_def/src/expr.rs | 420 | ||||
-rw-r--r-- | crates/hir_def/src/find_path.rs | 687 | ||||
-rw-r--r-- | crates/hir_def/src/generics.rs | 339 | ||||
-rw-r--r-- | crates/hir_def/src/import_map.rs | 745 | ||||
-rw-r--r-- | crates/hir_def/src/item_scope.rs | 341 | ||||
-rw-r--r-- | crates/hir_def/src/item_tree.rs | 754 | ||||
-rw-r--r-- | crates/hir_def/src/item_tree/lower.rs | 705 | ||||
-rw-r--r-- | crates/hir_def/src/item_tree/tests.rs | 439 | ||||
-rw-r--r-- | crates/hir_def/src/keys.rs | 58 | ||||
-rw-r--r-- | crates/hir_def/src/lang_item.rs | 174 | ||||
-rw-r--r-- | crates/hir_def/src/lib.rs | 541 | ||||
-rw-r--r-- | crates/hir_def/src/nameres.rs | 326 | ||||
-rw-r--r-- | crates/hir_def/src/nameres/collector.rs | 1279 | ||||
-rw-r--r-- | crates/hir_def/src/nameres/mod_resolution.rs | 139 | ||||
-rw-r--r-- | crates/hir_def/src/nameres/path_resolution.rs | 330 | ||||
-rw-r--r-- | crates/hir_def/src/nameres/tests.rs | 690 | ||||
-rw-r--r-- | crates/hir_def/src/nameres/tests/globs.rs (renamed from crates/ra_hir_def/src/nameres/tests/globs.rs) | 0 | ||||
-rw-r--r-- | crates/hir_def/src/nameres/tests/incremental.rs | 101 | ||||
-rw-r--r-- | crates/hir_def/src/nameres/tests/macros.rs (renamed from crates/ra_hir_def/src/nameres/tests/macros.rs) | 0 | ||||
-rw-r--r-- | crates/hir_def/src/nameres/tests/mod_resolution.rs | 796 | ||||
-rw-r--r-- | crates/hir_def/src/nameres/tests/primitives.rs (renamed from crates/ra_hir_def/src/nameres/tests/primitives.rs) | 0 | ||||
-rw-r--r-- | crates/hir_def/src/path.rs | 345 | ||||
-rw-r--r-- | crates/hir_def/src/path/lower.rs | 215 | ||||
-rw-r--r-- | crates/hir_def/src/path/lower/lower_use.rs | 120 | ||||
-rw-r--r-- | crates/hir_def/src/per_ns.rs (renamed from crates/ra_hir_def/src/per_ns.rs) | 0 | ||||
-rw-r--r-- | crates/hir_def/src/resolver.rs | 713 | ||||
-rw-r--r-- | crates/hir_def/src/src.rs | 43 | ||||
-rw-r--r-- | crates/hir_def/src/test_db.rs | 101 | ||||
-rw-r--r-- | crates/hir_def/src/trace.rs | 51 | ||||
-rw-r--r-- | crates/hir_def/src/type_ref.rs | 245 | ||||
-rw-r--r-- | crates/hir_def/src/visibility.rs | 171 | ||||
-rw-r--r-- | crates/hir_expand/Cargo.toml | 23 | ||||
-rw-r--r-- | crates/hir_expand/src/ast_id_map.rs | 119 | ||||
-rw-r--r-- | crates/hir_expand/src/builtin_derive.rs | 361 | ||||
-rw-r--r-- | crates/hir_expand/src/builtin_macro.rs | 649 | ||||
-rw-r--r-- | crates/hir_expand/src/db.rs | 403 | ||||
-rw-r--r-- | crates/hir_expand/src/diagnostics.rs | 95 | ||||
-rw-r--r-- | crates/hir_expand/src/eager.rs | 144 | ||||
-rw-r--r-- | crates/hir_expand/src/hygiene.rs | 66 | ||||
-rw-r--r-- | crates/hir_expand/src/lib.rs | 453 | ||||
-rw-r--r-- | crates/hir_expand/src/name.rs | 230 | ||||
-rw-r--r-- | crates/hir_expand/src/proc_macro.rs | 143 | ||||
-rw-r--r-- | crates/hir_expand/src/quote.rs (renamed from crates/ra_hir_expand/src/quote.rs) | 0 | ||||
-rw-r--r-- | crates/hir_expand/src/test_db.rs | 49 | ||||
-rw-r--r-- | crates/hir_ty/Cargo.toml | 37 | ||||
-rw-r--r-- | crates/hir_ty/src/autoderef.rs | 131 | ||||
-rw-r--r-- | crates/hir_ty/src/db.rs | 158 | ||||
-rw-r--r-- | crates/hir_ty/src/diagnostics.rs | 444 | ||||
-rw-r--r-- | crates/hir_ty/src/diagnostics/expr.rs | 569 | ||||
-rw-r--r-- | crates/hir_ty/src/diagnostics/match_check.rs | 1438 | ||||
-rw-r--r-- | crates/hir_ty/src/diagnostics/unsafe_check.rs (renamed from crates/ra_hir_ty/src/diagnostics/unsafe_check.rs) | 0 | ||||
-rw-r--r-- | crates/hir_ty/src/display.rs | 632 | ||||
-rw-r--r-- | crates/hir_ty/src/infer.rs | 802 | ||||
-rw-r--r-- | crates/hir_ty/src/infer/coerce.rs (renamed from crates/ra_hir_ty/src/infer/coerce.rs) | 0 | ||||
-rw-r--r-- | crates/hir_ty/src/infer/expr.rs | 873 | ||||
-rw-r--r-- | crates/hir_ty/src/infer/pat.rs (renamed from crates/ra_hir_ty/src/infer/pat.rs) | 0 | ||||
-rw-r--r-- | crates/hir_ty/src/infer/path.rs (renamed from crates/ra_hir_ty/src/infer/path.rs) | 0 | ||||
-rw-r--r-- | crates/hir_ty/src/infer/unify.rs (renamed from crates/ra_hir_ty/src/infer/unify.rs) | 0 | ||||
-rw-r--r-- | crates/hir_ty/src/lib.rs | 1078 | ||||
-rw-r--r-- | crates/hir_ty/src/lower.rs | 1242 | ||||
-rw-r--r-- | crates/hir_ty/src/method_resolution.rs | 769 | ||||
-rw-r--r-- | crates/hir_ty/src/op.rs (renamed from crates/ra_hir_ty/src/op.rs) | 0 | ||||
-rw-r--r-- | crates/hir_ty/src/primitive.rs (renamed from crates/ra_hir_ty/src/primitive.rs) | 0 | ||||
-rw-r--r-- | crates/hir_ty/src/test_db.rs | 136 | ||||
-rw-r--r-- | crates/hir_ty/src/tests.rs | 359 | ||||
-rw-r--r-- | crates/hir_ty/src/tests/coercion.rs (renamed from crates/ra_hir_ty/src/tests/coercion.rs) | 0 | ||||
-rw-r--r-- | crates/hir_ty/src/tests/display_source_code.rs (renamed from crates/ra_hir_ty/src/tests/display_source_code.rs) | 0 | ||||
-rw-r--r-- | crates/hir_ty/src/tests/macros.rs | 787 | ||||
-rw-r--r-- | crates/hir_ty/src/tests/method_resolution.rs (renamed from crates/ra_hir_ty/src/tests/method_resolution.rs) | 0 | ||||
-rw-r--r-- | crates/hir_ty/src/tests/never_type.rs (renamed from crates/ra_hir_ty/src/tests/never_type.rs) | 0 | ||||
-rw-r--r-- | crates/hir_ty/src/tests/patterns.rs (renamed from crates/ra_hir_ty/src/tests/patterns.rs) | 0 | ||||
-rw-r--r-- | crates/hir_ty/src/tests/regression.rs (renamed from crates/ra_hir_ty/src/tests/regression.rs) | 0 | ||||
-rw-r--r-- | crates/hir_ty/src/tests/simple.rs | 2218 | ||||
-rw-r--r-- | crates/hir_ty/src/tests/traits.rs (renamed from crates/ra_hir_ty/src/tests/traits.rs) | 0 | ||||
-rw-r--r-- | crates/hir_ty/src/traits.rs | 285 | ||||
-rw-r--r-- | crates/hir_ty/src/traits/chalk.rs | 589 | ||||
-rw-r--r-- | crates/hir_ty/src/traits/chalk/interner.rs | 383 | ||||
-rw-r--r-- | crates/hir_ty/src/traits/chalk/mapping.rs | 787 | ||||
-rw-r--r-- | crates/hir_ty/src/traits/chalk/tls.rs (renamed from crates/ra_hir_ty/src/traits/chalk/tls.rs) | 0 | ||||
-rw-r--r-- | crates/hir_ty/src/utils.rs (renamed from crates/ra_hir_ty/src/utils.rs) | 0 | ||||
-rw-r--r-- | crates/ide/Cargo.toml | 35 | ||||
-rw-r--r-- | crates/ide/src/call_hierarchy.rs | 393 | ||||
-rw-r--r-- | crates/ide/src/call_info.rs | 742 | ||||
-rw-r--r-- | crates/ide/src/completion.rs | 206 | ||||
-rw-r--r-- | crates/ide/src/completion/complete_attribute.rs | 644 | ||||
-rw-r--r-- | crates/ide/src/completion/complete_dot.rs (renamed from crates/ra_ide/src/completion/complete_dot.rs) | 0 | ||||
-rw-r--r-- | crates/ide/src/completion/complete_fn_param.rs | 135 | ||||
-rw-r--r-- | crates/ide/src/completion/complete_keyword.rs | 527 | ||||
-rw-r--r-- | crates/ide/src/completion/complete_macro_in_item_position.rs (renamed from crates/ra_ide/src/completion/complete_macro_in_item_position.rs) | 0 | ||||
-rw-r--r-- | crates/ide/src/completion/complete_pattern.rs (renamed from crates/ra_ide/src/completion/complete_pattern.rs) | 0 | ||||
-rw-r--r-- | crates/ide/src/completion/complete_postfix.rs | 378 | ||||
-rw-r--r-- | crates/ide/src/completion/complete_qualified_path.rs | 733 | ||||
-rw-r--r-- | crates/ide/src/completion/complete_record.rs (renamed from crates/ra_ide/src/completion/complete_record.rs) | 0 | ||||
-rw-r--r-- | crates/ide/src/completion/complete_snippet.rs | 116 | ||||
-rw-r--r-- | crates/ide/src/completion/complete_trait_impl.rs | 488 | ||||
-rw-r--r-- | crates/ide/src/completion/complete_unqualified_path.rs | 658 | ||||
-rw-r--r-- | crates/ide/src/completion/completion_config.rs (renamed from crates/ra_ide/src/completion/completion_config.rs) | 0 | ||||
-rw-r--r-- | crates/ide/src/completion/completion_context.rs | 486 | ||||
-rw-r--r-- | crates/ide/src/completion/completion_item.rs | 384 | ||||
-rw-r--r-- | crates/ide/src/completion/patterns.rs | 194 | ||||
-rw-r--r-- | crates/ide/src/completion/presentation.rs | 1229 | ||||
-rw-r--r-- | crates/ide/src/completion/test_utils.rs | 114 | ||||
-rw-r--r-- | crates/ide/src/diagnostics.rs | 678 | ||||
-rw-r--r-- | crates/ide/src/diagnostics/diagnostics_with_fix.rs | 171 | ||||
-rw-r--r-- | crates/ide/src/display.rs | 83 | ||||
-rw-r--r-- | crates/ide/src/display/navigation_target.rs | 491 | ||||
-rw-r--r-- | crates/ide/src/display/short_label.rs | 111 | ||||
-rw-r--r-- | crates/ide/src/expand_macro.rs | 283 | ||||
-rw-r--r-- | crates/ide/src/extend_selection.rs | 654 | ||||
-rw-r--r-- | crates/ide/src/file_structure.rs | 431 | ||||
-rw-r--r-- | crates/ide/src/folding_ranges.rs | 422 | ||||
-rw-r--r-- | crates/ide/src/goto_definition.rs | 989 | ||||
-rw-r--r-- | crates/ide/src/goto_implementation.rs | 229 | ||||
-rw-r--r-- | crates/ide/src/goto_type_definition.rs | 151 | ||||
-rw-r--r-- | crates/ide/src/hover.rs | 2480 | ||||
-rw-r--r-- | crates/ide/src/inlay_hints.rs | 927 | ||||
-rw-r--r-- | crates/ide/src/join_lines.rs | 773 | ||||
-rw-r--r-- | crates/ide/src/lib.rs | 542 | ||||
-rw-r--r-- | crates/ide/src/markup.rs (renamed from crates/ra_ide/src/markup.rs) | 0 | ||||
-rw-r--r-- | crates/ide/src/matching_brace.rs | 73 | ||||
-rw-r--r-- | crates/ide/src/mock_analysis.rs | 176 | ||||
-rw-r--r-- | crates/ide/src/parent_module.rs | 155 | ||||
-rw-r--r-- | crates/ide/src/prime_caches.rs (renamed from crates/ra_ide/src/prime_caches.rs) | 0 | ||||
-rw-r--r-- | crates/ide/src/references.rs | 694 | ||||
-rw-r--r-- | crates/ide/src/references/rename.rs | 1010 | ||||
-rw-r--r-- | crates/ide/src/runnables.rs | 883 | ||||
-rw-r--r-- | crates/ide/src/status.rs | 145 | ||||
-rw-r--r-- | crates/ide/src/syntax_highlighting.rs | 872 | ||||
-rw-r--r-- | crates/ide/src/syntax_highlighting/html.rs | 97 | ||||
-rw-r--r-- | crates/ide/src/syntax_highlighting/injection.rs | 187 | ||||
-rw-r--r-- | crates/ide/src/syntax_highlighting/tags.rs (renamed from crates/ra_ide/src/syntax_highlighting/tags.rs) | 0 | ||||
-rw-r--r-- | crates/ide/src/syntax_highlighting/tests.rs | 445 | ||||
-rw-r--r-- | crates/ide/src/syntax_tree.rs | 359 | ||||
-rw-r--r-- | crates/ide/src/typing.rs | 364 | ||||
-rw-r--r-- | crates/ide/src/typing/on_enter.rs | 256 | ||||
-rw-r--r-- | crates/ide/test_data/highlight_doctest.html (renamed from crates/ra_ide/test_data/highlight_doctest.html) | 0 | ||||
-rw-r--r-- | crates/ide/test_data/highlight_extern_crate.html | 40 | ||||
-rw-r--r-- | crates/ide/test_data/highlight_injection.html (renamed from crates/ra_ide/test_data/highlight_injection.html) | 0 | ||||
-rw-r--r-- | crates/ide/test_data/highlight_strings.html (renamed from crates/ra_ide/test_data/highlight_strings.html) | 0 | ||||
-rw-r--r-- | crates/ide/test_data/highlight_unsafe.html | 99 | ||||
-rw-r--r-- | crates/ide/test_data/highlighting.html (renamed from crates/ra_ide/test_data/highlighting.html) | 0 | ||||
-rw-r--r-- | crates/ide/test_data/rainbow_highlighting.html (renamed from crates/ra_ide/test_data/rainbow_highlighting.html) | 0 | ||||
-rw-r--r-- | crates/ide_db/Cargo.toml | 30 | ||||
-rw-r--r-- | crates/ide_db/src/change.rs | 318 | ||||
-rw-r--r-- | crates/ide_db/src/defs.rs | 348 | ||||
-rw-r--r-- | crates/ide_db/src/imports_locator.rs | 64 | ||||
-rw-r--r-- | crates/ide_db/src/lib.rs | 139 | ||||
-rw-r--r-- | crates/ide_db/src/line_index.rs | 281 | ||||
-rw-r--r-- | crates/ide_db/src/search.rs | 322 | ||||
-rw-r--r-- | crates/ide_db/src/source_change.rs | 59 | ||||
-rw-r--r-- | crates/ide_db/src/symbol_index.rs | 429 | ||||
-rw-r--r-- | crates/ide_db/src/wasm_shims.rs (renamed from crates/ra_ide_db/src/wasm_shims.rs) | 0 | ||||
-rw-r--r-- | crates/mbe/Cargo.toml | 21 | ||||
-rw-r--r-- | crates/mbe/src/lib.rs | 278 | ||||
-rw-r--r-- | crates/mbe/src/mbe_expander.rs | 180 | ||||
-rw-r--r-- | crates/mbe/src/mbe_expander/matcher.rs | 477 | ||||
-rw-r--r-- | crates/mbe/src/mbe_expander/transcriber.rs | 254 | ||||
-rw-r--r-- | crates/mbe/src/parser.rs | 184 | ||||
-rw-r--r-- | crates/mbe/src/subtree_source.rs | 197 | ||||
-rw-r--r-- | crates/mbe/src/syntax_bridge.rs | 832 | ||||
-rw-r--r-- | crates/mbe/src/tests.rs | 1898 | ||||
-rw-r--r-- | crates/mbe/src/tt_iter.rs (renamed from crates/ra_mbe/src/tt_iter.rs) | 0 | ||||
-rw-r--r-- | crates/parser/Cargo.toml | 12 | ||||
-rw-r--r-- | crates/parser/src/event.rs (renamed from crates/ra_parser/src/event.rs) | 0 | ||||
-rw-r--r-- | crates/parser/src/grammar.rs | 293 | ||||
-rw-r--r-- | crates/parser/src/grammar/attributes.rs | 48 | ||||
-rw-r--r-- | crates/parser/src/grammar/expressions.rs | 651 | ||||
-rw-r--r-- | crates/parser/src/grammar/expressions/atom.rs | 611 | ||||
-rw-r--r-- | crates/parser/src/grammar/items.rs | 444 | ||||
-rw-r--r-- | crates/parser/src/grammar/items/adt.rs | 178 | ||||
-rw-r--r-- | crates/parser/src/grammar/items/consts.rs | 33 | ||||
-rw-r--r-- | crates/parser/src/grammar/items/traits.rs | 131 | ||||
-rw-r--r-- | crates/parser/src/grammar/items/use_item.rs | 132 | ||||
-rw-r--r-- | crates/parser/src/grammar/params.rs | 188 | ||||
-rw-r--r-- | crates/parser/src/grammar/paths.rs | 115 | ||||
-rw-r--r-- | crates/parser/src/grammar/patterns.rs | 379 | ||||
-rw-r--r-- | crates/parser/src/grammar/type_args.rs | 63 | ||||
-rw-r--r-- | crates/parser/src/grammar/type_params.rs | 209 | ||||
-rw-r--r-- | crates/parser/src/grammar/types.rs | 324 | ||||
-rw-r--r-- | crates/parser/src/lib.rs | 149 | ||||
-rw-r--r-- | crates/parser/src/parser.rs | 350 | ||||
-rw-r--r-- | crates/parser/src/syntax_kind.rs (renamed from crates/ra_parser/src/syntax_kind.rs) | 0 | ||||
-rw-r--r-- | crates/parser/src/syntax_kind/generated.rs (renamed from crates/ra_parser/src/syntax_kind/generated.rs) | 0 | ||||
-rw-r--r-- | crates/parser/src/token_set.rs (renamed from crates/ra_parser/src/token_set.rs) | 0 | ||||
-rw-r--r-- | crates/paths/Cargo.toml | 4 | ||||
-rw-r--r-- | crates/proc_macro_api/Cargo.toml | 18 | ||||
-rw-r--r-- | crates/proc_macro_api/src/lib.rs | 111 | ||||
-rw-r--r-- | crates/proc_macro_api/src/msg.rs | 89 | ||||
-rw-r--r-- | crates/proc_macro_api/src/process.rs | 201 | ||||
-rw-r--r-- | crates/proc_macro_api/src/rpc.rs | 267 | ||||
-rw-r--r-- | crates/proc_macro_srv/Cargo.toml | 29 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/cli.rs | 39 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/dylib.rs | 224 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/lib.rs | 69 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/proc_macro/bridge/buffer.rs (renamed from crates/ra_proc_macro_srv/src/proc_macro/bridge/buffer.rs) | 0 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/proc_macro/bridge/client.rs (renamed from crates/ra_proc_macro_srv/src/proc_macro/bridge/client.rs) | 0 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/proc_macro/bridge/closure.rs (renamed from crates/ra_proc_macro_srv/src/proc_macro/bridge/closure.rs) | 0 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/proc_macro/bridge/handle.rs (renamed from crates/ra_proc_macro_srv/src/proc_macro/bridge/handle.rs) | 0 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/proc_macro/bridge/mod.rs (renamed from crates/ra_proc_macro_srv/src/proc_macro/bridge/mod.rs) | 0 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/proc_macro/bridge/rpc.rs (renamed from crates/ra_proc_macro_srv/src/proc_macro/bridge/rpc.rs) | 0 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/proc_macro/bridge/scoped_cell.rs (renamed from crates/ra_proc_macro_srv/src/proc_macro/bridge/scoped_cell.rs) | 0 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/proc_macro/bridge/server.rs (renamed from crates/ra_proc_macro_srv/src/proc_macro/bridge/server.rs) | 0 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/proc_macro/diagnostic.rs (renamed from crates/ra_proc_macro_srv/src/proc_macro/diagnostic.rs) | 0 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/proc_macro/mod.rs (renamed from crates/ra_proc_macro_srv/src/proc_macro/mod.rs) | 0 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/rustc_server.rs | 704 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/tests/fixtures/test_serialize_proc_macro.txt (renamed from crates/ra_proc_macro_srv/src/tests/fixtures/test_serialize_proc_macro.txt) | 0 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/tests/mod.rs | 58 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/tests/utils.rs | 64 | ||||
-rw-r--r-- | crates/proc_macro_test/Cargo.toml | 10 | ||||
-rw-r--r-- | crates/proc_macro_test/src/lib.rs | 18 | ||||
-rw-r--r-- | crates/profile/Cargo.toml | 27 | ||||
-rw-r--r-- | crates/profile/src/google_cpu_profiler.rs (renamed from crates/ra_prof/src/google_cpu_profiler.rs) | 0 | ||||
-rw-r--r-- | crates/profile/src/hprof.rs | 240 | ||||
-rw-r--r-- | crates/profile/src/lib.rs | 109 | ||||
-rw-r--r-- | crates/profile/src/memory_usage.rs | 75 | ||||
-rw-r--r-- | crates/profile/src/stop_watch.rs (renamed from crates/ra_prof/src/stop_watch.rs) | 0 | ||||
-rw-r--r-- | crates/profile/src/tree.rs | 84 | ||||
-rw-r--r-- | crates/project_model/Cargo.toml | 25 | ||||
-rw-r--r-- | crates/project_model/src/cargo_workspace.rs | 362 | ||||
-rw-r--r-- | crates/project_model/src/cfg_flag.rs | 51 | ||||
-rw-r--r-- | crates/project_model/src/lib.rs | 544 | ||||
-rw-r--r-- | crates/project_model/src/project_json.rs | 143 | ||||
-rw-r--r-- | crates/project_model/src/sysroot.rs | 173 | ||||
-rw-r--r-- | crates/ra_arena/Cargo.toml | 9 | ||||
-rw-r--r-- | crates/ra_assists/Cargo.toml | 25 | ||||
-rw-r--r-- | crates/ra_assists/src/assist_context.rs | 306 | ||||
-rw-r--r-- | crates/ra_assists/src/ast_transform.rs | 212 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/add_custom_impl.rs | 208 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/add_explicit_type.rs | 211 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/add_missing_impl_members.rs | 711 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/add_turbo_fish.rs | 164 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/apply_demorgan.rs | 93 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/auto_import.rs | 1089 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/change_return_type_to_result.rs | 991 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/change_visibility.rs | 200 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/early_return.rs | 515 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/expand_glob_import.rs | 391 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs | 321 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/extract_variable.rs | 588 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/fill_match_arms.rs | 747 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/fix_visibility.rs | 607 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/flip_binexpr.rs | 142 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/flip_comma.rs | 84 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/flip_trait_bound.rs | 121 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/generate_derive.rs | 132 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs | 200 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/generate_function.rs | 1058 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/generate_impl.rs | 109 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/generate_new.rs | 420 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/inline_local_variable.rs | 695 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/introduce_named_lifetime.rs | 318 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/invert_if.rs | 109 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/merge_imports.rs | 294 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/merge_match_arms.rs | 248 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/move_bounds.rs | 152 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/move_guard.rs | 303 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/raw_string.rs | 504 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/remove_dbg.rs | 205 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/remove_mut.rs | 37 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/reorder_fields.rs | 220 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/replace_if_let_with_match.rs | 255 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/replace_let_with_if_let.rs | 100 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs | 688 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/replace_unwrap_with_match.rs | 187 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/split_import.rs | 79 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/unwrap_block.rs | 518 | ||||
-rw-r--r-- | crates/ra_assists/src/lib.rs | 226 | ||||
-rw-r--r-- | crates/ra_assists/src/tests.rs | 179 | ||||
-rw-r--r-- | crates/ra_assists/src/tests/generated.rs | 890 | ||||
-rw-r--r-- | crates/ra_assists/src/utils.rs | 275 | ||||
-rw-r--r-- | crates/ra_assists/src/utils/insert_use.rs | 526 | ||||
-rw-r--r-- | crates/ra_cfg/Cargo.toml | 18 | ||||
-rw-r--r-- | crates/ra_cfg/src/cfg_expr.rs | 135 | ||||
-rw-r--r-- | crates/ra_cfg/src/lib.rs | 51 | ||||
-rw-r--r-- | crates/ra_db/Cargo.toml | 21 | ||||
-rw-r--r-- | crates/ra_db/src/fixture.rs | 228 | ||||
-rw-r--r-- | crates/ra_db/src/input.rs | 453 | ||||
-rw-r--r-- | crates/ra_db/src/lib.rs | 168 | ||||
-rw-r--r-- | crates/ra_fmt/Cargo.toml | 15 | ||||
-rw-r--r-- | crates/ra_fmt/src/lib.rs | 96 | ||||
-rw-r--r-- | crates/ra_hir/Cargo.toml | 25 | ||||
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 1695 | ||||
-rw-r--r-- | crates/ra_hir/src/diagnostics.rs | 8 | ||||
-rw-r--r-- | crates/ra_hir/src/from_id.rs | 247 | ||||
-rw-r--r-- | crates/ra_hir/src/has_source.rs | 135 | ||||
-rw-r--r-- | crates/ra_hir/src/lib.rs | 59 | ||||
-rw-r--r-- | crates/ra_hir/src/semantics.rs | 731 | ||||
-rw-r--r-- | crates/ra_hir/src/semantics/source_to_def.rs | 276 | ||||
-rw-r--r-- | crates/ra_hir/src/source_analyzer.rs | 535 | ||||
-rw-r--r-- | crates/ra_hir_def/Cargo.toml | 36 | ||||
-rw-r--r-- | crates/ra_hir_def/src/adt.rs | 295 | ||||
-rw-r--r-- | crates/ra_hir_def/src/attr.rs | 212 | ||||
-rw-r--r-- | crates/ra_hir_def/src/body.rs | 361 | ||||
-rw-r--r-- | crates/ra_hir_def/src/body/lower.rs | 931 | ||||
-rw-r--r-- | crates/ra_hir_def/src/body/scope.rs | 456 | ||||
-rw-r--r-- | crates/ra_hir_def/src/data.rs | 279 | ||||
-rw-r--r-- | crates/ra_hir_def/src/db.rs | 121 | ||||
-rw-r--r-- | crates/ra_hir_def/src/diagnostics.rs | 27 | ||||
-rw-r--r-- | crates/ra_hir_def/src/docs.rs | 121 | ||||
-rw-r--r-- | crates/ra_hir_def/src/expr.rs | 420 | ||||
-rw-r--r-- | crates/ra_hir_def/src/find_path.rs | 691 | ||||
-rw-r--r-- | crates/ra_hir_def/src/generics.rs | 340 | ||||
-rw-r--r-- | crates/ra_hir_def/src/import_map.rs | 745 | ||||
-rw-r--r-- | crates/ra_hir_def/src/item_scope.rs | 341 | ||||
-rw-r--r-- | crates/ra_hir_def/src/item_tree.rs | 754 | ||||
-rw-r--r-- | crates/ra_hir_def/src/item_tree/lower.rs | 705 | ||||
-rw-r--r-- | crates/ra_hir_def/src/item_tree/tests.rs | 439 | ||||
-rw-r--r-- | crates/ra_hir_def/src/keys.rs | 58 | ||||
-rw-r--r-- | crates/ra_hir_def/src/lang_item.rs | 175 | ||||
-rw-r--r-- | crates/ra_hir_def/src/lib.rs | 541 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres.rs | 327 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/collector.rs | 1279 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/mod_resolution.rs | 139 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/path_resolution.rs | 330 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/tests.rs | 690 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/tests/incremental.rs | 101 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/tests/mod_resolution.rs | 796 | ||||
-rw-r--r-- | crates/ra_hir_def/src/path.rs | 351 | ||||
-rw-r--r-- | crates/ra_hir_def/src/path/lower.rs | 215 | ||||
-rw-r--r-- | crates/ra_hir_def/src/path/lower/lower_use.rs | 120 | ||||
-rw-r--r-- | crates/ra_hir_def/src/resolver.rs | 713 | ||||
-rw-r--r-- | crates/ra_hir_def/src/src.rs | 43 | ||||
-rw-r--r-- | crates/ra_hir_def/src/test_db.rs | 101 | ||||
-rw-r--r-- | crates/ra_hir_def/src/trace.rs | 51 | ||||
-rw-r--r-- | crates/ra_hir_def/src/type_ref.rs | 245 | ||||
-rw-r--r-- | crates/ra_hir_def/src/visibility.rs | 171 | ||||
-rw-r--r-- | crates/ra_hir_expand/Cargo.toml | 23 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/ast_id_map.rs | 119 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/builtin_derive.rs | 361 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/builtin_macro.rs | 649 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/db.rs | 404 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/diagnostics.rs | 110 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/eager.rs | 144 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/hygiene.rs | 66 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/lib.rs | 452 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/name.rs | 230 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/proc_macro.rs | 143 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/test_db.rs | 49 | ||||
-rw-r--r-- | crates/ra_hir_ty/Cargo.toml | 40 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/autoderef.rs | 131 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/db.rs | 159 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/diagnostics.rs | 481 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/diagnostics/expr.rs | 565 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/diagnostics/match_check.rs | 1421 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/display.rs | 631 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/infer.rs | 800 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/infer/expr.rs | 873 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/lib.rs | 1078 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/lower.rs | 1239 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/method_resolution.rs | 770 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/test_db.rs | 136 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/tests.rs | 359 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/tests/macros.rs | 787 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/tests/simple.rs | 2190 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/traits.rs | 273 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/traits/chalk.rs | 586 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/traits/chalk/interner.rs | 383 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/traits/chalk/mapping.rs | 787 | ||||
-rw-r--r-- | crates/ra_ide/Cargo.toml | 40 | ||||
-rw-r--r-- | crates/ra_ide/src/call_hierarchy.rs | 393 | ||||
-rw-r--r-- | crates/ra_ide/src/call_info.rs | 742 | ||||
-rw-r--r-- | crates/ra_ide/src/completion.rs | 206 | ||||
-rw-r--r-- | crates/ra_ide/src/completion/complete_attribute.rs | 644 | ||||
-rw-r--r-- | crates/ra_ide/src/completion/complete_fn_param.rs | 135 | ||||
-rw-r--r-- | crates/ra_ide/src/completion/complete_keyword.rs | 536 | ||||
-rw-r--r-- | crates/ra_ide/src/completion/complete_postfix.rs | 378 | ||||
-rw-r--r-- | crates/ra_ide/src/completion/complete_qualified_path.rs | 733 | ||||
-rw-r--r-- | crates/ra_ide/src/completion/complete_snippet.rs | 116 | ||||
-rw-r--r-- | crates/ra_ide/src/completion/complete_trait_impl.rs | 488 | ||||
-rw-r--r-- | crates/ra_ide/src/completion/complete_unqualified_path.rs | 658 | ||||
-rw-r--r-- | crates/ra_ide/src/completion/completion_context.rs | 465 | ||||
-rw-r--r-- | crates/ra_ide/src/completion/completion_item.rs | 384 | ||||
-rw-r--r-- | crates/ra_ide/src/completion/patterns.rs | 194 | ||||
-rw-r--r-- | crates/ra_ide/src/completion/presentation.rs | 1230 | ||||
-rw-r--r-- | crates/ra_ide/src/completion/test_utils.rs | 114 | ||||
-rw-r--r-- | crates/ra_ide/src/diagnostics.rs | 799 | ||||
-rw-r--r-- | crates/ra_ide/src/display.rs | 83 | ||||
-rw-r--r-- | crates/ra_ide/src/display/navigation_target.rs | 491 | ||||
-rw-r--r-- | crates/ra_ide/src/display/short_label.rs | 101 | ||||
-rw-r--r-- | crates/ra_ide/src/expand_macro.rs | 283 | ||||
-rw-r--r-- | crates/ra_ide/src/extend_selection.rs | 654 | ||||
-rw-r--r-- | crates/ra_ide/src/file_structure.rs | 431 | ||||
-rw-r--r-- | crates/ra_ide/src/folding_ranges.rs | 422 | ||||
-rw-r--r-- | crates/ra_ide/src/goto_definition.rs | 967 | ||||
-rw-r--r-- | crates/ra_ide/src/goto_implementation.rs | 229 | ||||
-rw-r--r-- | crates/ra_ide/src/goto_type_definition.rs | 151 | ||||
-rw-r--r-- | crates/ra_ide/src/hover.rs | 2387 | ||||
-rw-r--r-- | crates/ra_ide/src/inlay_hints.rs | 922 | ||||
-rw-r--r-- | crates/ra_ide/src/join_lines.rs | 750 | ||||
-rw-r--r-- | crates/ra_ide/src/lib.rs | 534 | ||||
-rw-r--r-- | crates/ra_ide/src/matching_brace.rs | 73 | ||||
-rw-r--r-- | crates/ra_ide/src/mock_analysis.rs | 176 | ||||
-rw-r--r-- | crates/ra_ide/src/parent_module.rs | 155 | ||||
-rw-r--r-- | crates/ra_ide/src/references.rs | 695 | ||||
-rw-r--r-- | crates/ra_ide/src/references/rename.rs | 1010 | ||||
-rw-r--r-- | crates/ra_ide/src/runnables.rs | 883 | ||||
-rw-r--r-- | crates/ra_ide/src/ssr.rs | 72 | ||||
-rw-r--r-- | crates/ra_ide/src/status.rs | 145 | ||||
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting.rs | 776 | ||||
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting/html.rs | 97 | ||||
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting/injection.rs | 188 | ||||
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting/tests.rs | 390 | ||||
-rw-r--r-- | crates/ra_ide/src/syntax_tree.rs | 359 | ||||
-rw-r--r-- | crates/ra_ide/src/typing.rs | 365 | ||||
-rw-r--r-- | crates/ra_ide/src/typing/on_enter.rs | 256 | ||||
-rw-r--r-- | crates/ra_ide/test_data/highlight_unsafe.html | 61 | ||||
-rw-r--r-- | crates/ra_ide_db/Cargo.toml | 32 | ||||
-rw-r--r-- | crates/ra_ide_db/src/change.rs | 318 | ||||
-rw-r--r-- | crates/ra_ide_db/src/defs.rs | 333 | ||||
-rw-r--r-- | crates/ra_ide_db/src/imports_locator.rs | 65 | ||||
-rw-r--r-- | crates/ra_ide_db/src/lib.rs | 139 | ||||
-rw-r--r-- | crates/ra_ide_db/src/line_index.rs | 281 | ||||
-rw-r--r-- | crates/ra_ide_db/src/search.rs | 323 | ||||
-rw-r--r-- | crates/ra_ide_db/src/source_change.rs | 59 | ||||
-rw-r--r-- | crates/ra_ide_db/src/symbol_index.rs | 430 | ||||
-rw-r--r-- | crates/ra_mbe/Cargo.toml | 20 | ||||
-rw-r--r-- | crates/ra_mbe/src/lib.rs | 278 | ||||
-rw-r--r-- | crates/ra_mbe/src/mbe_expander.rs | 180 | ||||
-rw-r--r-- | crates/ra_mbe/src/mbe_expander/matcher.rs | 477 | ||||
-rw-r--r-- | crates/ra_mbe/src/mbe_expander/transcriber.rs | 254 | ||||
-rw-r--r-- | crates/ra_mbe/src/parser.rs | 184 | ||||
-rw-r--r-- | crates/ra_mbe/src/subtree_source.rs | 197 | ||||
-rw-r--r-- | crates/ra_mbe/src/syntax_bridge.rs | 832 | ||||
-rw-r--r-- | crates/ra_mbe/src/tests.rs | 1897 | ||||
-rw-r--r-- | crates/ra_parser/Cargo.toml | 13 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar.rs | 293 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/attributes.rs | 48 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/expressions.rs | 652 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/expressions/atom.rs | 611 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/items.rs | 492 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/items/adt.rs | 178 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/items/consts.rs | 33 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/items/traits.rs | 153 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/items/use_item.rs | 132 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/params.rs | 188 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/paths.rs | 115 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/patterns.rs | 379 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/type_args.rs | 63 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/type_params.rs | 209 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/types.rs | 324 | ||||
-rw-r--r-- | crates/ra_parser/src/lib.rs | 149 | ||||
-rw-r--r-- | crates/ra_parser/src/parser.rs | 350 | ||||
-rw-r--r-- | crates/ra_proc_macro/Cargo.toml | 18 | ||||
-rw-r--r-- | crates/ra_proc_macro/src/lib.rs | 112 | ||||
-rw-r--r-- | crates/ra_proc_macro/src/msg.rs | 88 | ||||
-rw-r--r-- | crates/ra_proc_macro/src/process.rs | 203 | ||||
-rw-r--r-- | crates/ra_proc_macro/src/rpc.rs | 266 | ||||
-rw-r--r-- | crates/ra_proc_macro_srv/Cargo.toml | 26 | ||||
-rw-r--r-- | crates/ra_proc_macro_srv/src/cli.rs | 39 | ||||
-rw-r--r-- | crates/ra_proc_macro_srv/src/dylib.rs | 224 | ||||
-rw-r--r-- | crates/ra_proc_macro_srv/src/lib.rs | 69 | ||||
-rw-r--r-- | crates/ra_proc_macro_srv/src/rustc_server.rs | 704 | ||||
-rw-r--r-- | crates/ra_proc_macro_srv/src/tests/mod.rs | 45 | ||||
-rw-r--r-- | crates/ra_proc_macro_srv/src/tests/utils.rs | 64 | ||||
-rw-r--r-- | crates/ra_prof/Cargo.toml | 27 | ||||
-rw-r--r-- | crates/ra_prof/src/hprof.rs | 243 | ||||
-rw-r--r-- | crates/ra_prof/src/lib.rs | 109 | ||||
-rw-r--r-- | crates/ra_prof/src/memory_usage.rs | 75 | ||||
-rw-r--r-- | crates/ra_prof/src/tree.rs | 84 | ||||
-rw-r--r-- | crates/ra_project_model/Cargo.toml | 28 | ||||
-rw-r--r-- | crates/ra_project_model/src/cargo_workspace.rs | 362 | ||||
-rw-r--r-- | crates/ra_project_model/src/cfg_flag.rs | 51 | ||||
-rw-r--r-- | crates/ra_project_model/src/lib.rs | 544 | ||||
-rw-r--r-- | crates/ra_project_model/src/project_json.rs | 143 | ||||
-rw-r--r-- | crates/ra_project_model/src/sysroot.rs | 173 | ||||
-rw-r--r-- | crates/ra_ssr/Cargo.toml | 23 | ||||
-rw-r--r-- | crates/ra_ssr/src/lib.rs | 286 | ||||
-rw-r--r-- | crates/ra_ssr/src/matching.rs | 732 | ||||
-rw-r--r-- | crates/ra_ssr/src/nester.rs | 98 | ||||
-rw-r--r-- | crates/ra_ssr/src/parsing.rs | 389 | ||||
-rw-r--r-- | crates/ra_ssr/src/replacing.rs | 194 | ||||
-rw-r--r-- | crates/ra_ssr/src/resolving.rs | 251 | ||||
-rw-r--r-- | crates/ra_ssr/src/search.rs | 282 | ||||
-rw-r--r-- | crates/ra_ssr/src/tests.rs | 1081 | ||||
-rw-r--r-- | crates/ra_syntax/Cargo.toml | 36 | ||||
-rw-r--r-- | crates/ra_syntax/fuzz/Cargo.toml | 27 | ||||
-rw-r--r-- | crates/ra_syntax/fuzz/fuzz_targets/parser.rs | 11 | ||||
-rw-r--r-- | crates/ra_syntax/fuzz/fuzz_targets/reparse.rs | 11 | ||||
-rw-r--r-- | crates/ra_syntax/src/algo.rs | 406 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/edit.rs | 642 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/make.rs | 392 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/node_ext.rs | 485 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/traits.rs | 142 | ||||
-rw-r--r-- | crates/ra_syntax/src/fuzz.rs | 73 | ||||
-rw-r--r-- | crates/ra_syntax/src/lib.rs | 388 | ||||
-rw-r--r-- | crates/ra_syntax/src/parsing.rs | 59 | ||||
-rw-r--r-- | crates/ra_syntax/src/parsing/reparsing.rs | 455 | ||||
-rw-r--r-- | crates/ra_syntax/src/parsing/text_token_source.rs | 84 | ||||
-rw-r--r-- | crates/ra_syntax/src/parsing/text_tree_sink.rs | 183 | ||||
-rw-r--r-- | crates/ra_syntax/src/syntax_node.rs | 77 | ||||
-rw-r--r-- | crates/ra_syntax/src/tests.rs | 280 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0043_default_const.rast | 40 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0043_default_const.rs | 3 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/fuzz-failures/0001.rs | 106 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast | 58 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rs | 4 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rast | 15 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast | 71 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rs | 6 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rast | 13 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast | 21 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rast | 18 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast | 16 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rast | 16 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast | 17 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rast | 13 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rast | 15 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rast | 16 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast | 18 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast | 16 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast | 16 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast | 35 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast | 55 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rs | 4 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rast | 40 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rs | 3 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rast | 18 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast | 56 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rs | 8 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0066_default_const.rast | 44 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0066_default_const.rs | 3 | ||||
-rw-r--r-- | crates/ra_text_edit/Cargo.toml | 13 | ||||
-rw-r--r-- | crates/ra_text_edit/src/lib.rs | 170 | ||||
-rw-r--r-- | crates/ra_toolchain/Cargo.toml | 12 | ||||
-rw-r--r-- | crates/ra_toolchain/src/lib.rs | 68 | ||||
-rw-r--r-- | crates/ra_tt/Cargo.toml | 15 | ||||
-rw-r--r-- | crates/ra_tt/src/lib.rs | 246 | ||||
-rw-r--r-- | crates/rust-analyzer/Cargo.toml | 41 | ||||
-rw-r--r-- | crates/rust-analyzer/src/bin/args.rs | 2 | ||||
-rw-r--r-- | crates/rust-analyzer/src/bin/main.rs | 6 | ||||
-rw-r--r-- | crates/rust-analyzer/src/cargo_target_spec.rs | 10 | ||||
-rw-r--r-- | crates/rust-analyzer/src/cli.rs | 19 | ||||
-rw-r--r-- | crates/rust-analyzer/src/cli/analysis_bench.rs | 6 | ||||
-rw-r--r-- | crates/rust-analyzer/src/cli/analysis_stats.rs | 14 | ||||
-rw-r--r-- | crates/rust-analyzer/src/cli/diagnostics.rs | 6 | ||||
-rw-r--r-- | crates/rust-analyzer/src/cli/load_cargo.rs | 6 | ||||
-rw-r--r-- | crates/rust-analyzer/src/cli/ssr.rs | 8 | ||||
-rw-r--r-- | crates/rust-analyzer/src/config.rs | 4 | ||||
-rw-r--r-- | crates/rust-analyzer/src/diagnostics.rs | 2 | ||||
-rw-r--r-- | crates/rust-analyzer/src/diagnostics/to_proto.rs | 12 | ||||
-rw-r--r-- | crates/rust-analyzer/src/from_proto.rs | 6 | ||||
-rw-r--r-- | crates/rust-analyzer/src/global_state.rs | 11 | ||||
-rw-r--r-- | crates/rust-analyzer/src/handlers.rs | 110 | ||||
-rw-r--r-- | crates/rust-analyzer/src/lib.rs | 14 | ||||
-rw-r--r-- | crates/rust-analyzer/src/lsp_ext.rs | 7 | ||||
-rw-r--r-- | crates/rust-analyzer/src/lsp_utils.rs | 4 | ||||
-rw-r--r-- | crates/rust-analyzer/src/main_loop.rs | 38 | ||||
-rw-r--r-- | crates/rust-analyzer/src/reload.rs | 24 | ||||
-rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 17 | ||||
-rw-r--r-- | crates/rust-analyzer/test_data/macro_compiler_error.txt | 4 | ||||
-rw-r--r-- | crates/rust-analyzer/tests/heavy_tests/main.rs | 684 | ||||
-rw-r--r-- | crates/rust-analyzer/tests/heavy_tests/support.rs | 262 | ||||
-rw-r--r-- | crates/rust-analyzer/tests/rust-analyzer/main.rs | 694 | ||||
-rw-r--r-- | crates/rust-analyzer/tests/rust-analyzer/support.rs | 262 | ||||
-rw-r--r-- | crates/rust-analyzer/tests/rust-analyzer/testdir.rs (renamed from crates/rust-analyzer/tests/heavy_tests/testdir.rs) | 0 | ||||
-rw-r--r-- | crates/ssr/Cargo.toml | 25 | ||||
-rw-r--r-- | crates/ssr/src/errors.rs (renamed from crates/ra_ssr/src/errors.rs) | 0 | ||||
-rw-r--r-- | crates/ssr/src/lib.rs | 341 | ||||
-rw-r--r-- | crates/ssr/src/matching.rs | 814 | ||||
-rw-r--r-- | crates/ssr/src/nester.rs | 94 | ||||
-rw-r--r-- | crates/ssr/src/parsing.rs | 403 | ||||
-rw-r--r-- | crates/ssr/src/replacing.rs | 240 | ||||
-rw-r--r-- | crates/ssr/src/resolving.rs | 301 | ||||
-rw-r--r-- | crates/ssr/src/search.rs | 282 | ||||
-rw-r--r-- | crates/ssr/src/tests.rs | 1281 | ||||
-rw-r--r-- | crates/stdx/Cargo.toml | 4 | ||||
-rw-r--r-- | crates/stdx/src/lib.rs | 67 | ||||
-rw-r--r-- | crates/syntax/Cargo.toml | 35 | ||||
-rw-r--r-- | crates/syntax/fuzz/.gitignore (renamed from crates/ra_syntax/fuzz/.gitignore) | 0 | ||||
-rw-r--r-- | crates/syntax/fuzz/Cargo.toml | 27 | ||||
-rw-r--r-- | crates/syntax/fuzz/fuzz_targets/parser.rs | 11 | ||||
-rw-r--r-- | crates/syntax/fuzz/fuzz_targets/reparse.rs | 11 | ||||
-rw-r--r-- | crates/syntax/src/algo.rs | 406 | ||||
-rw-r--r-- | crates/syntax/src/ast.rs (renamed from crates/ra_syntax/src/ast.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/src/ast/edit.rs | 673 | ||||
-rw-r--r-- | crates/syntax/src/ast/expr_ext.rs (renamed from crates/ra_syntax/src/ast/expr_ext.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/src/ast/generated.rs (renamed from crates/ra_syntax/src/ast/generated.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/src/ast/generated/nodes.rs (renamed from crates/ra_syntax/src/ast/generated/nodes.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/src/ast/generated/tokens.rs (renamed from crates/ra_syntax/src/ast/generated/tokens.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/src/ast/make.rs | 402 | ||||
-rw-r--r-- | crates/syntax/src/ast/node_ext.rs | 485 | ||||
-rw-r--r-- | crates/syntax/src/ast/token_ext.rs (renamed from crates/ra_syntax/src/ast/token_ext.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/src/ast/traits.rs | 141 | ||||
-rw-r--r-- | crates/syntax/src/fuzz.rs | 73 | ||||
-rw-r--r-- | crates/syntax/src/lib.rs | 388 | ||||
-rw-r--r-- | crates/syntax/src/parsing.rs | 59 | ||||
-rw-r--r-- | crates/syntax/src/parsing/lexer.rs (renamed from crates/ra_syntax/src/parsing/lexer.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/src/parsing/reparsing.rs | 455 | ||||
-rw-r--r-- | crates/syntax/src/parsing/text_token_source.rs | 84 | ||||
-rw-r--r-- | crates/syntax/src/parsing/text_tree_sink.rs | 183 | ||||
-rw-r--r-- | crates/syntax/src/ptr.rs (renamed from crates/ra_syntax/src/ptr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/src/syntax_error.rs (renamed from crates/ra_syntax/src/syntax_error.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/src/syntax_node.rs | 77 | ||||
-rw-r--r-- | crates/syntax/src/tests.rs | 280 | ||||
-rw-r--r-- | crates/syntax/src/validation.rs (renamed from crates/ra_syntax/src/validation.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/src/validation/block.rs (renamed from crates/ra_syntax/src/validation/block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/accidentally_quadratic (renamed from crates/ra_syntax/test_data/accidentally_quadratic) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0001_unclosed_char_at_eof.rs (renamed from crates/ra_syntax/test_data/lexer/err/0001_unclosed_char_at_eof.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0001_unclosed_char_at_eof.txt (renamed from crates/ra_syntax/test_data/lexer/err/0001_unclosed_char_at_eof.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.rs (renamed from crates/ra_syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.txt (renamed from crates/ra_syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.rs (renamed from crates/ra_syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.txt (renamed from crates/ra_syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.rs (renamed from crates/ra_syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.txt (renamed from crates/ra_syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0005_unclosed_char_with_space.rs (renamed from crates/ra_syntax/test_data/lexer/err/0005_unclosed_char_with_space.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0005_unclosed_char_with_space.txt (renamed from crates/ra_syntax/test_data/lexer/err/0005_unclosed_char_with_space.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0006_unclosed_char_with_slash.rs (renamed from crates/ra_syntax/test_data/lexer/err/0006_unclosed_char_with_slash.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0006_unclosed_char_with_slash.txt (renamed from crates/ra_syntax/test_data/lexer/err/0006_unclosed_char_with_slash.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.rs (renamed from crates/ra_syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.txt (renamed from crates/ra_syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.rs (renamed from crates/ra_syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.txt (renamed from crates/ra_syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.rs (renamed from crates/ra_syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.txt (renamed from crates/ra_syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.rs (renamed from crates/ra_syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.txt (renamed from crates/ra_syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.rs (renamed from crates/ra_syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.txt (renamed from crates/ra_syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.rs (renamed from crates/ra_syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.txt (renamed from crates/ra_syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0013_unclosed_byte_with_space.rs (renamed from crates/ra_syntax/test_data/lexer/err/0013_unclosed_byte_with_space.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0013_unclosed_byte_with_space.txt (renamed from crates/ra_syntax/test_data/lexer/err/0013_unclosed_byte_with_space.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.rs (renamed from crates/ra_syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.txt (renamed from crates/ra_syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.rs (renamed from crates/ra_syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.txt (renamed from crates/ra_syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.rs (renamed from crates/ra_syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.txt (renamed from crates/ra_syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0017_unclosed_string_at_eof.rs (renamed from crates/ra_syntax/test_data/lexer/err/0017_unclosed_string_at_eof.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0017_unclosed_string_at_eof.txt (renamed from crates/ra_syntax/test_data/lexer/err/0017_unclosed_string_at_eof.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0018_unclosed_string_with_ferris.rs (renamed from crates/ra_syntax/test_data/lexer/err/0018_unclosed_string_with_ferris.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0018_unclosed_string_with_ferris.txt (renamed from crates/ra_syntax/test_data/lexer/err/0018_unclosed_string_with_ferris.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0019_unclosed_string_with_ascii_escape.rs (renamed from crates/ra_syntax/test_data/lexer/err/0019_unclosed_string_with_ascii_escape.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0019_unclosed_string_with_ascii_escape.txt (renamed from crates/ra_syntax/test_data/lexer/err/0019_unclosed_string_with_ascii_escape.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0020_unclosed_string_with_unicode_escape.rs (renamed from crates/ra_syntax/test_data/lexer/err/0020_unclosed_string_with_unicode_escape.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0020_unclosed_string_with_unicode_escape.txt (renamed from crates/ra_syntax/test_data/lexer/err/0020_unclosed_string_with_unicode_escape.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0021_unclosed_string_with_space.rs (renamed from crates/ra_syntax/test_data/lexer/err/0021_unclosed_string_with_space.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0021_unclosed_string_with_space.txt (renamed from crates/ra_syntax/test_data/lexer/err/0021_unclosed_string_with_space.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0022_unclosed_string_with_slash.rs (renamed from crates/ra_syntax/test_data/lexer/err/0022_unclosed_string_with_slash.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0022_unclosed_string_with_slash.txt (renamed from crates/ra_syntax/test_data/lexer/err/0022_unclosed_string_with_slash.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0023_unclosed_string_with_slash_n.rs (renamed from crates/ra_syntax/test_data/lexer/err/0023_unclosed_string_with_slash_n.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0023_unclosed_string_with_slash_n.txt (renamed from crates/ra_syntax/test_data/lexer/err/0023_unclosed_string_with_slash_n.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0024_unclosed_string_with_slash_double_quote.rs (renamed from crates/ra_syntax/test_data/lexer/err/0024_unclosed_string_with_slash_double_quote.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0024_unclosed_string_with_slash_double_quote.txt (renamed from crates/ra_syntax/test_data/lexer/err/0024_unclosed_string_with_slash_double_quote.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0025_unclosed_byte_string_at_eof.rs (renamed from crates/ra_syntax/test_data/lexer/err/0025_unclosed_byte_string_at_eof.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0025_unclosed_byte_string_at_eof.txt (renamed from crates/ra_syntax/test_data/lexer/err/0025_unclosed_byte_string_at_eof.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0026_unclosed_byte_string_with_ferris.rs (renamed from crates/ra_syntax/test_data/lexer/err/0026_unclosed_byte_string_with_ferris.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0026_unclosed_byte_string_with_ferris.txt (renamed from crates/ra_syntax/test_data/lexer/err/0026_unclosed_byte_string_with_ferris.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0027_unclosed_byte_string_with_ascii_escape.rs (renamed from crates/ra_syntax/test_data/lexer/err/0027_unclosed_byte_string_with_ascii_escape.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0027_unclosed_byte_string_with_ascii_escape.txt (renamed from crates/ra_syntax/test_data/lexer/err/0027_unclosed_byte_string_with_ascii_escape.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0028_unclosed_byte_string_with_unicode_escape.rs (renamed from crates/ra_syntax/test_data/lexer/err/0028_unclosed_byte_string_with_unicode_escape.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0028_unclosed_byte_string_with_unicode_escape.txt (renamed from crates/ra_syntax/test_data/lexer/err/0028_unclosed_byte_string_with_unicode_escape.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0029_unclosed_byte_string_with_space.rs (renamed from crates/ra_syntax/test_data/lexer/err/0029_unclosed_byte_string_with_space.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0029_unclosed_byte_string_with_space.txt (renamed from crates/ra_syntax/test_data/lexer/err/0029_unclosed_byte_string_with_space.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0030_unclosed_byte_string_with_slash.rs (renamed from crates/ra_syntax/test_data/lexer/err/0030_unclosed_byte_string_with_slash.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0030_unclosed_byte_string_with_slash.txt (renamed from crates/ra_syntax/test_data/lexer/err/0030_unclosed_byte_string_with_slash.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0031_unclosed_byte_string_with_slash_n.rs (renamed from crates/ra_syntax/test_data/lexer/err/0031_unclosed_byte_string_with_slash_n.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0031_unclosed_byte_string_with_slash_n.txt (renamed from crates/ra_syntax/test_data/lexer/err/0031_unclosed_byte_string_with_slash_n.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0032_unclosed_byte_string_with_slash_double_quote.rs (renamed from crates/ra_syntax/test_data/lexer/err/0032_unclosed_byte_string_with_slash_double_quote.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0032_unclosed_byte_string_with_slash_double_quote.txt (renamed from crates/ra_syntax/test_data/lexer/err/0032_unclosed_byte_string_with_slash_double_quote.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0033_unclosed_raw_string_at_eof.rs (renamed from crates/ra_syntax/test_data/lexer/err/0033_unclosed_raw_string_at_eof.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0033_unclosed_raw_string_at_eof.txt (renamed from crates/ra_syntax/test_data/lexer/err/0033_unclosed_raw_string_at_eof.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0034_unclosed_raw_string_with_ferris.rs (renamed from crates/ra_syntax/test_data/lexer/err/0034_unclosed_raw_string_with_ferris.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0034_unclosed_raw_string_with_ferris.txt (renamed from crates/ra_syntax/test_data/lexer/err/0034_unclosed_raw_string_with_ferris.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0035_unclosed_raw_string_with_ascii_escape.rs (renamed from crates/ra_syntax/test_data/lexer/err/0035_unclosed_raw_string_with_ascii_escape.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0035_unclosed_raw_string_with_ascii_escape.txt (renamed from crates/ra_syntax/test_data/lexer/err/0035_unclosed_raw_string_with_ascii_escape.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0036_unclosed_raw_string_with_unicode_escape.rs (renamed from crates/ra_syntax/test_data/lexer/err/0036_unclosed_raw_string_with_unicode_escape.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0036_unclosed_raw_string_with_unicode_escape.txt (renamed from crates/ra_syntax/test_data/lexer/err/0036_unclosed_raw_string_with_unicode_escape.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0037_unclosed_raw_string_with_space.rs (renamed from crates/ra_syntax/test_data/lexer/err/0037_unclosed_raw_string_with_space.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0037_unclosed_raw_string_with_space.txt (renamed from crates/ra_syntax/test_data/lexer/err/0037_unclosed_raw_string_with_space.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0038_unclosed_raw_string_with_slash.rs (renamed from crates/ra_syntax/test_data/lexer/err/0038_unclosed_raw_string_with_slash.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0038_unclosed_raw_string_with_slash.txt (renamed from crates/ra_syntax/test_data/lexer/err/0038_unclosed_raw_string_with_slash.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0039_unclosed_raw_string_with_slash_n.rs (renamed from crates/ra_syntax/test_data/lexer/err/0039_unclosed_raw_string_with_slash_n.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0039_unclosed_raw_string_with_slash_n.txt (renamed from crates/ra_syntax/test_data/lexer/err/0039_unclosed_raw_string_with_slash_n.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0040_unclosed_raw_byte_string_at_eof.rs (renamed from crates/ra_syntax/test_data/lexer/err/0040_unclosed_raw_byte_string_at_eof.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0040_unclosed_raw_byte_string_at_eof.txt (renamed from crates/ra_syntax/test_data/lexer/err/0040_unclosed_raw_byte_string_at_eof.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0041_unclosed_raw_byte_string_with_ferris.rs (renamed from crates/ra_syntax/test_data/lexer/err/0041_unclosed_raw_byte_string_with_ferris.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0041_unclosed_raw_byte_string_with_ferris.txt (renamed from crates/ra_syntax/test_data/lexer/err/0041_unclosed_raw_byte_string_with_ferris.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0042_unclosed_raw_byte_string_with_ascii_escape.rs (renamed from crates/ra_syntax/test_data/lexer/err/0042_unclosed_raw_byte_string_with_ascii_escape.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0042_unclosed_raw_byte_string_with_ascii_escape.txt (renamed from crates/ra_syntax/test_data/lexer/err/0042_unclosed_raw_byte_string_with_ascii_escape.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0043_unclosed_raw_byte_string_with_unicode_escape.rs (renamed from crates/ra_syntax/test_data/lexer/err/0043_unclosed_raw_byte_string_with_unicode_escape.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0043_unclosed_raw_byte_string_with_unicode_escape.txt (renamed from crates/ra_syntax/test_data/lexer/err/0043_unclosed_raw_byte_string_with_unicode_escape.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0044_unclosed_raw_byte_string_with_space.rs (renamed from crates/ra_syntax/test_data/lexer/err/0044_unclosed_raw_byte_string_with_space.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0044_unclosed_raw_byte_string_with_space.txt (renamed from crates/ra_syntax/test_data/lexer/err/0044_unclosed_raw_byte_string_with_space.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0045_unclosed_raw_byte_string_with_slash.rs (renamed from crates/ra_syntax/test_data/lexer/err/0045_unclosed_raw_byte_string_with_slash.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0045_unclosed_raw_byte_string_with_slash.txt (renamed from crates/ra_syntax/test_data/lexer/err/0045_unclosed_raw_byte_string_with_slash.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0046_unclosed_raw_byte_string_with_slash_n.rs (renamed from crates/ra_syntax/test_data/lexer/err/0046_unclosed_raw_byte_string_with_slash_n.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0046_unclosed_raw_byte_string_with_slash_n.txt (renamed from crates/ra_syntax/test_data/lexer/err/0046_unclosed_raw_byte_string_with_slash_n.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0047_unstarted_raw_string_at_eof.rs (renamed from crates/ra_syntax/test_data/lexer/err/0047_unstarted_raw_string_at_eof.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0047_unstarted_raw_string_at_eof.txt (renamed from crates/ra_syntax/test_data/lexer/err/0047_unstarted_raw_string_at_eof.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0048_unstarted_raw_byte_string_at_eof.rs (renamed from crates/ra_syntax/test_data/lexer/err/0048_unstarted_raw_byte_string_at_eof.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0048_unstarted_raw_byte_string_at_eof.txt (renamed from crates/ra_syntax/test_data/lexer/err/0048_unstarted_raw_byte_string_at_eof.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0049_unstarted_raw_string_with_ascii.rs (renamed from crates/ra_syntax/test_data/lexer/err/0049_unstarted_raw_string_with_ascii.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0049_unstarted_raw_string_with_ascii.txt (renamed from crates/ra_syntax/test_data/lexer/err/0049_unstarted_raw_string_with_ascii.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0050_unstarted_raw_byte_string_with_ascii.rs (renamed from crates/ra_syntax/test_data/lexer/err/0050_unstarted_raw_byte_string_with_ascii.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0050_unstarted_raw_byte_string_with_ascii.txt (renamed from crates/ra_syntax/test_data/lexer/err/0050_unstarted_raw_byte_string_with_ascii.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0051_unclosed_block_comment_at_eof.rs (renamed from crates/ra_syntax/test_data/lexer/err/0051_unclosed_block_comment_at_eof.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0051_unclosed_block_comment_at_eof.txt (renamed from crates/ra_syntax/test_data/lexer/err/0051_unclosed_block_comment_at_eof.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0052_unclosed_block_comment_with_content.rs (renamed from crates/ra_syntax/test_data/lexer/err/0052_unclosed_block_comment_with_content.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0052_unclosed_block_comment_with_content.txt (renamed from crates/ra_syntax/test_data/lexer/err/0052_unclosed_block_comment_with_content.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0053_unclosed_nested_block_comment_entirely.rs (renamed from crates/ra_syntax/test_data/lexer/err/0053_unclosed_nested_block_comment_entirely.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0053_unclosed_nested_block_comment_entirely.txt (renamed from crates/ra_syntax/test_data/lexer/err/0053_unclosed_nested_block_comment_entirely.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0054_unclosed_nested_block_comment_partially.rs (renamed from crates/ra_syntax/test_data/lexer/err/0054_unclosed_nested_block_comment_partially.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0054_unclosed_nested_block_comment_partially.txt (renamed from crates/ra_syntax/test_data/lexer/err/0054_unclosed_nested_block_comment_partially.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0055_empty_int.rs (renamed from crates/ra_syntax/test_data/lexer/err/0055_empty_int.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0055_empty_int.txt (renamed from crates/ra_syntax/test_data/lexer/err/0055_empty_int.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0056_empty_exponent.rs (renamed from crates/ra_syntax/test_data/lexer/err/0056_empty_exponent.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0056_empty_exponent.txt (renamed from crates/ra_syntax/test_data/lexer/err/0056_empty_exponent.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.rs (renamed from crates/ra_syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.txt (renamed from crates/ra_syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0001_hello.rs (renamed from crates/ra_syntax/test_data/lexer/ok/0001_hello.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0001_hello.txt (renamed from crates/ra_syntax/test_data/lexer/ok/0001_hello.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0002_whitespace.rs (renamed from crates/ra_syntax/test_data/lexer/ok/0002_whitespace.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0002_whitespace.txt (renamed from crates/ra_syntax/test_data/lexer/ok/0002_whitespace.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0003_ident.rs (renamed from crates/ra_syntax/test_data/lexer/ok/0003_ident.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0003_ident.txt (renamed from crates/ra_syntax/test_data/lexer/ok/0003_ident.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0004_numbers.rs (renamed from crates/ra_syntax/test_data/lexer/ok/0004_numbers.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0004_numbers.txt (renamed from crates/ra_syntax/test_data/lexer/ok/0004_numbers.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0005_symbols.rs (renamed from crates/ra_syntax/test_data/lexer/ok/0005_symbols.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0005_symbols.txt (renamed from crates/ra_syntax/test_data/lexer/ok/0005_symbols.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0006_chars.rs (renamed from crates/ra_syntax/test_data/lexer/ok/0006_chars.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0006_chars.txt (renamed from crates/ra_syntax/test_data/lexer/ok/0006_chars.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0007_lifetimes.rs (renamed from crates/ra_syntax/test_data/lexer/ok/0007_lifetimes.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0007_lifetimes.txt (renamed from crates/ra_syntax/test_data/lexer/ok/0007_lifetimes.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0008_byte_strings.rs (renamed from crates/ra_syntax/test_data/lexer/ok/0008_byte_strings.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0008_byte_strings.txt (renamed from crates/ra_syntax/test_data/lexer/ok/0008_byte_strings.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0009_strings.rs (renamed from crates/ra_syntax/test_data/lexer/ok/0009_strings.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0009_strings.txt (renamed from crates/ra_syntax/test_data/lexer/ok/0009_strings.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0010_single_line_comments.rs (renamed from crates/ra_syntax/test_data/lexer/ok/0010_single_line_comments.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0010_single_line_comments.txt (renamed from crates/ra_syntax/test_data/lexer/ok/0010_single_line_comments.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0011_keywords.rs (renamed from crates/ra_syntax/test_data/lexer/ok/0011_keywords.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0011_keywords.txt (renamed from crates/ra_syntax/test_data/lexer/ok/0011_keywords.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0012_block_comment.rs (renamed from crates/ra_syntax/test_data/lexer/ok/0012_block_comment.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0012_block_comment.txt (renamed from crates/ra_syntax/test_data/lexer/ok/0012_block_comment.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0013_raw_strings.rs (renamed from crates/ra_syntax/test_data/lexer/ok/0013_raw_strings.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0013_raw_strings.txt (renamed from crates/ra_syntax/test_data/lexer/ok/0013_raw_strings.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0014_raw_ident.rs (renamed from crates/ra_syntax/test_data/lexer/ok/0014_raw_ident.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/lexer/ok/0014_raw_ident.txt (renamed from crates/ra_syntax/test_data/lexer/ok/0014_raw_ident.txt) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0000_struct_field_missing_comma.rast (renamed from crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0000_struct_field_missing_comma.rs (renamed from crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0001_item_recovery_in_file.rast (renamed from crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0001_item_recovery_in_file.rs (renamed from crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0002_duplicate_shebang.rast (renamed from crates/ra_syntax/test_data/parser/err/0002_duplicate_shebang.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0002_duplicate_shebang.rs (renamed from crates/ra_syntax/test_data/parser/err/0002_duplicate_shebang.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0003_C++_semicolon.rast (renamed from crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0003_C++_semicolon.rs (renamed from crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0004_use_path_bad_segment.rast (renamed from crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0004_use_path_bad_segment.rs (renamed from crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0005_attribute_recover.rast (renamed from crates/ra_syntax/test_data/parser/err/0005_attribute_recover.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0005_attribute_recover.rs (renamed from crates/ra_syntax/test_data/parser/err/0005_attribute_recover.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0006_named_field_recovery.rast (renamed from crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0006_named_field_recovery.rs (renamed from crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0007_stray_curly_in_file.rast (renamed from crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0007_stray_curly_in_file.rs (renamed from crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0008_item_block_recovery.rast (renamed from crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0008_item_block_recovery.rs (renamed from crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0009_broken_struct_type_parameter.rast (renamed from crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0009_broken_struct_type_parameter.rs (renamed from crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0010_unsafe_lambda_block.rast (renamed from crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0010_unsafe_lambda_block.rs (renamed from crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0011_extern_struct.rast (renamed from crates/ra_syntax/test_data/parser/err/0011_extern_struct.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0011_extern_struct.rs (renamed from crates/ra_syntax/test_data/parser/err/0011_extern_struct.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0012_broken_lambda.rast (renamed from crates/ra_syntax/test_data/parser/err/0012_broken_lambda.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0013_invalid_type.rast (renamed from crates/ra_syntax/test_data/parser/err/0013_invalid_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0013_invalid_type.rs (renamed from crates/ra_syntax/test_data/parser/err/0013_invalid_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0014_where_no_bounds.rast (renamed from crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0014_where_no_bounds.rs (renamed from crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0015_curly_in_params.rast (renamed from crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0015_curly_in_params.rs (renamed from crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0016_missing_semi.rast (renamed from crates/ra_syntax/test_data/parser/err/0016_missing_semi.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0016_missing_semi.rs (renamed from crates/ra_syntax/test_data/parser/err/0016_missing_semi.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0017_incomplete_binexpr.rast (renamed from crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0017_incomplete_binexpr.rs (renamed from crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0018_incomplete_fn.rast (renamed from crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0018_incomplete_fn.rs (renamed from crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0019_let_recover.rast (renamed from crates/ra_syntax/test_data/parser/err/0019_let_recover.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0019_let_recover.rs (renamed from crates/ra_syntax/test_data/parser/err/0019_let_recover.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0020_fn_recover.rast (renamed from crates/ra_syntax/test_data/parser/err/0020_fn_recover.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0020_fn_recover.rs (renamed from crates/ra_syntax/test_data/parser/err/0020_fn_recover.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0021_incomplete_param.rast (renamed from crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0021_incomplete_param.rs (renamed from crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0022_bad_exprs.rast (renamed from crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0022_bad_exprs.rs (renamed from crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0023_mismatched_paren.rast (renamed from crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0023_mismatched_paren.rs (renamed from crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0024_many_type_parens.rast (renamed from crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0024_many_type_parens.rs (renamed from crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0025_nope.rast (renamed from crates/ra_syntax/test_data/parser/err/0025_nope.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0025_nope.rs (renamed from crates/ra_syntax/test_data/parser/err/0025_nope.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0026_imp_recovery.rast (renamed from crates/ra_syntax/test_data/parser/err/0026_imp_recovery.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0026_imp_recovery.rs (renamed from crates/ra_syntax/test_data/parser/err/0026_imp_recovery.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0027_incomplere_where_for.rast (renamed from crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0027_incomplere_where_for.rs (renamed from crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0029_field_completion.rast (renamed from crates/ra_syntax/test_data/parser/err/0029_field_completion.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0029_field_completion.rs (renamed from crates/ra_syntax/test_data/parser/err/0029_field_completion.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0031_block_inner_attrs.rast (renamed from crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0031_block_inner_attrs.rs (renamed from crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0032_match_arms_inner_attrs.rast (renamed from crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0032_match_arms_inner_attrs.rs (renamed from crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0033_match_arms_outer_attrs.rast (renamed from crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0033_match_arms_outer_attrs.rs (renamed from crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0034_bad_box_pattern.rast (renamed from crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0034_bad_box_pattern.rs (renamed from crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0035_use_recover.rast (renamed from crates/ra_syntax/test_data/parser/err/0035_use_recover.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0035_use_recover.rs (renamed from crates/ra_syntax/test_data/parser/err/0035_use_recover.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0036_partial_use.rast (renamed from crates/ra_syntax/test_data/parser/err/0036_partial_use.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0036_partial_use.rs (renamed from crates/ra_syntax/test_data/parser/err/0036_partial_use.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0037_visibility_in_traits.rast (renamed from crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0037_visibility_in_traits.rs (renamed from crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0038_endless_inclusive_range.rast (renamed from crates/ra_syntax/test_data/parser/err/0038_endless_inclusive_range.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0038_endless_inclusive_range.rs (renamed from crates/ra_syntax/test_data/parser/err/0038_endless_inclusive_range.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0039_lambda_recovery.rast (renamed from crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0039_lambda_recovery.rs (renamed from crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0040_illegal_crate_kw_location.rast (renamed from crates/ra_syntax/test_data/parser/err/0040_illegal_crate_kw_location.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0040_illegal_crate_kw_location.rs (renamed from crates/ra_syntax/test_data/parser/err/0040_illegal_crate_kw_location.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0041_illegal_super_keyword_location.rast (renamed from crates/ra_syntax/test_data/parser/err/0041_illegal_super_keyword_location.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0041_illegal_super_keyword_location.rs (renamed from crates/ra_syntax/test_data/parser/err/0041_illegal_super_keyword_location.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0042_illegal_self_keyword_location.rast (renamed from crates/ra_syntax/test_data/parser/err/0042_illegal_self_keyword_location.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0042_illegal_self_keyword_location.rs (renamed from crates/ra_syntax/test_data/parser/err/0042_illegal_self_keyword_location.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0043_weird_blocks.rast (renamed from crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0043_weird_blocks.rs (renamed from crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0044_unexpected_for_type.rast (renamed from crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0044_unexpected_for_type.rs (renamed from crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0045_item_modifiers.rast (renamed from crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0045_item_modifiers.rs (renamed from crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rast (renamed from crates/ra_syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rs (renamed from crates/ra_syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rast (renamed from crates/ra_syntax/test_data/parser/fragments/expr/ok/0000_add.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rs (renamed from crates/ra_syntax/test_data/parser/fragments/expr/ok/0000_add.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rast (renamed from crates/ra_syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rs (renamed from crates/ra_syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/item/ok/0000_fn.rast (renamed from crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/item/ok/0000_fn.rs (renamed from crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/path/err/0000_reserved_word.rast (renamed from crates/ra_syntax/test_data/parser/fragments/path/err/0000_reserved_word.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/path/err/0000_reserved_word.rs (renamed from crates/ra_syntax/test_data/parser/fragments/path/err/0000_reserved_word.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/path/err/0001_expression.rast (renamed from crates/ra_syntax/test_data/parser/fragments/path/err/0001_expression.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/path/err/0001_expression.rs (renamed from crates/ra_syntax/test_data/parser/fragments/path/err/0001_expression.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/path/ok/0000_single_ident.rast (renamed from crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/path/ok/0000_single_ident.rs (renamed from crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/path/ok/0001_multipart.rast (renamed from crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/path/ok/0001_multipart.rs (renamed from crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rast (renamed from crates/ra_syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rs (renamed from crates/ra_syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rast (renamed from crates/ra_syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rs (renamed from crates/ra_syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/pattern/ok/0000_enum.rast (renamed from crates/ra_syntax/test_data/parser/fragments/pattern/ok/0000_enum.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/pattern/ok/0000_enum.rs (renamed from crates/ra_syntax/test_data/parser/fragments/pattern/ok/0000_enum.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/type/err/0000_missing_close.rast (renamed from crates/ra_syntax/test_data/parser/fragments/type/err/0000_missing_close.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/type/err/0000_missing_close.rs (renamed from crates/ra_syntax/test_data/parser/fragments/type/err/0000_missing_close.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/type/ok/0000_result.rast (renamed from crates/ra_syntax/test_data/parser/fragments/type/ok/0000_result.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fragments/type/ok/0000_result.rs (renamed from crates/ra_syntax/test_data/parser/fragments/type/ok/0000_result.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fuzz-failures/0000.rs (renamed from crates/ra_syntax/test_data/parser/fuzz-failures/0000.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fuzz-failures/0001.rs | 106 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fuzz-failures/0002.rs (renamed from crates/ra_syntax/test_data/parser/fuzz-failures/0002.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fuzz-failures/0003.rs (renamed from crates/ra_syntax/test_data/parser/fuzz-failures/0003.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/fuzz-failures/0004.rs (renamed from crates/ra_syntax/test_data/parser/fuzz-failures/0004.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rast (renamed from crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rs (renamed from crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast (renamed from crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rs (renamed from crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rast (renamed from crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rs (renamed from crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0004_impl_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0004_impl_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rast (renamed from crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rs (renamed from crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast (renamed from crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rs (renamed from crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast (renamed from crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0007_async_without_semicolon.rs (renamed from crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0008_pub_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0008_pub_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast (renamed from crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rs (renamed from crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0013_static_underscore.rast (renamed from crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0013_static_underscore.rs (renamed from crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast (renamed from crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rs (renamed from crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0015_empty_segment.rast | 13 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/err/0015_empty_segment.rs (renamed from crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0002_use_tree_list.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0002_use_tree_list.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0002_use_tree_list.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0002_use_tree_list.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0005_function_type_params.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0005_function_type_params.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0006_self_param.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0006_self_param.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0008_path_part.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0008_path_part.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0009_loop_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0009_loop_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0010_extern_block.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0010_extern_block.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0010_extern_block.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0010_extern_block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0011_field_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0011_field_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0014_never_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0014_never_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0017_array_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0017_array_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0018_arb_self_types.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0018_arb_self_types.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0019_unary_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0019_unary_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0020_use_star.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0020_use_star.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0020_use_star.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0020_use_star.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0021_impl_item_list.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0021_impl_item_list.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0022_crate_visibility.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0022_crate_visibility.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0023_placeholder_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0023_placeholder_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0024_slice_pat.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0024_slice_pat.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0025_slice_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0025_slice_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0027_ref_pat.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0027_ref_pat.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0029_cast_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0029_cast_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0030_cond.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0030_cond.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0031_while_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0031_while_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0034_break_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0034_break_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0037_qual_paths.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0037_qual_paths.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0038_full_range_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0038_full_range_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0039_type_arg.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0039_type_arg.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0041_trait_item.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0041_trait_item.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0041_trait_item.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0041_trait_item.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0042_call_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0042_call_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0043_use_alias.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0043_use_alias.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0043_use_alias.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0043_use_alias.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0044_block_items.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0044_block_items.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0050_fn_decl.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0050_fn_decl.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0051_unit_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0051_unit_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0052_path_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0052_path_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0053_path_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0053_path_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0054_record_field_attrs.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0054_record_field_attrs.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0055_literal_pattern.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0055_literal_pattern.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0056_where_clause.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0056_where_clause.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0058_range_pat.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0058_range_pat.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0059_match_arms_commas.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0059_match_arms_commas.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0060_extern_crate.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0060_extern_crate.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0060_extern_crate.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0060_extern_crate.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0061_record_lit.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0061_record_lit.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0062_mod_contents.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0062_mod_contents.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0063_impl_def_neg.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0063_impl_def_neg.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0064_if_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0064_if_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0066_match_arm.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0066_match_arm.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0067_crate_path.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0067_crate_path.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0067_crate_path.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0067_crate_path.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0068_union_items.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0068_union_items.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0071_match_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0071_match_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0072_return_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0072_return_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0073_type_item_type_params.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0073_type_item_type_params.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0075_block.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0075_block.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0075_block.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0075_block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0076_function_where_clause.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0076_function_where_clause.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0077_try_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0077_try_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0078_type_item.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0078_type_item.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0079_impl_def.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0079_impl_def.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0080_postfix_range.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0080_postfix_range.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0081_for_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0081_for_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0082_ref_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0082_ref_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0083_struct_items.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0083_struct_items.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0084_paren_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0084_paren_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0085_expr_literals.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0085_expr_literals.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0086_function_ret_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0086_function_ret_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0088_break_ambiguity.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0088_break_ambiguity.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0090_type_param_default.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0090_type_param_default.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0093_index_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0093_index_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0095_placeholder_pat.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0095_placeholder_pat.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0099_param_list.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0099_param_list.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0100_for_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0100_for_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0103_array_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0103_array_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0106_lambda_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0106_lambda_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0107_method_call_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0107_method_call_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0108_tuple_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0108_tuple_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0109_label.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0109_label.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0109_label.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0109_label.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0110_use_path.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0110_use_path.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0110_use_path.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0110_use_path.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0111_tuple_pat.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0111_tuple_pat.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0112_bind_pat.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0112_bind_pat.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0113_nocontentexpr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0113_nocontentexpr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0117_macro_call_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0117_macro_call_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0118_match_guard.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0118_match_guard.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0123_param_list_vararg.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0123_param_list_vararg.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0129_marco_pat.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0129_marco_pat.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0130_let_stmt.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0130_let_stmt.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0130_try_block_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0130_try_block_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0131_existential_type.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0131_existential_type.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0132_box_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0132_box_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0137_await_expr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0137_await_expr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0138_expression_after_block.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0138_expression_after_block.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0139_param_outer_arg.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0139_param_outer_arg.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0142_for_range_from.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0142_for_range_from.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0143_box_pat.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0143_box_pat.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0145_record_field_pat.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0145_record_field_pat.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0146_as_precedence.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0146_as_precedence.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0146_as_precedence.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0146_as_precedence.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0147_const_param.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0147_const_param.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0147_const_param.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0147_const_param.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0147_macro_def.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0147_macro_def.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0147_macro_def.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0147_macro_def.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0148_pub_macro_def.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0148_pub_macro_def.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0148_pub_macro_def.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0148_pub_macro_def.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0150_array_attrs.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0150_array_attrs.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0150_array_attrs.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0150_array_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0150_impl_type_params.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0150_impl_type_params.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0150_impl_type_params.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0150_impl_type_params.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0151_fn.rast | 14 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0151_fn.rs | 1 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0151_trait_alias.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0151_trait_alias.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0151_trait_alias.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0151_trait_alias.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0152_arg_with_attr.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0152_arg_with_attr.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0152_arg_with_attr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0152_arg_with_attr.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0152_impl.rast | 22 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0152_impl.rs | 1 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0153_trait.rast | 11 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0153_trait.rs | 1 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0155_closure_params.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0155_closure_params.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0156_fn_def_param.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0156_fn_def_param.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0156_or_pattern.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0156_or_pattern.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0156_or_pattern.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0156_or_pattern.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0157_variant_discriminant.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0157_variant_discriminant.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0157_variant_discriminant.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0157_variant_discriminant.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0160_try_macro_rules.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0160_try_macro_rules.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0160_try_macro_rules.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0160_try_macro_rules.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0161_labeled_block.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0161_labeled_block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0162_unsafe_block.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0162_unsafe_block.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0162_unsafe_block.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0162_unsafe_block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0163_default_unsafe_item.rast | 44 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0163_default_unsafe_item.rs | 3 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0164_default_item.rast | 24 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0164_default_item.rs | 1 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0000_empty.rast (renamed from crates/ra_syntax/test_data/parser/ok/0000_empty.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0000_empty.rs (renamed from crates/ra_syntax/test_data/parser/ok/0000_empty.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0001_struct_item.rast (renamed from crates/ra_syntax/test_data/parser/ok/0001_struct_item.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0001_struct_item.rs (renamed from crates/ra_syntax/test_data/parser/ok/0001_struct_item.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0002_struct_item_field.rast (renamed from crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0002_struct_item_field.rs (renamed from crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0004_file_shebang.rast (renamed from crates/ra_syntax/test_data/parser/ok/0004_file_shebang.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0004_file_shebang.rs (renamed from crates/ra_syntax/test_data/parser/ok/0004_file_shebang.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0005_fn_item.rast (renamed from crates/ra_syntax/test_data/parser/ok/0005_fn_item.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0005_fn_item.rs (renamed from crates/ra_syntax/test_data/parser/ok/0005_fn_item.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0006_inner_attributes.rast (renamed from crates/ra_syntax/test_data/parser/ok/0006_inner_attributes.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0006_inner_attributes.rs (renamed from crates/ra_syntax/test_data/parser/ok/0006_inner_attributes.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0007_extern_crate.rast (renamed from crates/ra_syntax/test_data/parser/ok/0007_extern_crate.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0007_extern_crate.rs (renamed from crates/ra_syntax/test_data/parser/ok/0007_extern_crate.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0008_mod_item.rast (renamed from crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0008_mod_item.rs (renamed from crates/ra_syntax/test_data/parser/ok/0008_mod_item.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0009_use_item.rast (renamed from crates/ra_syntax/test_data/parser/ok/0009_use_item.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0009_use_item.rs (renamed from crates/ra_syntax/test_data/parser/ok/0009_use_item.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0010_use_path_segments.rast (renamed from crates/ra_syntax/test_data/parser/ok/0010_use_path_segments.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0010_use_path_segments.rs (renamed from crates/ra_syntax/test_data/parser/ok/0010_use_path_segments.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0011_outer_attribute.rast (renamed from crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0011_outer_attribute.rs (renamed from crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0012_visibility.rast (renamed from crates/ra_syntax/test_data/parser/ok/0012_visibility.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0012_visibility.rs (renamed from crates/ra_syntax/test_data/parser/ok/0012_visibility.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0013_use_path_self_super.rast (renamed from crates/ra_syntax/test_data/parser/ok/0013_use_path_self_super.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0013_use_path_self_super.rs (renamed from crates/ra_syntax/test_data/parser/ok/0013_use_path_self_super.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0014_use_tree.rast (renamed from crates/ra_syntax/test_data/parser/ok/0014_use_tree.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0014_use_tree.rs (renamed from crates/ra_syntax/test_data/parser/ok/0014_use_tree.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0015_use_tree.rast (renamed from crates/ra_syntax/test_data/parser/ok/0015_use_tree.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0015_use_tree.rs (renamed from crates/ra_syntax/test_data/parser/ok/0015_use_tree.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0016_struct_flavors.rast (renamed from crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0016_struct_flavors.rs (renamed from crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0017_attr_trailing_comma.rast (renamed from crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0017_attr_trailing_comma.rs (renamed from crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0018_struct_type_params.rast (renamed from crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0018_struct_type_params.rs (renamed from crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0019_enums.rast (renamed from crates/ra_syntax/test_data/parser/ok/0019_enums.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0019_enums.rs (renamed from crates/ra_syntax/test_data/parser/ok/0019_enums.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0020_type_param_bounds.rast (renamed from crates/ra_syntax/test_data/parser/ok/0020_type_param_bounds.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0020_type_param_bounds.rs (renamed from crates/ra_syntax/test_data/parser/ok/0020_type_param_bounds.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0022_empty_extern_block.rast (renamed from crates/ra_syntax/test_data/parser/ok/0022_empty_extern_block.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0022_empty_extern_block.rs (renamed from crates/ra_syntax/test_data/parser/ok/0022_empty_extern_block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0023_static_items.rast (renamed from crates/ra_syntax/test_data/parser/ok/0023_static_items.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0023_static_items.rs (renamed from crates/ra_syntax/test_data/parser/ok/0023_static_items.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0024_const_item.rast (renamed from crates/ra_syntax/test_data/parser/ok/0024_const_item.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0024_const_item.rs (renamed from crates/ra_syntax/test_data/parser/ok/0024_const_item.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0025_extern_fn_in_block.rast (renamed from crates/ra_syntax/test_data/parser/ok/0025_extern_fn_in_block.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0025_extern_fn_in_block.rs (renamed from crates/ra_syntax/test_data/parser/ok/0025_extern_fn_in_block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0026_const_fn_in_block.rast (renamed from crates/ra_syntax/test_data/parser/ok/0026_const_fn_in_block.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0026_const_fn_in_block.rs (renamed from crates/ra_syntax/test_data/parser/ok/0026_const_fn_in_block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rast (renamed from crates/ra_syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rs (renamed from crates/ra_syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0028_operator_binding_power.rast (renamed from crates/ra_syntax/test_data/parser/ok/0028_operator_binding_power.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0028_operator_binding_power.rs (renamed from crates/ra_syntax/test_data/parser/ok/0028_operator_binding_power.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0029_range_forms.rast (renamed from crates/ra_syntax/test_data/parser/ok/0029_range_forms.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0029_range_forms.rs (renamed from crates/ra_syntax/test_data/parser/ok/0029_range_forms.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0030_string_suffixes.rast (renamed from crates/ra_syntax/test_data/parser/ok/0030_string_suffixes.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0030_string_suffixes.rs (renamed from crates/ra_syntax/test_data/parser/ok/0030_string_suffixes.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0030_traits.rast (renamed from crates/ra_syntax/test_data/parser/ok/0030_traits.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0030_traits.rs (renamed from crates/ra_syntax/test_data/parser/ok/0030_traits.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0031_extern.rast (renamed from crates/ra_syntax/test_data/parser/ok/0031_extern.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0031_extern.rs (renamed from crates/ra_syntax/test_data/parser/ok/0031_extern.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0032_where_for.rast (renamed from crates/ra_syntax/test_data/parser/ok/0032_where_for.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0032_where_for.rs (renamed from crates/ra_syntax/test_data/parser/ok/0032_where_for.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0033_label_break.rast (renamed from crates/ra_syntax/test_data/parser/ok/0033_label_break.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0033_label_break.rs (renamed from crates/ra_syntax/test_data/parser/ok/0033_label_break.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0034_crate_path_in_call.rast (renamed from crates/ra_syntax/test_data/parser/ok/0034_crate_path_in_call.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0034_crate_path_in_call.rs (renamed from crates/ra_syntax/test_data/parser/ok/0034_crate_path_in_call.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0035_weird_exprs.rast (renamed from crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0035_weird_exprs.rs (renamed from crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0036_fully_qualified.rast (renamed from crates/ra_syntax/test_data/parser/ok/0036_fully_qualified.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0036_fully_qualified.rs (renamed from crates/ra_syntax/test_data/parser/ok/0036_fully_qualified.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0037_mod.rast (renamed from crates/ra_syntax/test_data/parser/ok/0037_mod.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0037_mod.rs (renamed from crates/ra_syntax/test_data/parser/ok/0037_mod.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0038_where_pred_type.rast (renamed from crates/ra_syntax/test_data/parser/ok/0038_where_pred_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0038_where_pred_type.rs (renamed from crates/ra_syntax/test_data/parser/ok/0038_where_pred_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0039_raw_fn_item.rast (renamed from crates/ra_syntax/test_data/parser/ok/0039_raw_fn_item.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0039_raw_fn_item.rs (renamed from crates/ra_syntax/test_data/parser/ok/0039_raw_fn_item.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0040_raw_struct_item_field.rast (renamed from crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0040_raw_struct_item_field.rs (renamed from crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0041_raw_keywords.rast (renamed from crates/ra_syntax/test_data/parser/ok/0041_raw_keywords.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0041_raw_keywords.rs (renamed from crates/ra_syntax/test_data/parser/ok/0041_raw_keywords.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0042_ufcs_call_list.rast (renamed from crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0042_ufcs_call_list.rs (renamed from crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0043_complex_assignment.rast (renamed from crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0043_complex_assignment.rs (renamed from crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0044_let_attrs.rast (renamed from crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0044_let_attrs.rs (renamed from crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0045_block_inner_attrs.rast (renamed from crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0045_block_inner_attrs.rs (renamed from crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0046_extern_inner_attributes.rast (renamed from crates/ra_syntax/test_data/parser/ok/0046_extern_inner_attributes.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0046_extern_inner_attributes.rs (renamed from crates/ra_syntax/test_data/parser/ok/0046_extern_inner_attributes.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rast (renamed from crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rs (renamed from crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0048_compound_assignment.rast (renamed from crates/ra_syntax/test_data/parser/ok/0048_compound_assignment.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0048_compound_assignment.rs (renamed from crates/ra_syntax/test_data/parser/ok/0048_compound_assignment.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0049_async_block.rast (renamed from crates/ra_syntax/test_data/parser/ok/0049_async_block.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0049_async_block.rs (renamed from crates/ra_syntax/test_data/parser/ok/0049_async_block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0050_async_block_as_argument.rast (renamed from crates/ra_syntax/test_data/parser/ok/0050_async_block_as_argument.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0050_async_block_as_argument.rs (renamed from crates/ra_syntax/test_data/parser/ok/0050_async_block_as_argument.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0051_parameter_attrs.rast (renamed from crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0051_parameter_attrs.rs (renamed from crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0052_for_range_block.rast (renamed from crates/ra_syntax/test_data/parser/ok/0052_for_range_block.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0052_for_range_block.rs (renamed from crates/ra_syntax/test_data/parser/ok/0052_for_range_block.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0053_outer_attribute_on_macro_rules.rast (renamed from crates/ra_syntax/test_data/parser/ok/0053_outer_attribute_on_macro_rules.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0053_outer_attribute_on_macro_rules.rs (renamed from crates/ra_syntax/test_data/parser/ok/0053_outer_attribute_on_macro_rules.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rast (renamed from crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rs (renamed from crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0055_dot_dot_dot.rast (renamed from crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0055_dot_dot_dot.rs (renamed from crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0056_neq_in_type.rast (renamed from crates/ra_syntax/test_data/parser/ok/0056_neq_in_type.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0056_neq_in_type.rs (renamed from crates/ra_syntax/test_data/parser/ok/0056_neq_in_type.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0057_loop_in_call.rast (renamed from crates/ra_syntax/test_data/parser/ok/0057_loop_in_call.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0057_loop_in_call.rs (renamed from crates/ra_syntax/test_data/parser/ok/0057_loop_in_call.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0058_unary_expr_precedence.rast (renamed from crates/ra_syntax/test_data/parser/ok/0058_unary_expr_precedence.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0058_unary_expr_precedence.rs (renamed from crates/ra_syntax/test_data/parser/ok/0058_unary_expr_precedence.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0059_loops_in_parens.rast (renamed from crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0059_loops_in_parens.rs (renamed from crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0060_as_range.rast (renamed from crates/ra_syntax/test_data/parser/ok/0060_as_range.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0060_as_range.rs (renamed from crates/ra_syntax/test_data/parser/ok/0060_as_range.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0061_match_full_range.rast (renamed from crates/ra_syntax/test_data/parser/ok/0061_match_full_range.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0061_match_full_range.rs (renamed from crates/ra_syntax/test_data/parser/ok/0061_match_full_range.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0062_macro_2.0.rast (renamed from crates/ra_syntax/test_data/parser/ok/0062_macro_2.0.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0062_macro_2.0.rs (renamed from crates/ra_syntax/test_data/parser/ok/0062_macro_2.0.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0063_trait_fn_patterns.rast (renamed from crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0063_trait_fn_patterns.rs (renamed from crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0063_variadic_fun.rast (renamed from crates/ra_syntax/test_data/parser/ok/0063_variadic_fun.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0063_variadic_fun.rs (renamed from crates/ra_syntax/test_data/parser/ok/0063_variadic_fun.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0064_impl_fn_params.rast (renamed from crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0064_impl_fn_params.rs (renamed from crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0065_comment_newline.rast (renamed from crates/ra_syntax/test_data/parser/ok/0065_comment_newline.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0065_comment_newline.rs (renamed from crates/ra_syntax/test_data/parser/ok/0065_comment_newline.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0065_plus_after_fn_trait_bound.rast (renamed from crates/ra_syntax/test_data/parser/ok/0065_plus_after_fn_trait_bound.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0065_plus_after_fn_trait_bound.rs (renamed from crates/ra_syntax/test_data/parser/ok/0065_plus_after_fn_trait_bound.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0066_default_modifier.rast | 218 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0066_default_modifier.rs | 16 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0067_where_for_pred.rast (renamed from crates/ra_syntax/test_data/parser/ok/0067_where_for_pred.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0067_where_for_pred.rs (renamed from crates/ra_syntax/test_data/parser/ok/0067_where_for_pred.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0068_item_modifiers.rast | 218 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0068_item_modifiers.rs | 16 | ||||
-rw-r--r-- | crates/syntax/test_data/reparse/fuzz-failures/0000.rs (renamed from crates/ra_syntax/test_data/reparse/fuzz-failures/0000.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/reparse/fuzz-failures/0001.rs (renamed from crates/ra_syntax/test_data/reparse/fuzz-failures/0001.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/reparse/fuzz-failures/0002.rs (renamed from crates/ra_syntax/test_data/reparse/fuzz-failures/0002.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/reparse/fuzz-failures/0003.rs (renamed from crates/ra_syntax/test_data/reparse/fuzz-failures/0003.rs) | bin | 8 -> 8 bytes | |||
-rw-r--r-- | crates/syntax/test_data/reparse/fuzz-failures/0004.rs (renamed from crates/ra_syntax/test_data/reparse/fuzz-failures/0004.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/reparse/fuzz-failures/0005.rs (renamed from crates/ra_syntax/test_data/reparse/fuzz-failures/0005.rs) | 0 | ||||
-rw-r--r-- | crates/test_utils/Cargo.toml | 7 | ||||
-rw-r--r-- | crates/text_edit/Cargo.toml | 12 | ||||
-rw-r--r-- | crates/text_edit/src/lib.rs | 186 | ||||
-rw-r--r-- | crates/toolchain/Cargo.toml | 12 | ||||
-rw-r--r-- | crates/toolchain/src/lib.rs | 66 | ||||
-rw-r--r-- | crates/tt/Cargo.toml | 16 | ||||
-rw-r--r-- | crates/tt/src/buffer.rs (renamed from crates/ra_tt/src/buffer.rs) | 0 | ||||
-rw-r--r-- | crates/tt/src/lib.rs | 246 | ||||
-rw-r--r-- | crates/vfs-notify/Cargo.toml | 4 | ||||
-rw-r--r-- | crates/vfs/Cargo.toml | 4 | ||||
-rw-r--r-- | crates/vfs/src/vfs_path.rs | 139 |
1444 files changed, 99064 insertions, 98056 deletions
diff --git a/crates/arena/Cargo.toml b/crates/arena/Cargo.toml new file mode 100644 index 000000000..f2bb5cc45 --- /dev/null +++ b/crates/arena/Cargo.toml | |||
@@ -0,0 +1,9 @@ | |||
1 | [package] | ||
2 | name = "arena" | ||
3 | version = "0.0.0" | ||
4 | license = "MIT OR Apache-2.0" | ||
5 | authors = ["rust-analyzer developers"] | ||
6 | edition = "2018" | ||
7 | |||
8 | [lib] | ||
9 | doctest = false | ||
diff --git a/crates/ra_arena/src/lib.rs b/crates/arena/src/lib.rs index 3169aa5b8..3169aa5b8 100644 --- a/crates/ra_arena/src/lib.rs +++ b/crates/arena/src/lib.rs | |||
diff --git a/crates/ra_arena/src/map.rs b/crates/arena/src/map.rs index 0f33907c0..0f33907c0 100644 --- a/crates/ra_arena/src/map.rs +++ b/crates/arena/src/map.rs | |||
diff --git a/crates/assists/Cargo.toml b/crates/assists/Cargo.toml new file mode 100644 index 000000000..a560a35c7 --- /dev/null +++ b/crates/assists/Cargo.toml | |||
@@ -0,0 +1,23 @@ | |||
1 | [package] | ||
2 | name = "assists" | ||
3 | version = "0.0.0" | ||
4 | license = "MIT OR Apache-2.0" | ||
5 | authors = ["rust-analyzer developers"] | ||
6 | edition = "2018" | ||
7 | |||
8 | [lib] | ||
9 | doctest = false | ||
10 | |||
11 | [dependencies] | ||
12 | rustc-hash = "1.1.0" | ||
13 | itertools = "0.9.0" | ||
14 | either = "1.5.3" | ||
15 | |||
16 | stdx = { path = "../stdx" } | ||
17 | syntax = { path = "../syntax" } | ||
18 | text_edit = { path = "../text_edit" } | ||
19 | profile = { path = "../profile" } | ||
20 | base_db = { path = "../base_db" } | ||
21 | ide_db = { path = "../ide_db" } | ||
22 | hir = { path = "../hir" } | ||
23 | test_utils = { path = "../test_utils" } | ||
diff --git a/crates/ra_assists/src/assist_config.rs b/crates/assists/src/assist_config.rs index cda2abfb9..cda2abfb9 100644 --- a/crates/ra_assists/src/assist_config.rs +++ b/crates/assists/src/assist_config.rs | |||
diff --git a/crates/assists/src/assist_context.rs b/crates/assists/src/assist_context.rs new file mode 100644 index 000000000..79574b9ac --- /dev/null +++ b/crates/assists/src/assist_context.rs | |||
@@ -0,0 +1,291 @@ | |||
1 | //! See `AssistContext` | ||
2 | |||
3 | use std::mem; | ||
4 | |||
5 | use algo::find_covering_element; | ||
6 | use base_db::{FileId, FileRange}; | ||
7 | use hir::Semantics; | ||
8 | use ide_db::{ | ||
9 | source_change::{SourceChange, SourceFileEdit}, | ||
10 | RootDatabase, | ||
11 | }; | ||
12 | use syntax::{ | ||
13 | algo::{self, find_node_at_offset, SyntaxRewriter}, | ||
14 | AstNode, SourceFile, SyntaxElement, SyntaxKind, SyntaxToken, TextRange, TextSize, | ||
15 | TokenAtOffset, | ||
16 | }; | ||
17 | use text_edit::{TextEdit, TextEditBuilder}; | ||
18 | |||
19 | use crate::{ | ||
20 | assist_config::{AssistConfig, SnippetCap}, | ||
21 | Assist, AssistId, AssistKind, GroupLabel, ResolvedAssist, | ||
22 | }; | ||
23 | |||
24 | /// `AssistContext` allows to apply an assist or check if it could be applied. | ||
25 | /// | ||
26 | /// Assists use a somewhat over-engineered approach, given the current needs. | ||
27 | /// The assists workflow consists of two phases. In the first phase, a user asks | ||
28 | /// for the list of available assists. In the second phase, the user picks a | ||
29 | /// particular assist and it gets applied. | ||
30 | /// | ||
31 | /// There are two peculiarities here: | ||
32 | /// | ||
33 | /// * first, we ideally avoid computing more things then necessary to answer "is | ||
34 | /// assist applicable" in the first phase. | ||
35 | /// * second, when we are applying assist, we don't have a guarantee that there | ||
36 | /// weren't any changes between the point when user asked for assists and when | ||
37 | /// they applied a particular assist. So, when applying assist, we need to do | ||
38 | /// all the checks from scratch. | ||
39 | /// | ||
40 | /// To avoid repeating the same code twice for both "check" and "apply" | ||
41 | /// functions, we use an approach reminiscent of that of Django's function based | ||
42 | /// views dealing with forms. Each assist receives a runtime parameter, | ||
43 | /// `resolve`. It first check if an edit is applicable (potentially computing | ||
44 | /// info required to compute the actual edit). If it is applicable, and | ||
45 | /// `resolve` is `true`, it then computes the actual edit. | ||
46 | /// | ||
47 | /// So, to implement the original assists workflow, we can first apply each edit | ||
48 | /// with `resolve = false`, and then applying the selected edit again, with | ||
49 | /// `resolve = true` this time. | ||
50 | /// | ||
51 | /// Note, however, that we don't actually use such two-phase logic at the | ||
52 | /// moment, because the LSP API is pretty awkward in this place, and it's much | ||
53 | /// easier to just compute the edit eagerly :-) | ||
54 | pub(crate) struct AssistContext<'a> { | ||
55 | pub(crate) config: &'a AssistConfig, | ||
56 | pub(crate) sema: Semantics<'a, RootDatabase>, | ||
57 | pub(crate) frange: FileRange, | ||
58 | source_file: SourceFile, | ||
59 | } | ||
60 | |||
61 | impl<'a> AssistContext<'a> { | ||
62 | pub(crate) fn new( | ||
63 | sema: Semantics<'a, RootDatabase>, | ||
64 | config: &'a AssistConfig, | ||
65 | frange: FileRange, | ||
66 | ) -> AssistContext<'a> { | ||
67 | let source_file = sema.parse(frange.file_id); | ||
68 | AssistContext { config, sema, frange, source_file } | ||
69 | } | ||
70 | |||
71 | pub(crate) fn db(&self) -> &RootDatabase { | ||
72 | self.sema.db | ||
73 | } | ||
74 | |||
75 | pub(crate) fn source_file(&self) -> &SourceFile { | ||
76 | &self.source_file | ||
77 | } | ||
78 | |||
79 | // NB, this ignores active selection. | ||
80 | pub(crate) fn offset(&self) -> TextSize { | ||
81 | self.frange.range.start() | ||
82 | } | ||
83 | |||
84 | pub(crate) fn token_at_offset(&self) -> TokenAtOffset<SyntaxToken> { | ||
85 | self.source_file.syntax().token_at_offset(self.offset()) | ||
86 | } | ||
87 | pub(crate) fn find_token_at_offset(&self, kind: SyntaxKind) -> Option<SyntaxToken> { | ||
88 | self.token_at_offset().find(|it| it.kind() == kind) | ||
89 | } | ||
90 | pub(crate) fn find_node_at_offset<N: AstNode>(&self) -> Option<N> { | ||
91 | find_node_at_offset(self.source_file.syntax(), self.offset()) | ||
92 | } | ||
93 | pub(crate) fn find_node_at_offset_with_descend<N: AstNode>(&self) -> Option<N> { | ||
94 | self.sema.find_node_at_offset_with_descend(self.source_file.syntax(), self.offset()) | ||
95 | } | ||
96 | pub(crate) fn covering_element(&self) -> SyntaxElement { | ||
97 | find_covering_element(self.source_file.syntax(), self.frange.range) | ||
98 | } | ||
99 | // FIXME: remove | ||
100 | pub(crate) fn covering_node_for_range(&self, range: TextRange) -> SyntaxElement { | ||
101 | find_covering_element(self.source_file.syntax(), range) | ||
102 | } | ||
103 | } | ||
104 | |||
105 | pub(crate) struct Assists { | ||
106 | resolve: bool, | ||
107 | file: FileId, | ||
108 | buf: Vec<(Assist, Option<SourceChange>)>, | ||
109 | allowed: Option<Vec<AssistKind>>, | ||
110 | } | ||
111 | |||
112 | impl Assists { | ||
113 | pub(crate) fn new_resolved(ctx: &AssistContext) -> Assists { | ||
114 | Assists { | ||
115 | resolve: true, | ||
116 | file: ctx.frange.file_id, | ||
117 | buf: Vec::new(), | ||
118 | allowed: ctx.config.allowed.clone(), | ||
119 | } | ||
120 | } | ||
121 | |||
122 | pub(crate) fn new_unresolved(ctx: &AssistContext) -> Assists { | ||
123 | Assists { | ||
124 | resolve: false, | ||
125 | file: ctx.frange.file_id, | ||
126 | buf: Vec::new(), | ||
127 | allowed: ctx.config.allowed.clone(), | ||
128 | } | ||
129 | } | ||
130 | |||
131 | pub(crate) fn finish_unresolved(self) -> Vec<Assist> { | ||
132 | assert!(!self.resolve); | ||
133 | self.finish() | ||
134 | .into_iter() | ||
135 | .map(|(label, edit)| { | ||
136 | assert!(edit.is_none()); | ||
137 | label | ||
138 | }) | ||
139 | .collect() | ||
140 | } | ||
141 | |||
142 | pub(crate) fn finish_resolved(self) -> Vec<ResolvedAssist> { | ||
143 | assert!(self.resolve); | ||
144 | self.finish() | ||
145 | .into_iter() | ||
146 | .map(|(label, edit)| ResolvedAssist { assist: label, source_change: edit.unwrap() }) | ||
147 | .collect() | ||
148 | } | ||
149 | |||
150 | pub(crate) fn add( | ||
151 | &mut self, | ||
152 | id: AssistId, | ||
153 | label: impl Into<String>, | ||
154 | target: TextRange, | ||
155 | f: impl FnOnce(&mut AssistBuilder), | ||
156 | ) -> Option<()> { | ||
157 | if !self.is_allowed(&id) { | ||
158 | return None; | ||
159 | } | ||
160 | let label = Assist::new(id, label.into(), None, target); | ||
161 | self.add_impl(label, f) | ||
162 | } | ||
163 | |||
164 | pub(crate) fn add_group( | ||
165 | &mut self, | ||
166 | group: &GroupLabel, | ||
167 | id: AssistId, | ||
168 | label: impl Into<String>, | ||
169 | target: TextRange, | ||
170 | f: impl FnOnce(&mut AssistBuilder), | ||
171 | ) -> Option<()> { | ||
172 | if !self.is_allowed(&id) { | ||
173 | return None; | ||
174 | } | ||
175 | |||
176 | let label = Assist::new(id, label.into(), Some(group.clone()), target); | ||
177 | self.add_impl(label, f) | ||
178 | } | ||
179 | |||
180 | fn add_impl(&mut self, label: Assist, f: impl FnOnce(&mut AssistBuilder)) -> Option<()> { | ||
181 | let source_change = if self.resolve { | ||
182 | let mut builder = AssistBuilder::new(self.file); | ||
183 | f(&mut builder); | ||
184 | Some(builder.finish()) | ||
185 | } else { | ||
186 | None | ||
187 | }; | ||
188 | |||
189 | self.buf.push((label, source_change)); | ||
190 | Some(()) | ||
191 | } | ||
192 | |||
193 | fn finish(mut self) -> Vec<(Assist, Option<SourceChange>)> { | ||
194 | self.buf.sort_by_key(|(label, _edit)| label.target.len()); | ||
195 | self.buf | ||
196 | } | ||
197 | |||
198 | fn is_allowed(&self, id: &AssistId) -> bool { | ||
199 | match &self.allowed { | ||
200 | Some(allowed) => allowed.iter().any(|kind| kind.contains(id.1)), | ||
201 | None => true, | ||
202 | } | ||
203 | } | ||
204 | } | ||
205 | |||
206 | pub(crate) struct AssistBuilder { | ||
207 | edit: TextEditBuilder, | ||
208 | file_id: FileId, | ||
209 | is_snippet: bool, | ||
210 | change: SourceChange, | ||
211 | } | ||
212 | |||
213 | impl AssistBuilder { | ||
214 | pub(crate) fn new(file_id: FileId) -> AssistBuilder { | ||
215 | AssistBuilder { | ||
216 | edit: TextEdit::builder(), | ||
217 | file_id, | ||
218 | is_snippet: false, | ||
219 | change: SourceChange::default(), | ||
220 | } | ||
221 | } | ||
222 | |||
223 | pub(crate) fn edit_file(&mut self, file_id: FileId) { | ||
224 | self.file_id = file_id; | ||
225 | } | ||
226 | |||
227 | fn commit(&mut self) { | ||
228 | let edit = mem::take(&mut self.edit).finish(); | ||
229 | if !edit.is_empty() { | ||
230 | let new_edit = SourceFileEdit { file_id: self.file_id, edit }; | ||
231 | assert!(!self.change.source_file_edits.iter().any(|it| it.file_id == new_edit.file_id)); | ||
232 | self.change.source_file_edits.push(new_edit); | ||
233 | } | ||
234 | } | ||
235 | |||
236 | /// Remove specified `range` of text. | ||
237 | pub(crate) fn delete(&mut self, range: TextRange) { | ||
238 | self.edit.delete(range) | ||
239 | } | ||
240 | /// Append specified `text` at the given `offset` | ||
241 | pub(crate) fn insert(&mut self, offset: TextSize, text: impl Into<String>) { | ||
242 | self.edit.insert(offset, text.into()) | ||
243 | } | ||
244 | /// Append specified `snippet` at the given `offset` | ||
245 | pub(crate) fn insert_snippet( | ||
246 | &mut self, | ||
247 | _cap: SnippetCap, | ||
248 | offset: TextSize, | ||
249 | snippet: impl Into<String>, | ||
250 | ) { | ||
251 | self.is_snippet = true; | ||
252 | self.insert(offset, snippet); | ||
253 | } | ||
254 | /// Replaces specified `range` of text with a given string. | ||
255 | pub(crate) fn replace(&mut self, range: TextRange, replace_with: impl Into<String>) { | ||
256 | self.edit.replace(range, replace_with.into()) | ||
257 | } | ||
258 | /// Replaces specified `range` of text with a given `snippet`. | ||
259 | pub(crate) fn replace_snippet( | ||
260 | &mut self, | ||
261 | _cap: SnippetCap, | ||
262 | range: TextRange, | ||
263 | snippet: impl Into<String>, | ||
264 | ) { | ||
265 | self.is_snippet = true; | ||
266 | self.replace(range, snippet); | ||
267 | } | ||
268 | pub(crate) fn replace_ast<N: AstNode>(&mut self, old: N, new: N) { | ||
269 | algo::diff(old.syntax(), new.syntax()).into_text_edit(&mut self.edit) | ||
270 | } | ||
271 | pub(crate) fn rewrite(&mut self, rewriter: SyntaxRewriter) { | ||
272 | let node = rewriter.rewrite_root().unwrap(); | ||
273 | let new = rewriter.rewrite(&node); | ||
274 | algo::diff(&node, &new).into_text_edit(&mut self.edit); | ||
275 | } | ||
276 | |||
277 | // FIXME: kill this API | ||
278 | /// Get access to the raw `TextEditBuilder`. | ||
279 | pub(crate) fn text_edit_builder(&mut self) -> &mut TextEditBuilder { | ||
280 | &mut self.edit | ||
281 | } | ||
282 | |||
283 | fn finish(mut self) -> SourceChange { | ||
284 | self.commit(); | ||
285 | let mut change = mem::take(&mut self.change); | ||
286 | if self.is_snippet { | ||
287 | change.is_snippet = true; | ||
288 | } | ||
289 | change | ||
290 | } | ||
291 | } | ||
diff --git a/crates/assists/src/ast_transform.rs b/crates/assists/src/ast_transform.rs new file mode 100644 index 000000000..5216862ba --- /dev/null +++ b/crates/assists/src/ast_transform.rs | |||
@@ -0,0 +1,200 @@ | |||
1 | //! `AstTransformer`s are functions that replace nodes in an AST and can be easily combined. | ||
2 | use rustc_hash::FxHashMap; | ||
3 | |||
4 | use hir::{HirDisplay, PathResolution, SemanticsScope}; | ||
5 | use syntax::{ | ||
6 | algo::SyntaxRewriter, | ||
7 | ast::{self, AstNode}, | ||
8 | }; | ||
9 | |||
10 | pub fn apply<'a, N: AstNode>(transformer: &dyn AstTransform<'a>, node: N) -> N { | ||
11 | SyntaxRewriter::from_fn(|element| match element { | ||
12 | syntax::SyntaxElement::Node(n) => { | ||
13 | let replacement = transformer.get_substitution(&n)?; | ||
14 | Some(replacement.into()) | ||
15 | } | ||
16 | _ => None, | ||
17 | }) | ||
18 | .rewrite_ast(&node) | ||
19 | } | ||
20 | |||
21 | pub trait AstTransform<'a> { | ||
22 | fn get_substitution(&self, node: &syntax::SyntaxNode) -> Option<syntax::SyntaxNode>; | ||
23 | |||
24 | fn chain_before(self, other: Box<dyn AstTransform<'a> + 'a>) -> Box<dyn AstTransform<'a> + 'a>; | ||
25 | fn or<T: AstTransform<'a> + 'a>(self, other: T) -> Box<dyn AstTransform<'a> + 'a> | ||
26 | where | ||
27 | Self: Sized + 'a, | ||
28 | { | ||
29 | self.chain_before(Box::new(other)) | ||
30 | } | ||
31 | } | ||
32 | |||
33 | struct NullTransformer; | ||
34 | |||
35 | impl<'a> AstTransform<'a> for NullTransformer { | ||
36 | fn get_substitution(&self, _node: &syntax::SyntaxNode) -> Option<syntax::SyntaxNode> { | ||
37 | None | ||
38 | } | ||
39 | fn chain_before(self, other: Box<dyn AstTransform<'a> + 'a>) -> Box<dyn AstTransform<'a> + 'a> { | ||
40 | other | ||
41 | } | ||
42 | } | ||
43 | |||
44 | pub struct SubstituteTypeParams<'a> { | ||
45 | source_scope: &'a SemanticsScope<'a>, | ||
46 | substs: FxHashMap<hir::TypeParam, ast::Type>, | ||
47 | previous: Box<dyn AstTransform<'a> + 'a>, | ||
48 | } | ||
49 | |||
50 | impl<'a> SubstituteTypeParams<'a> { | ||
51 | pub fn for_trait_impl( | ||
52 | source_scope: &'a SemanticsScope<'a>, | ||
53 | // FIXME: there's implicit invariant that `trait_` and `source_scope` match... | ||
54 | trait_: hir::Trait, | ||
55 | impl_def: ast::Impl, | ||
56 | ) -> SubstituteTypeParams<'a> { | ||
57 | let substs = get_syntactic_substs(impl_def).unwrap_or_default(); | ||
58 | let generic_def: hir::GenericDef = trait_.into(); | ||
59 | let substs_by_param: FxHashMap<_, _> = generic_def | ||
60 | .params(source_scope.db) | ||
61 | .into_iter() | ||
62 | // this is a trait impl, so we need to skip the first type parameter -- this is a bit hacky | ||
63 | .skip(1) | ||
64 | // The actual list of trait type parameters may be longer than the one | ||
65 | // used in the `impl` block due to trailing default type parameters. | ||
66 | // For that case we extend the `substs` with an empty iterator so we | ||
67 | // can still hit those trailing values and check if they actually have | ||
68 | // a default type. If they do, go for that type from `hir` to `ast` so | ||
69 | // the resulting change can be applied correctly. | ||
70 | .zip(substs.into_iter().map(Some).chain(std::iter::repeat(None))) | ||
71 | .filter_map(|(k, v)| match v { | ||
72 | Some(v) => Some((k, v)), | ||
73 | None => { | ||
74 | let default = k.default(source_scope.db)?; | ||
75 | Some(( | ||
76 | k, | ||
77 | ast::make::ty( | ||
78 | &default | ||
79 | .display_source_code(source_scope.db, source_scope.module()?.into()) | ||
80 | .ok()?, | ||
81 | ), | ||
82 | )) | ||
83 | } | ||
84 | }) | ||
85 | .collect(); | ||
86 | return SubstituteTypeParams { | ||
87 | source_scope, | ||
88 | substs: substs_by_param, | ||
89 | previous: Box::new(NullTransformer), | ||
90 | }; | ||
91 | |||
92 | // FIXME: It would probably be nicer if we could get this via HIR (i.e. get the | ||
93 | // trait ref, and then go from the types in the substs back to the syntax). | ||
94 | fn get_syntactic_substs(impl_def: ast::Impl) -> Option<Vec<ast::Type>> { | ||
95 | let target_trait = impl_def.trait_()?; | ||
96 | let path_type = match target_trait { | ||
97 | ast::Type::PathType(path) => path, | ||
98 | _ => return None, | ||
99 | }; | ||
100 | let generic_arg_list = path_type.path()?.segment()?.generic_arg_list()?; | ||
101 | |||
102 | let mut result = Vec::new(); | ||
103 | for generic_arg in generic_arg_list.generic_args() { | ||
104 | match generic_arg { | ||
105 | ast::GenericArg::TypeArg(type_arg) => result.push(type_arg.ty()?), | ||
106 | ast::GenericArg::AssocTypeArg(_) | ||
107 | | ast::GenericArg::LifetimeArg(_) | ||
108 | | ast::GenericArg::ConstArg(_) => (), | ||
109 | } | ||
110 | } | ||
111 | |||
112 | Some(result) | ||
113 | } | ||
114 | } | ||
115 | fn get_substitution_inner(&self, node: &syntax::SyntaxNode) -> Option<syntax::SyntaxNode> { | ||
116 | let type_ref = ast::Type::cast(node.clone())?; | ||
117 | let path = match &type_ref { | ||
118 | ast::Type::PathType(path_type) => path_type.path()?, | ||
119 | _ => return None, | ||
120 | }; | ||
121 | let resolution = self.source_scope.speculative_resolve(&path)?; | ||
122 | match resolution { | ||
123 | hir::PathResolution::TypeParam(tp) => Some(self.substs.get(&tp)?.syntax().clone()), | ||
124 | _ => None, | ||
125 | } | ||
126 | } | ||
127 | } | ||
128 | |||
129 | impl<'a> AstTransform<'a> for SubstituteTypeParams<'a> { | ||
130 | fn get_substitution(&self, node: &syntax::SyntaxNode) -> Option<syntax::SyntaxNode> { | ||
131 | self.get_substitution_inner(node).or_else(|| self.previous.get_substitution(node)) | ||
132 | } | ||
133 | fn chain_before(self, other: Box<dyn AstTransform<'a> + 'a>) -> Box<dyn AstTransform<'a> + 'a> { | ||
134 | Box::new(SubstituteTypeParams { previous: other, ..self }) | ||
135 | } | ||
136 | } | ||
137 | |||
138 | pub struct QualifyPaths<'a> { | ||
139 | target_scope: &'a SemanticsScope<'a>, | ||
140 | source_scope: &'a SemanticsScope<'a>, | ||
141 | previous: Box<dyn AstTransform<'a> + 'a>, | ||
142 | } | ||
143 | |||
144 | impl<'a> QualifyPaths<'a> { | ||
145 | pub fn new(target_scope: &'a SemanticsScope<'a>, source_scope: &'a SemanticsScope<'a>) -> Self { | ||
146 | Self { target_scope, source_scope, previous: Box::new(NullTransformer) } | ||
147 | } | ||
148 | |||
149 | fn get_substitution_inner(&self, node: &syntax::SyntaxNode) -> Option<syntax::SyntaxNode> { | ||
150 | // FIXME handle value ns? | ||
151 | let from = self.target_scope.module()?; | ||
152 | let p = ast::Path::cast(node.clone())?; | ||
153 | if p.segment().and_then(|s| s.param_list()).is_some() { | ||
154 | // don't try to qualify `Fn(Foo) -> Bar` paths, they are in prelude anyway | ||
155 | return None; | ||
156 | } | ||
157 | let resolution = self.source_scope.speculative_resolve(&p)?; | ||
158 | match resolution { | ||
159 | PathResolution::Def(def) => { | ||
160 | let found_path = from.find_use_path(self.source_scope.db.upcast(), def)?; | ||
161 | let mut path = path_to_ast(found_path); | ||
162 | |||
163 | let type_args = p | ||
164 | .segment() | ||
165 | .and_then(|s| s.generic_arg_list()) | ||
166 | .map(|arg_list| apply(self, arg_list)); | ||
167 | if let Some(type_args) = type_args { | ||
168 | let last_segment = path.segment().unwrap(); | ||
169 | path = path.with_segment(last_segment.with_type_args(type_args)) | ||
170 | } | ||
171 | |||
172 | Some(path.syntax().clone()) | ||
173 | } | ||
174 | PathResolution::Local(_) | ||
175 | | PathResolution::TypeParam(_) | ||
176 | | PathResolution::SelfType(_) => None, | ||
177 | PathResolution::Macro(_) => None, | ||
178 | PathResolution::AssocItem(_) => None, | ||
179 | } | ||
180 | } | ||
181 | } | ||
182 | |||
183 | impl<'a> AstTransform<'a> for QualifyPaths<'a> { | ||
184 | fn get_substitution(&self, node: &syntax::SyntaxNode) -> Option<syntax::SyntaxNode> { | ||
185 | self.get_substitution_inner(node).or_else(|| self.previous.get_substitution(node)) | ||
186 | } | ||
187 | fn chain_before(self, other: Box<dyn AstTransform<'a> + 'a>) -> Box<dyn AstTransform<'a> + 'a> { | ||
188 | Box::new(QualifyPaths { previous: other, ..self }) | ||
189 | } | ||
190 | } | ||
191 | |||
192 | pub(crate) fn path_to_ast(path: hir::ModPath) -> ast::Path { | ||
193 | let parse = ast::SourceFile::parse(&path.to_string()); | ||
194 | parse | ||
195 | .tree() | ||
196 | .syntax() | ||
197 | .descendants() | ||
198 | .find_map(ast::Path::cast) | ||
199 | .unwrap_or_else(|| panic!("failed to parse path {:?}, `{}`", path, path)) | ||
200 | } | ||
diff --git a/crates/assists/src/handlers/add_custom_impl.rs b/crates/assists/src/handlers/add_custom_impl.rs new file mode 100644 index 000000000..8757fa33f --- /dev/null +++ b/crates/assists/src/handlers/add_custom_impl.rs | |||
@@ -0,0 +1,208 @@ | |||
1 | use itertools::Itertools; | ||
2 | use syntax::{ | ||
3 | ast::{self, AstNode}, | ||
4 | Direction, SmolStr, | ||
5 | SyntaxKind::{IDENT, WHITESPACE}, | ||
6 | TextRange, TextSize, | ||
7 | }; | ||
8 | |||
9 | use crate::{ | ||
10 | assist_context::{AssistContext, Assists}, | ||
11 | AssistId, AssistKind, | ||
12 | }; | ||
13 | |||
14 | // Assist: add_custom_impl | ||
15 | // | ||
16 | // Adds impl block for derived trait. | ||
17 | // | ||
18 | // ``` | ||
19 | // #[derive(Deb<|>ug, Display)] | ||
20 | // struct S; | ||
21 | // ``` | ||
22 | // -> | ||
23 | // ``` | ||
24 | // #[derive(Display)] | ||
25 | // struct S; | ||
26 | // | ||
27 | // impl Debug for S { | ||
28 | // $0 | ||
29 | // } | ||
30 | // ``` | ||
31 | pub(crate) fn add_custom_impl(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | ||
32 | let attr = ctx.find_node_at_offset::<ast::Attr>()?; | ||
33 | let input = attr.token_tree()?; | ||
34 | |||
35 | let attr_name = attr | ||
36 | .syntax() | ||
37 | .descendants_with_tokens() | ||
38 | .filter(|t| t.kind() == IDENT) | ||
39 | .find_map(|i| i.into_token()) | ||
40 | .filter(|t| *t.text() == "derive")? | ||
41 | .text() | ||
42 | .clone(); | ||
43 | |||
44 | let trait_token = | ||
45 | ctx.token_at_offset().find(|t| t.kind() == IDENT && *t.text() != attr_name)?; | ||
46 | |||
47 | let annotated = attr.syntax().siblings(Direction::Next).find_map(ast::Name::cast)?; | ||
48 | let annotated_name = annotated.syntax().text().to_string(); | ||
49 | let start_offset = annotated.syntax().parent()?.text_range().end(); | ||
50 | |||
51 | let label = | ||
52 | format!("Add custom impl `{}` for `{}`", trait_token.text().as_str(), annotated_name); | ||
53 | |||
54 | let target = attr.syntax().text_range(); | ||
55 | acc.add(AssistId("add_custom_impl", AssistKind::Refactor), label, target, |builder| { | ||
56 | let new_attr_input = input | ||
57 | .syntax() | ||
58 | .descendants_with_tokens() | ||
59 | .filter(|t| t.kind() == IDENT) | ||
60 | .filter_map(|t| t.into_token().map(|t| t.text().clone())) | ||
61 | .filter(|t| t != trait_token.text()) | ||
62 | .collect::<Vec<SmolStr>>(); | ||
63 | let has_more_derives = !new_attr_input.is_empty(); | ||
64 | |||
65 | if has_more_derives { | ||
66 | let new_attr_input = format!("({})", new_attr_input.iter().format(", ")); | ||
67 | builder.replace(input.syntax().text_range(), new_attr_input); | ||
68 | } else { | ||
69 | let attr_range = attr.syntax().text_range(); | ||
70 | builder.delete(attr_range); | ||
71 | |||
72 | let line_break_range = attr | ||
73 | .syntax() | ||
74 | .next_sibling_or_token() | ||
75 | .filter(|t| t.kind() == WHITESPACE) | ||
76 | .map(|t| t.text_range()) | ||
77 | .unwrap_or_else(|| TextRange::new(TextSize::from(0), TextSize::from(0))); | ||
78 | builder.delete(line_break_range); | ||
79 | } | ||
80 | |||
81 | match ctx.config.snippet_cap { | ||
82 | Some(cap) => { | ||
83 | builder.insert_snippet( | ||
84 | cap, | ||
85 | start_offset, | ||
86 | format!("\n\nimpl {} for {} {{\n $0\n}}", trait_token, annotated_name), | ||
87 | ); | ||
88 | } | ||
89 | None => { | ||
90 | builder.insert( | ||
91 | start_offset, | ||
92 | format!("\n\nimpl {} for {} {{\n\n}}", trait_token, annotated_name), | ||
93 | ); | ||
94 | } | ||
95 | } | ||
96 | }) | ||
97 | } | ||
98 | |||
99 | #[cfg(test)] | ||
100 | mod tests { | ||
101 | use crate::tests::{check_assist, check_assist_not_applicable}; | ||
102 | |||
103 | use super::*; | ||
104 | |||
105 | #[test] | ||
106 | fn add_custom_impl_for_unique_input() { | ||
107 | check_assist( | ||
108 | add_custom_impl, | ||
109 | " | ||
110 | #[derive(Debu<|>g)] | ||
111 | struct Foo { | ||
112 | bar: String, | ||
113 | } | ||
114 | ", | ||
115 | " | ||
116 | struct Foo { | ||
117 | bar: String, | ||
118 | } | ||
119 | |||
120 | impl Debug for Foo { | ||
121 | $0 | ||
122 | } | ||
123 | ", | ||
124 | ) | ||
125 | } | ||
126 | |||
127 | #[test] | ||
128 | fn add_custom_impl_for_with_visibility_modifier() { | ||
129 | check_assist( | ||
130 | add_custom_impl, | ||
131 | " | ||
132 | #[derive(Debug<|>)] | ||
133 | pub struct Foo { | ||
134 | bar: String, | ||
135 | } | ||
136 | ", | ||
137 | " | ||
138 | pub struct Foo { | ||
139 | bar: String, | ||
140 | } | ||
141 | |||
142 | impl Debug for Foo { | ||
143 | $0 | ||
144 | } | ||
145 | ", | ||
146 | ) | ||
147 | } | ||
148 | |||
149 | #[test] | ||
150 | fn add_custom_impl_when_multiple_inputs() { | ||
151 | check_assist( | ||
152 | add_custom_impl, | ||
153 | " | ||
154 | #[derive(Display, Debug<|>, Serialize)] | ||
155 | struct Foo {} | ||
156 | ", | ||
157 | " | ||
158 | #[derive(Display, Serialize)] | ||
159 | struct Foo {} | ||
160 | |||
161 | impl Debug for Foo { | ||
162 | $0 | ||
163 | } | ||
164 | ", | ||
165 | ) | ||
166 | } | ||
167 | |||
168 | #[test] | ||
169 | fn test_ignore_derive_macro_without_input() { | ||
170 | check_assist_not_applicable( | ||
171 | add_custom_impl, | ||
172 | " | ||
173 | #[derive(<|>)] | ||
174 | struct Foo {} | ||
175 | ", | ||
176 | ) | ||
177 | } | ||
178 | |||
179 | #[test] | ||
180 | fn test_ignore_if_cursor_on_param() { | ||
181 | check_assist_not_applicable( | ||
182 | add_custom_impl, | ||
183 | " | ||
184 | #[derive<|>(Debug)] | ||
185 | struct Foo {} | ||
186 | ", | ||
187 | ); | ||
188 | |||
189 | check_assist_not_applicable( | ||
190 | add_custom_impl, | ||
191 | " | ||
192 | #[derive(Debug)<|>] | ||
193 | struct Foo {} | ||
194 | ", | ||
195 | ) | ||
196 | } | ||
197 | |||
198 | #[test] | ||
199 | fn test_ignore_if_not_derive() { | ||
200 | check_assist_not_applicable( | ||
201 | add_custom_impl, | ||
202 | " | ||
203 | #[allow(non_camel_<|>case_types)] | ||
204 | struct Foo {} | ||
205 | ", | ||
206 | ) | ||
207 | } | ||
208 | } | ||
diff --git a/crates/assists/src/handlers/add_explicit_type.rs b/crates/assists/src/handlers/add_explicit_type.rs new file mode 100644 index 000000000..563cbf505 --- /dev/null +++ b/crates/assists/src/handlers/add_explicit_type.rs | |||
@@ -0,0 +1,211 @@ | |||
1 | use hir::HirDisplay; | ||
2 | use syntax::{ | ||
3 | ast::{self, AstNode, LetStmt, NameOwner}, | ||
4 | TextRange, | ||
5 | }; | ||
6 | |||
7 | use crate::{AssistContext, AssistId, AssistKind, Assists}; | ||
8 | |||
9 | // Assist: add_explicit_type | ||
10 | // | ||
11 | // Specify type for a let binding. | ||
12 | // | ||
13 | // ``` | ||
14 | // fn main() { | ||
15 | // let x<|> = 92; | ||
16 | // } | ||
17 | // ``` | ||
18 | // -> | ||
19 | // ``` | ||
20 | // fn main() { | ||
21 | // let x: i32 = 92; | ||
22 | // } | ||
23 | // ``` | ||
24 | pub(crate) fn add_explicit_type(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | ||
25 | let let_stmt = ctx.find_node_at_offset::<LetStmt>()?; | ||
26 | let module = ctx.sema.scope(let_stmt.syntax()).module()?; | ||
27 | let expr = let_stmt.initializer()?; | ||
28 | // Must be a binding | ||
29 | let pat = match let_stmt.pat()? { | ||
30 | ast::Pat::IdentPat(bind_pat) => bind_pat, | ||
31 | _ => return None, | ||
32 | }; | ||
33 | let pat_range = pat.syntax().text_range(); | ||
34 | // The binding must have a name | ||
35 | let name = pat.name()?; | ||
36 | let name_range = name.syntax().text_range(); | ||
37 | let stmt_range = let_stmt.syntax().text_range(); | ||
38 | let eq_range = let_stmt.eq_token()?.text_range(); | ||
39 | // Assist should only be applicable if cursor is between 'let' and '=' | ||
40 | let let_range = TextRange::new(stmt_range.start(), eq_range.start()); | ||
41 | let cursor_in_range = let_range.contains_range(ctx.frange.range); | ||
42 | if !cursor_in_range { | ||
43 | return None; | ||
44 | } | ||
45 | // Assist not applicable if the type has already been specified | ||
46 | // and it has no placeholders | ||
47 | let ascribed_ty = let_stmt.ty(); | ||
48 | if let Some(ty) = &ascribed_ty { | ||
49 | if ty.syntax().descendants().find_map(ast::InferType::cast).is_none() { | ||
50 | return None; | ||
51 | } | ||
52 | } | ||
53 | // Infer type | ||
54 | let ty = ctx.sema.type_of_expr(&expr)?; | ||
55 | |||
56 | if ty.contains_unknown() || ty.is_closure() { | ||
57 | return None; | ||
58 | } | ||
59 | |||
60 | let inferred_type = ty.display_source_code(ctx.db(), module.into()).ok()?; | ||
61 | acc.add( | ||
62 | AssistId("add_explicit_type", AssistKind::RefactorRewrite), | ||
63 | format!("Insert explicit type `{}`", inferred_type), | ||
64 | pat_range, | ||
65 | |builder| match ascribed_ty { | ||
66 | Some(ascribed_ty) => { | ||
67 | builder.replace(ascribed_ty.syntax().text_range(), inferred_type); | ||
68 | } | ||
69 | None => { | ||
70 | builder.insert(name_range.end(), format!(": {}", inferred_type)); | ||
71 | } | ||
72 | }, | ||
73 | ) | ||
74 | } | ||
75 | |||
76 | #[cfg(test)] | ||
77 | mod tests { | ||
78 | use super::*; | ||
79 | |||
80 | use crate::tests::{check_assist, check_assist_not_applicable, check_assist_target}; | ||
81 | |||
82 | #[test] | ||
83 | fn add_explicit_type_target() { | ||
84 | check_assist_target(add_explicit_type, "fn f() { let a<|> = 1; }", "a"); | ||
85 | } | ||
86 | |||
87 | #[test] | ||
88 | fn add_explicit_type_works_for_simple_expr() { | ||
89 | check_assist(add_explicit_type, "fn f() { let a<|> = 1; }", "fn f() { let a: i32 = 1; }"); | ||
90 | } | ||
91 | |||
92 | #[test] | ||
93 | fn add_explicit_type_works_for_underscore() { | ||
94 | check_assist( | ||
95 | add_explicit_type, | ||
96 | "fn f() { let a<|>: _ = 1; }", | ||
97 | "fn f() { let a: i32 = 1; }", | ||
98 | ); | ||
99 | } | ||
100 | |||
101 | #[test] | ||
102 | fn add_explicit_type_works_for_nested_underscore() { | ||
103 | check_assist( | ||
104 | add_explicit_type, | ||
105 | r#" | ||
106 | enum Option<T> { | ||
107 | Some(T), | ||
108 | None | ||
109 | } | ||
110 | |||
111 | fn f() { | ||
112 | let a<|>: Option<_> = Option::Some(1); | ||
113 | }"#, | ||
114 | r#" | ||
115 | enum Option<T> { | ||
116 | Some(T), | ||
117 | None | ||
118 | } | ||
119 | |||
120 | fn f() { | ||
121 | let a: Option<i32> = Option::Some(1); | ||
122 | }"#, | ||
123 | ); | ||
124 | } | ||
125 | |||
126 | #[test] | ||
127 | fn add_explicit_type_works_for_macro_call() { | ||
128 | check_assist( | ||
129 | add_explicit_type, | ||
130 | r"macro_rules! v { () => {0u64} } fn f() { let a<|> = v!(); }", | ||
131 | r"macro_rules! v { () => {0u64} } fn f() { let a: u64 = v!(); }", | ||
132 | ); | ||
133 | } | ||
134 | |||
135 | #[test] | ||
136 | fn add_explicit_type_works_for_macro_call_recursive() { | ||
137 | check_assist( | ||
138 | add_explicit_type, | ||
139 | r#"macro_rules! u { () => {0u64} } macro_rules! v { () => {u!()} } fn f() { let a<|> = v!(); }"#, | ||
140 | r#"macro_rules! u { () => {0u64} } macro_rules! v { () => {u!()} } fn f() { let a: u64 = v!(); }"#, | ||
141 | ); | ||
142 | } | ||
143 | |||
144 | #[test] | ||
145 | fn add_explicit_type_not_applicable_if_ty_not_inferred() { | ||
146 | check_assist_not_applicable(add_explicit_type, "fn f() { let a<|> = None; }"); | ||
147 | } | ||
148 | |||
149 | #[test] | ||
150 | fn add_explicit_type_not_applicable_if_ty_already_specified() { | ||
151 | check_assist_not_applicable(add_explicit_type, "fn f() { let a<|>: i32 = 1; }"); | ||
152 | } | ||
153 | |||
154 | #[test] | ||
155 | fn add_explicit_type_not_applicable_if_specified_ty_is_tuple() { | ||
156 | check_assist_not_applicable(add_explicit_type, "fn f() { let a<|>: (i32, i32) = (3, 4); }"); | ||
157 | } | ||
158 | |||
159 | #[test] | ||
160 | fn add_explicit_type_not_applicable_if_cursor_after_equals() { | ||
161 | check_assist_not_applicable( | ||
162 | add_explicit_type, | ||
163 | "fn f() {let a =<|> match 1 {2 => 3, 3 => 5};}", | ||
164 | ) | ||
165 | } | ||
166 | |||
167 | #[test] | ||
168 | fn add_explicit_type_not_applicable_if_cursor_before_let() { | ||
169 | check_assist_not_applicable( | ||
170 | add_explicit_type, | ||
171 | "fn f() <|>{let a = match 1 {2 => 3, 3 => 5};}", | ||
172 | ) | ||
173 | } | ||
174 | |||
175 | #[test] | ||
176 | fn closure_parameters_are_not_added() { | ||
177 | check_assist_not_applicable( | ||
178 | add_explicit_type, | ||
179 | r#" | ||
180 | fn main() { | ||
181 | let multiply_by_two<|> = |i| i * 3; | ||
182 | let six = multiply_by_two(2); | ||
183 | }"#, | ||
184 | ) | ||
185 | } | ||
186 | |||
187 | #[test] | ||
188 | fn default_generics_should_not_be_added() { | ||
189 | check_assist( | ||
190 | add_explicit_type, | ||
191 | r#" | ||
192 | struct Test<K, T = u8> { | ||
193 | k: K, | ||
194 | t: T, | ||
195 | } | ||
196 | |||
197 | fn main() { | ||
198 | let test<|> = Test { t: 23u8, k: 33 }; | ||
199 | }"#, | ||
200 | r#" | ||
201 | struct Test<K, T = u8> { | ||
202 | k: K, | ||
203 | t: T, | ||
204 | } | ||
205 | |||
206 | fn main() { | ||
207 | let test: Test<i32> = Test { t: 23u8, k: 33 }; | ||
208 | }"#, | ||
209 | ); | ||
210 | } | ||
211 | } | ||
diff --git a/crates/assists/src/handlers/add_missing_impl_members.rs b/crates/assists/src/handlers/add_missing_impl_members.rs new file mode 100644 index 000000000..83a2ada9a --- /dev/null +++ b/crates/assists/src/handlers/add_missing_impl_members.rs | |||
@@ -0,0 +1,766 @@ | |||
1 | use hir::HasSource; | ||
2 | use syntax::{ | ||
3 | ast::{ | ||
4 | self, | ||
5 | edit::{self, AstNodeEdit, IndentLevel}, | ||
6 | make, AstNode, NameOwner, | ||
7 | }, | ||
8 | SmolStr, | ||
9 | }; | ||
10 | |||
11 | use crate::{ | ||
12 | assist_context::{AssistContext, Assists}, | ||
13 | ast_transform::{self, AstTransform, QualifyPaths, SubstituteTypeParams}, | ||
14 | utils::{get_missing_assoc_items, render_snippet, resolve_target_trait, Cursor}, | ||
15 | AssistId, AssistKind, | ||
16 | }; | ||
17 | |||
18 | #[derive(PartialEq)] | ||
19 | enum AddMissingImplMembersMode { | ||
20 | DefaultMethodsOnly, | ||
21 | NoDefaultMethods, | ||
22 | } | ||
23 | |||
24 | // Assist: add_impl_missing_members | ||
25 | // | ||
26 | // Adds scaffold for required impl members. | ||
27 | // | ||
28 | // ``` | ||
29 | // trait Trait<T> { | ||
30 | // Type X; | ||
31 | // fn foo(&self) -> T; | ||
32 | // fn bar(&self) {} | ||
33 | // } | ||
34 | // | ||
35 | // impl Trait<u32> for () {<|> | ||
36 | // | ||
37 | // } | ||
38 | // ``` | ||
39 | // -> | ||
40 | // ``` | ||
41 | // trait Trait<T> { | ||
42 | // Type X; | ||
43 | // fn foo(&self) -> T; | ||
44 | // fn bar(&self) {} | ||
45 | // } | ||
46 | // | ||
47 | // impl Trait<u32> for () { | ||
48 | // fn foo(&self) -> u32 { | ||
49 | // ${0:todo!()} | ||
50 | // } | ||
51 | // } | ||
52 | // ``` | ||
53 | pub(crate) fn add_missing_impl_members(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | ||
54 | add_missing_impl_members_inner( | ||
55 | acc, | ||
56 | ctx, | ||
57 | AddMissingImplMembersMode::NoDefaultMethods, | ||
58 | "add_impl_missing_members", | ||
59 | "Implement missing members", | ||
60 | ) | ||
61 | } | ||
62 | |||
63 | // Assist: add_impl_default_members | ||
64 | // | ||
65 | // Adds scaffold for overriding default impl members. | ||
66 | // | ||
67 | // ``` | ||
68 | // trait Trait { | ||
69 | // Type X; | ||
70 | // fn foo(&self); | ||
71 | // fn bar(&self) {} | ||
72 | // } | ||
73 | // | ||
74 | // impl Trait for () { | ||
75 | // Type X = (); | ||
76 | // fn foo(&self) {}<|> | ||
77 | // | ||
78 | // } | ||
79 | // ``` | ||
80 | // -> | ||
81 | // ``` | ||
82 | // trait Trait { | ||
83 | // Type X; | ||
84 | // fn foo(&self); | ||
85 | // fn bar(&self) {} | ||
86 | // } | ||
87 | // | ||
88 | // impl Trait for () { | ||
89 | // Type X = (); | ||
90 | // fn foo(&self) {} | ||
91 | // | ||
92 | // $0fn bar(&self) {} | ||
93 | // } | ||
94 | // ``` | ||
95 | pub(crate) fn add_missing_default_members(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | ||
96 | add_missing_impl_members_inner( | ||
97 | acc, | ||
98 | ctx, | ||
99 | AddMissingImplMembersMode::DefaultMethodsOnly, | ||
100 | "add_impl_default_members", | ||
101 | "Implement default members", | ||
102 | ) | ||
103 | } | ||
104 | |||
105 | fn add_missing_impl_members_inner( | ||
106 | acc: &mut Assists, | ||
107 | ctx: &AssistContext, | ||
108 | mode: AddMissingImplMembersMode, | ||
109 | assist_id: &'static str, | ||
110 | label: &'static str, | ||
111 | ) -> Option<()> { | ||
112 | let _p = profile::span("add_missing_impl_members_inner"); | ||
113 | let impl_def = ctx.find_node_at_offset::<ast::Impl>()?; | ||
114 | let impl_item_list = impl_def.assoc_item_list()?; | ||
115 | |||
116 | let trait_ = resolve_target_trait(&ctx.sema, &impl_def)?; | ||
117 | |||
118 | let def_name = |item: &ast::AssocItem| -> Option<SmolStr> { | ||
119 | match item { | ||
120 | ast::AssocItem::Fn(def) => def.name(), | ||
121 | ast::AssocItem::TypeAlias(def) => def.name(), | ||
122 | ast::AssocItem::Const(def) => def.name(), | ||
123 | ast::AssocItem::MacroCall(_) => None, | ||
124 | } | ||
125 | .map(|it| it.text().clone()) | ||
126 | }; | ||
127 | |||
128 | let missing_items = get_missing_assoc_items(&ctx.sema, &impl_def) | ||
129 | .iter() | ||
130 | .map(|i| match i { | ||
131 | hir::AssocItem::Function(i) => ast::AssocItem::Fn(i.source(ctx.db()).value), | ||
132 | hir::AssocItem::TypeAlias(i) => ast::AssocItem::TypeAlias(i.source(ctx.db()).value), | ||
133 | hir::AssocItem::Const(i) => ast::AssocItem::Const(i.source(ctx.db()).value), | ||
134 | }) | ||
135 | .filter(|t| def_name(&t).is_some()) | ||
136 | .filter(|t| match t { | ||
137 | ast::AssocItem::Fn(def) => match mode { | ||
138 | AddMissingImplMembersMode::DefaultMethodsOnly => def.body().is_some(), | ||
139 | AddMissingImplMembersMode::NoDefaultMethods => def.body().is_none(), | ||
140 | }, | ||
141 | _ => mode == AddMissingImplMembersMode::NoDefaultMethods, | ||
142 | }) | ||
143 | .collect::<Vec<_>>(); | ||
144 | |||
145 | if missing_items.is_empty() { | ||
146 | return None; | ||
147 | } | ||
148 | |||
149 | let target = impl_def.syntax().text_range(); | ||
150 | acc.add(AssistId(assist_id, AssistKind::QuickFix), label, target, |builder| { | ||
151 | let n_existing_items = impl_item_list.assoc_items().count(); | ||
152 | let source_scope = ctx.sema.scope_for_def(trait_); | ||
153 | let target_scope = ctx.sema.scope(impl_item_list.syntax()); | ||
154 | let ast_transform = QualifyPaths::new(&target_scope, &source_scope) | ||
155 | .or(SubstituteTypeParams::for_trait_impl(&source_scope, trait_, impl_def)); | ||
156 | let items = missing_items | ||
157 | .into_iter() | ||
158 | .map(|it| ast_transform::apply(&*ast_transform, it)) | ||
159 | .map(|it| match it { | ||
160 | ast::AssocItem::Fn(def) => ast::AssocItem::Fn(add_body(def)), | ||
161 | ast::AssocItem::TypeAlias(def) => ast::AssocItem::TypeAlias(def.remove_bounds()), | ||
162 | _ => it, | ||
163 | }) | ||
164 | .map(|it| edit::remove_attrs_and_docs(&it)); | ||
165 | let new_impl_item_list = impl_item_list.append_items(items); | ||
166 | let first_new_item = new_impl_item_list.assoc_items().nth(n_existing_items).unwrap(); | ||
167 | |||
168 | let original_range = impl_item_list.syntax().text_range(); | ||
169 | match ctx.config.snippet_cap { | ||
170 | None => builder.replace(original_range, new_impl_item_list.to_string()), | ||
171 | Some(cap) => { | ||
172 | let mut cursor = Cursor::Before(first_new_item.syntax()); | ||
173 | let placeholder; | ||
174 | if let ast::AssocItem::Fn(func) = &first_new_item { | ||
175 | if let Some(m) = func.syntax().descendants().find_map(ast::MacroCall::cast) { | ||
176 | if m.syntax().text() == "todo!()" { | ||
177 | placeholder = m; | ||
178 | cursor = Cursor::Replace(placeholder.syntax()); | ||
179 | } | ||
180 | } | ||
181 | } | ||
182 | builder.replace_snippet( | ||
183 | cap, | ||
184 | original_range, | ||
185 | render_snippet(cap, new_impl_item_list.syntax(), cursor), | ||
186 | ) | ||
187 | } | ||
188 | }; | ||
189 | }) | ||
190 | } | ||
191 | |||
192 | fn add_body(fn_def: ast::Fn) -> ast::Fn { | ||
193 | if fn_def.body().is_some() { | ||
194 | return fn_def; | ||
195 | } | ||
196 | let body = make::block_expr(None, Some(make::expr_todo())).indent(IndentLevel(1)); | ||
197 | fn_def.with_body(body) | ||
198 | } | ||
199 | |||
200 | #[cfg(test)] | ||
201 | mod tests { | ||
202 | use crate::tests::{check_assist, check_assist_not_applicable}; | ||
203 | |||
204 | use super::*; | ||
205 | |||
206 | #[test] | ||
207 | fn test_add_missing_impl_members() { | ||
208 | check_assist( | ||
209 | add_missing_impl_members, | ||
210 | r#" | ||
211 | trait Foo { | ||
212 | type Output; | ||
213 | |||
214 | const CONST: usize = 42; | ||
215 | |||
216 | fn foo(&self); | ||
217 | fn bar(&self); | ||
218 | fn baz(&self); | ||
219 | } | ||
220 | |||
221 | struct S; | ||
222 | |||
223 | impl Foo for S { | ||
224 | fn bar(&self) {} | ||
225 | <|> | ||
226 | }"#, | ||
227 | r#" | ||
228 | trait Foo { | ||
229 | type Output; | ||
230 | |||
231 | const CONST: usize = 42; | ||
232 | |||
233 | fn foo(&self); | ||
234 | fn bar(&self); | ||
235 | fn baz(&self); | ||
236 | } | ||
237 | |||
238 | struct S; | ||
239 | |||
240 | impl Foo for S { | ||
241 | fn bar(&self) {} | ||
242 | |||
243 | $0type Output; | ||
244 | |||
245 | const CONST: usize = 42; | ||
246 | |||
247 | fn foo(&self) { | ||
248 | todo!() | ||
249 | } | ||
250 | |||
251 | fn baz(&self) { | ||
252 | todo!() | ||
253 | } | ||
254 | }"#, | ||
255 | ); | ||
256 | } | ||
257 | |||
258 | #[test] | ||
259 | fn test_copied_overriden_members() { | ||
260 | check_assist( | ||
261 | add_missing_impl_members, | ||
262 | r#" | ||
263 | trait Foo { | ||
264 | fn foo(&self); | ||
265 | fn bar(&self) -> bool { true } | ||
266 | fn baz(&self) -> u32 { 42 } | ||
267 | } | ||
268 | |||
269 | struct S; | ||
270 | |||
271 | impl Foo for S { | ||
272 | fn bar(&self) {} | ||
273 | <|> | ||
274 | }"#, | ||
275 | r#" | ||
276 | trait Foo { | ||
277 | fn foo(&self); | ||
278 | fn bar(&self) -> bool { true } | ||
279 | fn baz(&self) -> u32 { 42 } | ||
280 | } | ||
281 | |||
282 | struct S; | ||
283 | |||
284 | impl Foo for S { | ||
285 | fn bar(&self) {} | ||
286 | |||
287 | fn foo(&self) { | ||
288 | ${0:todo!()} | ||
289 | } | ||
290 | }"#, | ||
291 | ); | ||
292 | } | ||
293 | |||
294 | #[test] | ||
295 | fn test_empty_impl_def() { | ||
296 | check_assist( | ||
297 | add_missing_impl_members, | ||
298 | r#" | ||
299 | trait Foo { fn foo(&self); } | ||
300 | struct S; | ||
301 | impl Foo for S { <|> }"#, | ||
302 | r#" | ||
303 | trait Foo { fn foo(&self); } | ||
304 | struct S; | ||
305 | impl Foo for S { | ||
306 | fn foo(&self) { | ||
307 | ${0:todo!()} | ||
308 | } | ||
309 | }"#, | ||
310 | ); | ||
311 | } | ||
312 | |||
313 | #[test] | ||
314 | fn fill_in_type_params_1() { | ||
315 | check_assist( | ||
316 | add_missing_impl_members, | ||
317 | r#" | ||
318 | trait Foo<T> { fn foo(&self, t: T) -> &T; } | ||
319 | struct S; | ||
320 | impl Foo<u32> for S { <|> }"#, | ||
321 | r#" | ||
322 | trait Foo<T> { fn foo(&self, t: T) -> &T; } | ||
323 | struct S; | ||
324 | impl Foo<u32> for S { | ||
325 | fn foo(&self, t: u32) -> &u32 { | ||
326 | ${0:todo!()} | ||
327 | } | ||
328 | }"#, | ||
329 | ); | ||
330 | } | ||
331 | |||
332 | #[test] | ||
333 | fn fill_in_type_params_2() { | ||
334 | check_assist( | ||
335 | add_missing_impl_members, | ||
336 | r#" | ||
337 | trait Foo<T> { fn foo(&self, t: T) -> &T; } | ||
338 | struct S; | ||
339 | impl<U> Foo<U> for S { <|> }"#, | ||
340 | r#" | ||
341 | trait Foo<T> { fn foo(&self, t: T) -> &T; } | ||
342 | struct S; | ||
343 | impl<U> Foo<U> for S { | ||
344 | fn foo(&self, t: U) -> &U { | ||
345 | ${0:todo!()} | ||
346 | } | ||
347 | }"#, | ||
348 | ); | ||
349 | } | ||
350 | |||
351 | #[test] | ||
352 | fn test_cursor_after_empty_impl_def() { | ||
353 | check_assist( | ||
354 | add_missing_impl_members, | ||
355 | r#" | ||
356 | trait Foo { fn foo(&self); } | ||
357 | struct S; | ||
358 | impl Foo for S {}<|>"#, | ||
359 | r#" | ||
360 | trait Foo { fn foo(&self); } | ||
361 | struct S; | ||
362 | impl Foo for S { | ||
363 | fn foo(&self) { | ||
364 | ${0:todo!()} | ||
365 | } | ||
366 | }"#, | ||
367 | ) | ||
368 | } | ||
369 | |||
370 | #[test] | ||
371 | fn test_qualify_path_1() { | ||
372 | check_assist( | ||
373 | add_missing_impl_members, | ||
374 | r#" | ||
375 | mod foo { | ||
376 | pub struct Bar; | ||
377 | trait Foo { fn foo(&self, bar: Bar); } | ||
378 | } | ||
379 | struct S; | ||
380 | impl foo::Foo for S { <|> }"#, | ||
381 | r#" | ||
382 | mod foo { | ||
383 | pub struct Bar; | ||
384 | trait Foo { fn foo(&self, bar: Bar); } | ||
385 | } | ||
386 | struct S; | ||
387 | impl foo::Foo for S { | ||
388 | fn foo(&self, bar: foo::Bar) { | ||
389 | ${0:todo!()} | ||
390 | } | ||
391 | }"#, | ||
392 | ); | ||
393 | } | ||
394 | |||
395 | #[test] | ||
396 | fn test_qualify_path_generic() { | ||
397 | check_assist( | ||
398 | add_missing_impl_members, | ||
399 | r#" | ||
400 | mod foo { | ||
401 | pub struct Bar<T>; | ||
402 | trait Foo { fn foo(&self, bar: Bar<u32>); } | ||
403 | } | ||
404 | struct S; | ||
405 | impl foo::Foo for S { <|> }"#, | ||
406 | r#" | ||
407 | mod foo { | ||
408 | pub struct Bar<T>; | ||
409 | trait Foo { fn foo(&self, bar: Bar<u32>); } | ||
410 | } | ||
411 | struct S; | ||
412 | impl foo::Foo for S { | ||
413 | fn foo(&self, bar: foo::Bar<u32>) { | ||
414 | ${0:todo!()} | ||
415 | } | ||
416 | }"#, | ||
417 | ); | ||
418 | } | ||
419 | |||
420 | #[test] | ||
421 | fn test_qualify_path_and_substitute_param() { | ||
422 | check_assist( | ||
423 | add_missing_impl_members, | ||
424 | r#" | ||
425 | mod foo { | ||
426 | pub struct Bar<T>; | ||
427 | trait Foo<T> { fn foo(&self, bar: Bar<T>); } | ||
428 | } | ||
429 | struct S; | ||
430 | impl foo::Foo<u32> for S { <|> }"#, | ||
431 | r#" | ||
432 | mod foo { | ||
433 | pub struct Bar<T>; | ||
434 | trait Foo<T> { fn foo(&self, bar: Bar<T>); } | ||
435 | } | ||
436 | struct S; | ||
437 | impl foo::Foo<u32> for S { | ||
438 | fn foo(&self, bar: foo::Bar<u32>) { | ||
439 | ${0:todo!()} | ||
440 | } | ||
441 | }"#, | ||
442 | ); | ||
443 | } | ||
444 | |||
445 | #[test] | ||
446 | fn test_substitute_param_no_qualify() { | ||
447 | // when substituting params, the substituted param should not be qualified! | ||
448 | check_assist( | ||
449 | add_missing_impl_members, | ||
450 | r#" | ||
451 | mod foo { | ||
452 | trait Foo<T> { fn foo(&self, bar: T); } | ||
453 | pub struct Param; | ||
454 | } | ||
455 | struct Param; | ||
456 | struct S; | ||
457 | impl foo::Foo<Param> for S { <|> }"#, | ||
458 | r#" | ||
459 | mod foo { | ||
460 | trait Foo<T> { fn foo(&self, bar: T); } | ||
461 | pub struct Param; | ||
462 | } | ||
463 | struct Param; | ||
464 | struct S; | ||
465 | impl foo::Foo<Param> for S { | ||
466 | fn foo(&self, bar: Param) { | ||
467 | ${0:todo!()} | ||
468 | } | ||
469 | }"#, | ||
470 | ); | ||
471 | } | ||
472 | |||
473 | #[test] | ||
474 | fn test_qualify_path_associated_item() { | ||
475 | check_assist( | ||
476 | add_missing_impl_members, | ||
477 | r#" | ||
478 | mod foo { | ||
479 | pub struct Bar<T>; | ||
480 | impl Bar<T> { type Assoc = u32; } | ||
481 | trait Foo { fn foo(&self, bar: Bar<u32>::Assoc); } | ||
482 | } | ||
483 | struct S; | ||
484 | impl foo::Foo for S { <|> }"#, | ||
485 | r#" | ||
486 | mod foo { | ||
487 | pub struct Bar<T>; | ||
488 | impl Bar<T> { type Assoc = u32; } | ||
489 | trait Foo { fn foo(&self, bar: Bar<u32>::Assoc); } | ||
490 | } | ||
491 | struct S; | ||
492 | impl foo::Foo for S { | ||
493 | fn foo(&self, bar: foo::Bar<u32>::Assoc) { | ||
494 | ${0:todo!()} | ||
495 | } | ||
496 | }"#, | ||
497 | ); | ||
498 | } | ||
499 | |||
500 | #[test] | ||
501 | fn test_qualify_path_nested() { | ||
502 | check_assist( | ||
503 | add_missing_impl_members, | ||
504 | r#" | ||
505 | mod foo { | ||
506 | pub struct Bar<T>; | ||
507 | pub struct Baz; | ||
508 | trait Foo { fn foo(&self, bar: Bar<Baz>); } | ||
509 | } | ||
510 | struct S; | ||
511 | impl foo::Foo for S { <|> }"#, | ||
512 | r#" | ||
513 | mod foo { | ||
514 | pub struct Bar<T>; | ||
515 | pub struct Baz; | ||
516 | trait Foo { fn foo(&self, bar: Bar<Baz>); } | ||
517 | } | ||
518 | struct S; | ||
519 | impl foo::Foo for S { | ||
520 | fn foo(&self, bar: foo::Bar<foo::Baz>) { | ||
521 | ${0:todo!()} | ||
522 | } | ||
523 | }"#, | ||
524 | ); | ||
525 | } | ||
526 | |||
527 | #[test] | ||
528 | fn test_qualify_path_fn_trait_notation() { | ||
529 | check_assist( | ||
530 | add_missing_impl_members, | ||
531 | r#" | ||
532 | mod foo { | ||
533 | pub trait Fn<Args> { type Output; } | ||
534 | trait Foo { fn foo(&self, bar: dyn Fn(u32) -> i32); } | ||
535 | } | ||
536 | struct S; | ||
537 | impl foo::Foo for S { <|> }"#, | ||
538 | r#" | ||
539 | mod foo { | ||
540 | pub trait Fn<Args> { type Output; } | ||
541 | trait Foo { fn foo(&self, bar: dyn Fn(u32) -> i32); } | ||
542 | } | ||
543 | struct S; | ||
544 | impl foo::Foo for S { | ||
545 | fn foo(&self, bar: dyn Fn(u32) -> i32) { | ||
546 | ${0:todo!()} | ||
547 | } | ||
548 | }"#, | ||
549 | ); | ||
550 | } | ||
551 | |||
552 | #[test] | ||
553 | fn test_empty_trait() { | ||
554 | check_assist_not_applicable( | ||
555 | add_missing_impl_members, | ||
556 | r#" | ||
557 | trait Foo; | ||
558 | struct S; | ||
559 | impl Foo for S { <|> }"#, | ||
560 | ) | ||
561 | } | ||
562 | |||
563 | #[test] | ||
564 | fn test_ignore_unnamed_trait_members_and_default_methods() { | ||
565 | check_assist_not_applicable( | ||
566 | add_missing_impl_members, | ||
567 | r#" | ||
568 | trait Foo { | ||
569 | fn (arg: u32); | ||
570 | fn valid(some: u32) -> bool { false } | ||
571 | } | ||
572 | struct S; | ||
573 | impl Foo for S { <|> }"#, | ||
574 | ) | ||
575 | } | ||
576 | |||
577 | #[test] | ||
578 | fn test_with_docstring_and_attrs() { | ||
579 | check_assist( | ||
580 | add_missing_impl_members, | ||
581 | r#" | ||
582 | #[doc(alias = "test alias")] | ||
583 | trait Foo { | ||
584 | /// doc string | ||
585 | type Output; | ||
586 | |||
587 | #[must_use] | ||
588 | fn foo(&self); | ||
589 | } | ||
590 | struct S; | ||
591 | impl Foo for S {}<|>"#, | ||
592 | r#" | ||
593 | #[doc(alias = "test alias")] | ||
594 | trait Foo { | ||
595 | /// doc string | ||
596 | type Output; | ||
597 | |||
598 | #[must_use] | ||
599 | fn foo(&self); | ||
600 | } | ||
601 | struct S; | ||
602 | impl Foo for S { | ||
603 | $0type Output; | ||
604 | |||
605 | fn foo(&self) { | ||
606 | todo!() | ||
607 | } | ||
608 | }"#, | ||
609 | ) | ||
610 | } | ||
611 | |||
612 | #[test] | ||
613 | fn test_default_methods() { | ||
614 | check_assist( | ||
615 | add_missing_default_members, | ||
616 | r#" | ||
617 | trait Foo { | ||
618 | type Output; | ||
619 | |||
620 | const CONST: usize = 42; | ||
621 | |||
622 | fn valid(some: u32) -> bool { false } | ||
623 | fn foo(some: u32) -> bool; | ||
624 | } | ||
625 | struct S; | ||
626 | impl Foo for S { <|> }"#, | ||
627 | r#" | ||
628 | trait Foo { | ||
629 | type Output; | ||
630 | |||
631 | const CONST: usize = 42; | ||
632 | |||
633 | fn valid(some: u32) -> bool { false } | ||
634 | fn foo(some: u32) -> bool; | ||
635 | } | ||
636 | struct S; | ||
637 | impl Foo for S { | ||
638 | $0fn valid(some: u32) -> bool { false } | ||
639 | }"#, | ||
640 | ) | ||
641 | } | ||
642 | |||
643 | #[test] | ||
644 | fn test_generic_single_default_parameter() { | ||
645 | check_assist( | ||
646 | add_missing_impl_members, | ||
647 | r#" | ||
648 | trait Foo<T = Self> { | ||
649 | fn bar(&self, other: &T); | ||
650 | } | ||
651 | |||
652 | struct S; | ||
653 | impl Foo for S { <|> }"#, | ||
654 | r#" | ||
655 | trait Foo<T = Self> { | ||
656 | fn bar(&self, other: &T); | ||
657 | } | ||
658 | |||
659 | struct S; | ||
660 | impl Foo for S { | ||
661 | fn bar(&self, other: &Self) { | ||
662 | ${0:todo!()} | ||
663 | } | ||
664 | }"#, | ||
665 | ) | ||
666 | } | ||
667 | |||
668 | #[test] | ||
669 | fn test_generic_default_parameter_is_second() { | ||
670 | check_assist( | ||
671 | add_missing_impl_members, | ||
672 | r#" | ||
673 | trait Foo<T1, T2 = Self> { | ||
674 | fn bar(&self, this: &T1, that: &T2); | ||
675 | } | ||
676 | |||
677 | struct S<T>; | ||
678 | impl Foo<T> for S<T> { <|> }"#, | ||
679 | r#" | ||
680 | trait Foo<T1, T2 = Self> { | ||
681 | fn bar(&self, this: &T1, that: &T2); | ||
682 | } | ||
683 | |||
684 | struct S<T>; | ||
685 | impl Foo<T> for S<T> { | ||
686 | fn bar(&self, this: &T, that: &Self) { | ||
687 | ${0:todo!()} | ||
688 | } | ||
689 | }"#, | ||
690 | ) | ||
691 | } | ||
692 | |||
693 | #[test] | ||
694 | fn test_assoc_type_bounds_are_removed() { | ||
695 | check_assist( | ||
696 | add_missing_impl_members, | ||
697 | r#" | ||
698 | trait Tr { | ||
699 | type Ty: Copy + 'static; | ||
700 | } | ||
701 | |||
702 | impl Tr for ()<|> { | ||
703 | }"#, | ||
704 | r#" | ||
705 | trait Tr { | ||
706 | type Ty: Copy + 'static; | ||
707 | } | ||
708 | |||
709 | impl Tr for () { | ||
710 | $0type Ty; | ||
711 | }"#, | ||
712 | ) | ||
713 | } | ||
714 | |||
715 | #[test] | ||
716 | fn test_whitespace_fixup_preserves_bad_tokens() { | ||
717 | check_assist( | ||
718 | add_missing_impl_members, | ||
719 | r#" | ||
720 | trait Tr { | ||
721 | fn foo(); | ||
722 | } | ||
723 | |||
724 | impl Tr for ()<|> { | ||
725 | +++ | ||
726 | }"#, | ||
727 | r#" | ||
728 | trait Tr { | ||
729 | fn foo(); | ||
730 | } | ||
731 | |||
732 | impl Tr for () { | ||
733 | fn foo() { | ||
734 | ${0:todo!()} | ||
735 | } | ||
736 | +++ | ||
737 | }"#, | ||
738 | ) | ||
739 | } | ||
740 | |||
741 | #[test] | ||
742 | fn test_whitespace_fixup_preserves_comments() { | ||
743 | check_assist( | ||
744 | add_missing_impl_members, | ||
745 | r#" | ||
746 | trait Tr { | ||
747 | fn foo(); | ||
748 | } | ||
749 | |||
750 | impl Tr for ()<|> { | ||
751 | // very important | ||
752 | }"#, | ||
753 | r#" | ||
754 | trait Tr { | ||
755 | fn foo(); | ||
756 | } | ||
757 | |||
758 | impl Tr for () { | ||
759 | fn foo() { | ||
760 | ${0:todo!()} | ||
761 | } | ||
762 | // very important | ||
763 | }"#, | ||
764 | ) | ||
765 | } | ||
766 | } | ||
diff --git a/crates/assists/src/handlers/add_turbo_fish.rs b/crates/assists/src/handlers/add_turbo_fish.rs new file mode 100644 index 000000000..f4f997d8e --- /dev/null +++ b/crates/assists/src/handlers/add_turbo_fish.rs | |||
@@ -0,0 +1,164 @@ | |||
1 | use ide_db::defs::{classify_name_ref, Definition, NameRefClass}; | ||
2 | use syntax::{ast, AstNode, SyntaxKind, T}; | ||
3 | use test_utils::mark; | ||
4 | |||
5 | use crate::{ | ||
6 | assist_context::{AssistContext, Assists}, | ||
7 | AssistId, AssistKind, | ||
8 | }; | ||
9 | |||
10 | // Assist: add_turbo_fish | ||
11 | // | ||
12 | // Adds `::<_>` to a call of a generic method or function. | ||
13 | // | ||
14 | // ``` | ||
15 | // fn make<T>() -> T { todo!() } | ||
16 | // fn main() { | ||
17 | // let x = make<|>(); | ||
18 | // } | ||
19 | // ``` | ||
20 | // -> | ||
21 | // ``` | ||
22 | // fn make<T>() -> T { todo!() } | ||
23 | // fn main() { | ||
24 | // let x = make::<${0:_}>(); | ||
25 | // } | ||
26 | // ``` | ||
27 | pub(crate) fn add_turbo_fish(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | ||
28 | let ident = ctx.find_token_at_offset(SyntaxKind::IDENT).or_else(|| { | ||
29 | let arg_list = ctx.find_node_at_offset::<ast::ArgList>()?; | ||
30 | if arg_list.args().count() > 0 { | ||
31 | return None; | ||
32 | } | ||
33 | mark::hit!(add_turbo_fish_after_call); | ||
34 | arg_list.l_paren_token()?.prev_token().filter(|it| it.kind() == SyntaxKind::IDENT) | ||
35 | })?; | ||
36 | let next_token = ident.next_token()?; | ||
37 | if next_token.kind() == T![::] { | ||
38 | mark::hit!(add_turbo_fish_one_fish_is_enough); | ||
39 | return None; | ||
40 | } | ||
41 | let name_ref = ast::NameRef::cast(ident.parent())?; | ||
42 | let def = match classify_name_ref(&ctx.sema, &name_ref)? { | ||
43 | NameRefClass::Definition(def) => def, | ||
44 | NameRefClass::ExternCrate(_) | NameRefClass::FieldShorthand { .. } => return None, | ||
45 | }; | ||
46 | let fun = match def { | ||
47 | Definition::ModuleDef(hir::ModuleDef::Function(it)) => it, | ||
48 | _ => return None, | ||
49 | }; | ||
50 | let generics = hir::GenericDef::Function(fun).params(ctx.sema.db); | ||
51 | if generics.is_empty() { | ||
52 | mark::hit!(add_turbo_fish_non_generic); | ||
53 | return None; | ||
54 | } | ||
55 | acc.add( | ||
56 | AssistId("add_turbo_fish", AssistKind::RefactorRewrite), | ||
57 | "Add `::<>`", | ||
58 | ident.text_range(), | ||
59 | |builder| match ctx.config.snippet_cap { | ||
60 | Some(cap) => builder.insert_snippet(cap, ident.text_range().end(), "::<${0:_}>"), | ||
61 | None => builder.insert(ident.text_range().end(), "::<_>"), | ||
62 | }, | ||
63 | ) | ||
64 | } | ||
65 | |||
66 | #[cfg(test)] | ||
67 | mod tests { | ||
68 | use crate::tests::{check_assist, check_assist_not_applicable}; | ||
69 | |||
70 | use super::*; | ||
71 | use test_utils::mark; | ||
72 | |||
73 | #[test] | ||
74 | fn add_turbo_fish_function() { | ||
75 | check_assist( | ||
76 | add_turbo_fish, | ||
77 | r#" | ||
78 | fn make<T>() -> T {} | ||
79 | fn main() { | ||
80 | make<|>(); | ||
81 | } | ||
82 | "#, | ||
83 | r#" | ||
84 | fn make<T>() -> T {} | ||
85 | fn main() { | ||
86 | make::<${0:_}>(); | ||
87 | } | ||
88 | "#, | ||
89 | ); | ||
90 | } | ||
91 | |||
92 | #[test] | ||
93 | fn add_turbo_fish_after_call() { | ||
94 | mark::check!(add_turbo_fish_after_call); | ||
95 | check_assist( | ||
96 | add_turbo_fish, | ||
97 | r#" | ||
98 | fn make<T>() -> T {} | ||
99 | fn main() { | ||
100 | make()<|>; | ||
101 | } | ||
102 | "#, | ||
103 | r#" | ||
104 | fn make<T>() -> T {} | ||
105 | fn main() { | ||
106 | make::<${0:_}>(); | ||
107 | } | ||
108 | "#, | ||
109 | ); | ||
110 | } | ||
111 | |||
112 | #[test] | ||
113 | fn add_turbo_fish_method() { | ||
114 | check_assist( | ||
115 | add_turbo_fish, | ||
116 | r#" | ||
117 | struct S; | ||
118 | impl S { | ||
119 | fn make<T>(&self) -> T {} | ||
120 | } | ||
121 | fn main() { | ||
122 | S.make<|>(); | ||
123 | } | ||
124 | "#, | ||
125 | r#" | ||
126 | struct S; | ||
127 | impl S { | ||
128 | fn make<T>(&self) -> T {} | ||
129 | } | ||
130 | fn main() { | ||
131 | S.make::<${0:_}>(); | ||
132 | } | ||
133 | "#, | ||
134 | ); | ||
135 | } | ||
136 | |||
137 | #[test] | ||
138 | fn add_turbo_fish_one_fish_is_enough() { | ||
139 | mark::check!(add_turbo_fish_one_fish_is_enough); | ||
140 | check_assist_not_applicable( | ||
141 | add_turbo_fish, | ||
142 | r#" | ||
143 | fn make<T>() -> T {} | ||
144 | fn main() { | ||
145 | make<|>::<()>(); | ||
146 | } | ||
147 | "#, | ||
148 | ); | ||
149 | } | ||
150 | |||
151 | #[test] | ||
152 | fn add_turbo_fish_non_generic() { | ||
153 | mark::check!(add_turbo_fish_non_generic); | ||
154 | check_assist_not_applicable( | ||
155 | add_turbo_fish, | ||
156 | r#" | ||
157 | fn make() -> () {} | ||
158 | fn main() { | ||
159 | make<|>(); | ||
160 | } | ||
161 | "#, | ||
162 | ); | ||
163 | } | ||
164 | } | ||
diff --git a/crates/assists/src/handlers/apply_demorgan.rs b/crates/assists/src/handlers/apply_demorgan.rs new file mode 100644 index 000000000..1a6fdafda --- /dev/null +++ b/crates/assists/src/handlers/apply_demorgan.rs | |||
@@ -0,0 +1,93 @@ | |||
1 | use syntax::ast::{self, AstNode}; | ||
2 | |||
3 | use crate::{utils::invert_boolean_expression, AssistContext, AssistId, AssistKind, Assists}; | ||
4 | |||
5 | // Assist: apply_demorgan | ||
6 | // | ||
7 | // Apply https://en.wikipedia.org/wiki/De_Morgan%27s_laws[De Morgan's law]. | ||
8 | // This transforms expressions of the form `!l || !r` into `!(l && r)`. | ||
9 | // This also works with `&&`. This assist can only be applied with the cursor | ||
10 | // on either `||` or `&&`, with both operands being a negation of some kind. | ||
11 | // This means something of the form `!x` or `x != y`. | ||
12 | // | ||
13 | // ``` | ||
14 | // fn main() { | ||
15 | // if x != 4 ||<|> !y {} | ||
16 | // } | ||
17 | // ``` | ||
18 | // -> | ||
19 | // ``` | ||
20 | // fn main() { | ||
21 | // if !(x == 4 && y) {} | ||
22 | // } | ||
23 | // ``` | ||
24 | pub(crate) fn apply_demorgan(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | ||
25 | let expr = ctx.find_node_at_offset::<ast::BinExpr>()?; | ||
26 | let op = expr.op_kind()?; | ||
27 | let op_range = expr.op_token()?.text_range(); | ||
28 | let opposite_op = opposite_logic_op(op)?; | ||
29 | let cursor_in_range = op_range.contains_range(ctx.frange.range); | ||
30 | if !cursor_in_range { | ||
31 | return None; | ||
32 | } | ||
33 | |||
34 | let lhs = expr.lhs()?; | ||
35 | let lhs_range = lhs.syntax().text_range(); | ||
36 | let not_lhs = invert_boolean_expression(lhs); | ||
37 | |||
38 | let rhs = expr.rhs()?; | ||
39 | let rhs_range = rhs.syntax().text_range(); | ||
40 | let not_rhs = invert_boolean_expression(rhs); | ||
41 | |||
42 | acc.add( | ||
43 | AssistId("apply_demorgan", AssistKind::RefactorRewrite), | ||
44 | "Apply De Morgan's law", | ||
45 | op_range, | ||
46 | |edit| { | ||
47 | edit.replace(op_range, opposite_op); | ||
48 | edit.replace(lhs_range, format!("!({}", not_lhs.syntax().text())); | ||
49 | edit.replace(rhs_range, format!("{})", not_rhs.syntax().text())); | ||
50 | }, | ||
51 | ) | ||
52 | } | ||
53 | |||
54 | // Return the opposite text for a given logical operator, if it makes sense | ||
55 | fn opposite_logic_op(kind: ast::BinOp) -> Option<&'static str> { | ||
56 | match kind { | ||
57 | ast::BinOp::BooleanOr => Some("&&"), | ||
58 | ast::BinOp::BooleanAnd => Some("||"), | ||
59 | _ => None, | ||
60 | } | ||
61 | } | ||
62 | |||
63 | #[cfg(test)] | ||
64 | mod tests { | ||
65 | use super::*; | ||
66 | |||
67 | use crate::tests::{check_assist, check_assist_not_applicable}; | ||
68 | |||
69 | #[test] | ||
70 | fn demorgan_turns_and_into_or() { | ||
71 | check_assist(apply_demorgan, "fn f() { !x &&<|> !x }", "fn f() { !(x || x) }") | ||
72 | } | ||
73 | |||
74 | #[test] | ||
75 | fn demorgan_turns_or_into_and() { | ||
76 | check_assist(apply_demorgan, "fn f() { !x ||<|> !x }", "fn f() { !(x && x) }") | ||
77 | } | ||
78 | |||
79 | #[test] | ||
80 | fn demorgan_removes_inequality() { | ||
81 | check_assist(apply_demorgan, "fn f() { x != x ||<|> !x }", "fn f() { !(x == x && x) }") | ||
82 | } | ||
83 | |||
84 | #[test] | ||
85 | fn demorgan_general_case() { | ||
86 | check_assist(apply_demorgan, "fn f() { x ||<|> x }", "fn f() { !(!x && !x) }") | ||
87 | } | ||
88 | |||
89 | #[test] | ||
90 | fn demorgan_doesnt_apply_with_cursor_not_on_op() { | ||
91 | check_assist_not_applicable(apply_demorgan, "fn f() { <|> !x || !x }") | ||
92 | } | ||
93 | } | ||
diff --git a/crates/assists/src/handlers/auto_import.rs b/crates/assists/src/handlers/auto_import.rs new file mode 100644 index 000000000..b9ec3f10b --- /dev/null +++ b/crates/assists/src/handlers/auto_import.rs | |||
@@ -0,0 +1,1088 @@ | |||
1 | use std::collections::BTreeSet; | ||
2 | |||
3 | use either::Either; | ||
4 | use hir::{ | ||
5 | AsAssocItem, AssocItemContainer, ModPath, Module, ModuleDef, PathResolution, Semantics, Trait, | ||
6 | Type, | ||
7 | }; | ||
8 | use ide_db::{imports_locator, RootDatabase}; | ||
9 | use rustc_hash::FxHashSet; | ||
10 | use syntax::{ | ||
11 | ast::{self, AstNode}, | ||
12 | SyntaxNode, | ||
13 | }; | ||
14 | |||
15 | use crate::{ | ||
16 | utils::insert_use_statement, AssistContext, AssistId, AssistKind, Assists, GroupLabel, | ||
17 | }; | ||
18 | |||
19 | // Assist: auto_import | ||
20 | // | ||
21 | // If the name is unresolved, provides all possible imports for it. | ||
22 | // | ||
23 | // ``` | ||
24 | // fn main() { | ||
25 | // let map = HashMap<|>::new(); | ||
26 | // } | ||
27 | // # pub mod std { pub mod collections { pub struct HashMap { } } } | ||
28 | // ``` | ||
29 | // -> | ||
30 | // ``` | ||
31 | // use std::collections::HashMap; | ||
32 | // | ||
33 | // fn main() { | ||
34 | // let map = HashMap::new(); | ||
35 | // } | ||
36 | // # pub mod std { pub mod collections { pub struct HashMap { } } } | ||
37 | // ``` | ||
38 | pub(crate) fn auto_import(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | ||
39 | let auto_import_assets = AutoImportAssets::new(ctx)?; | ||
40 | let proposed_imports = auto_import_assets.search_for_imports(ctx); | ||
41 | if proposed_imports.is_empty() { | ||
42 | return None; | ||
43 | } | ||
44 | |||
45 | let range = ctx.sema.original_range(&auto_import_assets.syntax_under_caret).range; | ||
46 | let group = auto_import_assets.get_import_group_message(); | ||
47 | for import in proposed_imports { | ||
48 | acc.add_group( | ||
49 | &group, | ||
50 | AssistId("auto_import", AssistKind::QuickFix), | ||
51 | format!("Import `{}`", &import), | ||
52 | range, | ||
53 | |builder| { | ||
54 | insert_use_statement( | ||
55 | &auto_import_assets.syntax_under_caret, | ||
56 | &import.to_string(), | ||
57 | ctx, | ||
58 | builder.text_edit_builder(), | ||
59 | ); | ||
60 | }, | ||
61 | ); | ||
62 | } | ||
63 | Some(()) | ||
64 | } | ||
65 | |||
66 | #[derive(Debug)] | ||
67 | struct AutoImportAssets { | ||
68 | import_candidate: ImportCandidate, | ||
69 | module_with_name_to_import: Module, | ||
70 | syntax_under_caret: SyntaxNode, | ||
71 | } | ||
72 | |||
73 | impl AutoImportAssets { | ||
74 | fn new(ctx: &AssistContext) -> Option<Self> { | ||
75 | if let Some(path_under_caret) = ctx.find_node_at_offset_with_descend::<ast::Path>() { | ||
76 | Self::for_regular_path(path_under_caret, &ctx) | ||
77 | } else { | ||
78 | Self::for_method_call(ctx.find_node_at_offset_with_descend()?, &ctx) | ||
79 | } | ||
80 | } | ||
81 | |||
82 | fn for_method_call(method_call: ast::MethodCallExpr, ctx: &AssistContext) -> Option<Self> { | ||
83 | let syntax_under_caret = method_call.syntax().to_owned(); | ||
84 | let module_with_name_to_import = ctx.sema.scope(&syntax_under_caret).module()?; | ||
85 | Some(Self { | ||
86 | import_candidate: ImportCandidate::for_method_call(&ctx.sema, &method_call)?, | ||
87 | module_with_name_to_import, | ||
88 | syntax_under_caret, | ||
89 | }) | ||
90 | } | ||
91 | |||
92 | fn for_regular_path(path_under_caret: ast::Path, ctx: &AssistContext) -> Option<Self> { | ||
93 | let syntax_under_caret = path_under_caret.syntax().to_owned(); | ||
94 | if syntax_under_caret.ancestors().find_map(ast::Use::cast).is_some() { | ||
95 | return None; | ||
96 | } | ||
97 | |||
98 | let module_with_name_to_import = ctx.sema.scope(&syntax_under_caret).module()?; | ||
99 | Some(Self { | ||
100 | import_candidate: ImportCandidate::for_regular_path(&ctx.sema, &path_under_caret)?, | ||
101 | module_with_name_to_import, | ||
102 | syntax_under_caret, | ||
103 | }) | ||
104 | } | ||
105 | |||
106 | fn get_search_query(&self) -> &str { | ||
107 | match &self.import_candidate { | ||
108 | ImportCandidate::UnqualifiedName(name) => name, | ||
109 | ImportCandidate::QualifierStart(qualifier_start) => qualifier_start, | ||
110 | ImportCandidate::TraitAssocItem(_, trait_assoc_item_name) => trait_assoc_item_name, | ||
111 | ImportCandidate::TraitMethod(_, trait_method_name) => trait_method_name, | ||
112 | } | ||
113 | } | ||
114 | |||
115 | fn get_import_group_message(&self) -> GroupLabel { | ||
116 | let name = match &self.import_candidate { | ||
117 | ImportCandidate::UnqualifiedName(name) => format!("Import {}", name), | ||
118 | ImportCandidate::QualifierStart(qualifier_start) => { | ||
119 | format!("Import {}", qualifier_start) | ||
120 | } | ||
121 | ImportCandidate::TraitAssocItem(_, trait_assoc_item_name) => { | ||
122 | format!("Import a trait for item {}", trait_assoc_item_name) | ||
123 | } | ||
124 | ImportCandidate::TraitMethod(_, trait_method_name) => { | ||
125 | format!("Import a trait for method {}", trait_method_name) | ||
126 | } | ||
127 | }; | ||
128 | GroupLabel(name) | ||
129 | } | ||
130 | |||
131 | fn search_for_imports(&self, ctx: &AssistContext) -> BTreeSet<ModPath> { | ||
132 | let _p = profile::span("auto_import::search_for_imports"); | ||
133 | let db = ctx.db(); | ||
134 | let current_crate = self.module_with_name_to_import.krate(); | ||
135 | imports_locator::find_imports(&ctx.sema, current_crate, &self.get_search_query()) | ||
136 | .into_iter() | ||
137 | .filter_map(|candidate| match &self.import_candidate { | ||
138 | ImportCandidate::TraitAssocItem(assoc_item_type, _) => { | ||
139 | let located_assoc_item = match candidate { | ||
140 | Either::Left(ModuleDef::Function(located_function)) => located_function | ||
141 | .as_assoc_item(db) | ||
142 | .map(|assoc| assoc.container(db)) | ||
143 | .and_then(Self::assoc_to_trait), | ||
144 | Either::Left(ModuleDef::Const(located_const)) => located_const | ||
145 | .as_assoc_item(db) | ||
146 | .map(|assoc| assoc.container(db)) | ||
147 | .and_then(Self::assoc_to_trait), | ||
148 | _ => None, | ||
149 | }?; | ||
150 | |||
151 | let mut trait_candidates = FxHashSet::default(); | ||
152 | trait_candidates.insert(located_assoc_item.into()); | ||
153 | |||
154 | assoc_item_type | ||
155 | .iterate_path_candidates( | ||
156 | db, | ||
157 | current_crate, | ||
158 | &trait_candidates, | ||
159 | None, | ||
160 | |_, assoc| Self::assoc_to_trait(assoc.container(db)), | ||
161 | ) | ||
162 | .map(ModuleDef::from) | ||
163 | .map(Either::Left) | ||
164 | } | ||
165 | ImportCandidate::TraitMethod(function_callee, _) => { | ||
166 | let located_assoc_item = | ||
167 | if let Either::Left(ModuleDef::Function(located_function)) = candidate { | ||
168 | located_function | ||
169 | .as_assoc_item(db) | ||
170 | .map(|assoc| assoc.container(db)) | ||
171 | .and_then(Self::assoc_to_trait) | ||
172 | } else { | ||
173 | None | ||
174 | }?; | ||
175 | |||
176 | let mut trait_candidates = FxHashSet::default(); | ||
177 | trait_candidates.insert(located_assoc_item.into()); | ||
178 | |||
179 | function_callee | ||
180 | .iterate_method_candidates( | ||
181 | db, | ||
182 | current_crate, | ||
183 | &trait_candidates, | ||
184 | None, | ||
185 | |_, function| { | ||
186 | Self::assoc_to_trait(function.as_assoc_item(db)?.container(db)) | ||
187 | }, | ||
188 | ) | ||
189 | .map(ModuleDef::from) | ||
190 | .map(Either::Left) | ||
191 | } | ||
192 | _ => Some(candidate), | ||
193 | }) | ||
194 | .filter_map(|candidate| match candidate { | ||
195 | Either::Left(module_def) => { | ||
196 | self.module_with_name_to_import.find_use_path(db, module_def) | ||
197 | } | ||
198 | Either::Right(macro_def) => { | ||
199 | self.module_with_name_to_import.find_use_path(db, macro_def) | ||
200 | } | ||
201 | }) | ||
202 | .filter(|use_path| !use_path.segments.is_empty()) | ||
203 | .take(20) | ||
204 | .collect::<BTreeSet<_>>() | ||
205 | } | ||
206 | |||
207 | fn assoc_to_trait(assoc: AssocItemContainer) -> Option<Trait> { | ||
208 | if let AssocItemContainer::Trait(extracted_trait) = assoc { | ||
209 | Some(extracted_trait) | ||
210 | } else { | ||
211 | None | ||
212 | } | ||
213 | } | ||
214 | } | ||
215 | |||
216 | #[derive(Debug)] | ||
217 | enum ImportCandidate { | ||
218 | /// Simple name like 'HashMap' | ||
219 | UnqualifiedName(String), | ||
220 | /// First part of the qualified name. | ||
221 | /// For 'std::collections::HashMap', that will be 'std'. | ||
222 | QualifierStart(String), | ||
223 | /// A trait associated function (with no self parameter) or associated constant. | ||
224 | /// For 'test_mod::TestEnum::test_function', `Type` is the `test_mod::TestEnum` expression type | ||
225 | /// and `String` is the `test_function` | ||
226 | TraitAssocItem(Type, String), | ||
227 | /// A trait method with self parameter. | ||
228 | /// For 'test_enum.test_method()', `Type` is the `test_enum` expression type | ||
229 | /// and `String` is the `test_method` | ||
230 | TraitMethod(Type, String), | ||
231 | } | ||
232 | |||
233 | impl ImportCandidate { | ||
234 | fn for_method_call( | ||
235 | sema: &Semantics<RootDatabase>, | ||
236 | method_call: &ast::MethodCallExpr, | ||
237 | ) -> Option<Self> { | ||
238 | if sema.resolve_method_call(method_call).is_some() { | ||
239 | return None; | ||
240 | } | ||
241 | Some(Self::TraitMethod( | ||
242 | sema.type_of_expr(&method_call.expr()?)?, | ||
243 | method_call.name_ref()?.syntax().to_string(), | ||
244 | )) | ||
245 | } | ||
246 | |||
247 | fn for_regular_path( | ||
248 | sema: &Semantics<RootDatabase>, | ||
249 | path_under_caret: &ast::Path, | ||
250 | ) -> Option<Self> { | ||
251 | if sema.resolve_path(path_under_caret).is_some() { | ||
252 | return None; | ||
253 | } | ||
254 | |||
255 | let segment = path_under_caret.segment()?; | ||
256 | if let Some(qualifier) = path_under_caret.qualifier() { | ||
257 | let qualifier_start = qualifier.syntax().descendants().find_map(ast::NameRef::cast)?; | ||
258 | let qualifier_start_path = | ||
259 | qualifier_start.syntax().ancestors().find_map(ast::Path::cast)?; | ||
260 | if let Some(qualifier_start_resolution) = sema.resolve_path(&qualifier_start_path) { | ||
261 | let qualifier_resolution = if qualifier_start_path == qualifier { | ||
262 | qualifier_start_resolution | ||
263 | } else { | ||
264 | sema.resolve_path(&qualifier)? | ||
265 | }; | ||
266 | if let PathResolution::Def(ModuleDef::Adt(assoc_item_path)) = qualifier_resolution { | ||
267 | Some(ImportCandidate::TraitAssocItem( | ||
268 | assoc_item_path.ty(sema.db), | ||
269 | segment.syntax().to_string(), | ||
270 | )) | ||
271 | } else { | ||
272 | None | ||
273 | } | ||
274 | } else { | ||
275 | Some(ImportCandidate::QualifierStart(qualifier_start.syntax().to_string())) | ||
276 | } | ||
277 | } else { | ||
278 | Some(ImportCandidate::UnqualifiedName( | ||
279 | segment.syntax().descendants().find_map(ast::NameRef::cast)?.syntax().to_string(), | ||
280 | )) | ||
281 | } | ||
282 | } | ||
283 | } | ||
284 | |||
285 | #[cfg(test)] | ||
286 | mod tests { | ||
287 | use super::*; | ||
288 | use crate::tests::{check_assist, check_assist_not_applicable, check_assist_target}; | ||
289 | |||
290 | #[test] | ||
291 | fn applicable_when_found_an_import() { | ||
292 | check_assist( | ||
293 | auto_import, | ||
294 | r" | ||
295 | <|>PubStruct | ||
296 | |||
297 | pub mod PubMod { | ||
298 | pub struct PubStruct; | ||
299 | } | ||
300 | ", | ||
301 | r" | ||
302 | use PubMod::PubStruct; | ||
303 | |||
304 | PubStruct | ||
305 | |||
306 | pub mod PubMod { | ||
307 | pub struct PubStruct; | ||
308 | } | ||
309 | ", | ||
310 | ); | ||
311 | } | ||
31 |