diff options
-rw-r--r-- | .gitattributes | 2 | ||||
-rw-r--r-- | .github/workflows/ci.yaml | 4 | ||||
-rw-r--r-- | Cargo.lock | 671 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | bors.toml | 3 | ||||
-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 | 206 | ||||
-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 | 711 | ||||
-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 | 391 | ||||
-rw-r--r-- | crates/assists/src/handlers/extract_struct_from_enum_variant.rs | 317 | ||||
-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 | 688 | ||||
-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 | 241 | ||||
-rw-r--r-- | crates/assists/src/tests.rs | 179 | ||||
-rw-r--r-- | crates/assists/src/tests/generated.rs | 892 | ||||
-rw-r--r-- | crates/assists/src/utils.rs | 313 | ||||
-rw-r--r-- | crates/assists/src/utils/insert_use.rs | 547 | ||||
-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/flycheck/Cargo.toml | 9 | ||||
-rw-r--r-- | crates/flycheck/src/lib.rs | 2 | ||||
-rw-r--r-- | crates/hir/Cargo.toml | 24 | ||||
-rw-r--r-- | crates/hir/src/code_model.rs | 1719 | ||||
-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 (renamed from crates/ra_hir/src/diagnostics.rs) | 0 | ||||
-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 | 63 | ||||
-rw-r--r-- | crates/hir/src/semantics.rs | 850 | ||||
-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 | 30 | ||||
-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 | 351 | ||||
-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 | 96 | ||||
-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 | 469 | ||||
-rw-r--r-- | crates/hir_ty/src/diagnostics/expr.rs | 569 | ||||
-rw-r--r-- | crates/hir_ty/src/diagnostics/match_check.rs | 1421 | ||||
-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 | 272 | ||||
-rw-r--r-- | crates/hir_ty/src/traits/chalk.rs | 586 | ||||
-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 (renamed from crates/ra_ide/src/completion/complete_snippet.rs) | 0 | ||||
-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 | 750 | ||||
-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 | 560 | ||||
-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 (renamed from crates/ra_ide/test_data/highlight_extern_crate.html) | 0 | ||||
-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 (renamed from crates/ra_ide/test_data/highlight_unsafe.html) | 0 | ||||
-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 (renamed from crates/ra_parser/src/parser.rs) | 0 | ||||
-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 | 27 | ||||
-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 (renamed from crates/ra_proc_macro_srv/src/tests/mod.rs) | 0 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/tests/utils.rs | 64 | ||||
-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 (renamed from crates/ra_prof/src/memory_usage.rs) | 0 | ||||
-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 | 110 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/generate_new.rs | 421 | ||||
-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 | 241 | ||||
-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 | 1713 | ||||
-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 | 841 | ||||
-rw-r--r-- | crates/ra_hir/src/semantics/source_to_def.rs | 276 | ||||
-rw-r--r-- | crates/ra_hir/src/source_analyzer.rs | 534 | ||||
-rw-r--r-- | crates/ra_hir_def/Cargo.toml | 36 | ||||
-rw-r--r-- | crates/ra_hir_def/src/adt.rs | 329 | ||||
-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 | 30 | ||||
-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 | 96 | ||||
-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 | 453 | ||||
-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 | 470 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/diagnostics/expr.rs | 569 | ||||
-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 | 803 | ||||
-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 | 1242 | ||||
-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 | 2218 | ||||
-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_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 | 1229 | ||||
-rw-r--r-- | crates/ra_ide/src/completion/test_utils.rs | 114 | ||||
-rw-r--r-- | crates/ra_ide/src/diagnostics.rs | 751 | ||||
-rw-r--r-- | crates/ra_ide/src/diagnostics/diagnostics_with_fix.rs | 171 | ||||
-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 | 111 | ||||
-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 | 989 | ||||
-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 | 2461 | ||||
-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 | 558 | ||||
-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 | 873 | ||||
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting/html.rs | 97 | ||||
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting/injection.rs | 187 | ||||
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting/tests.rs | 445 | ||||
-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_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 | 349 | ||||
-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 | 651 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/expressions/atom.rs | 611 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/items.rs | 432 | ||||
-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_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/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/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 | 274 | ||||
-rw-r--r-- | crates/ra_ssr/src/search.rs | 282 | ||||
-rw-r--r-- | crates/ra_ssr/src/tests.rs | 1145 | ||||
-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/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/fuzz-failures/0001.rs | 106 | ||||
-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_text_edit/Cargo.toml | 13 | ||||
-rw-r--r-- | crates/ra_text_edit/src/lib.rs | 175 | ||||
-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/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 | 12 | ||||
-rw-r--r-- | crates/rust-analyzer/src/cli/diagnostics.rs | 4 | ||||
-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 | 9 | ||||
-rw-r--r-- | crates/rust-analyzer/src/handlers.rs | 95 | ||||
-rw-r--r-- | crates/rust-analyzer/src/lib.rs | 14 | ||||
-rw-r--r-- | crates/rust-analyzer/src/lsp_utils.rs | 4 | ||||
-rw-r--r-- | crates/rust-analyzer/src/main_loop.rs | 11 | ||||
-rw-r--r-- | crates/rust-analyzer/src/reload.rs | 19 | ||||
-rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 10 | ||||
-rw-r--r-- | crates/rust-analyzer/test_data/macro_compiler_error.txt | 4 | ||||
-rw-r--r-- | crates/rust-analyzer/tests/heavy_tests/support.rs | 4 | ||||
-rw-r--r-- | crates/ssr/Cargo.toml | 24 | ||||
-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 | 338 | ||||
-rw-r--r-- | crates/ssr/src/matching.rs | 777 | ||||
-rw-r--r-- | crates/ssr/src/nester.rs | 94 | ||||
-rw-r--r-- | crates/ssr/src/parsing.rs | 389 | ||||
-rw-r--r-- | crates/ssr/src/replacing.rs | 194 | ||||
-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 | 1174 | ||||
-rw-r--r-- | crates/stdx/Cargo.toml | 4 | ||||
-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 | 650 | ||||
-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 (renamed from crates/ra_syntax/src/ast/traits.rs) | 0 | ||||
-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/0043_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/0043_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/err/0045_item_modifiers.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0045_item_modifiers.rs (renamed from crates/ra_syntax/test_data/parser/err/0045_item_modifiers.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 (renamed from crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0151_fn.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rs) | 0 | ||||
-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 (renamed from crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0152_impl.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0153_trait.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0153_trait.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rs) | 0 | ||||
-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 (renamed from crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_item.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0163_default_unsafe_item.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_item.rs) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0164_default_item.rast (renamed from crates/ra_syntax/test_data/parser/inline/ok/0164_default_item.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0164_default_item.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0164_default_item.rs) | 0 | ||||
-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 (renamed from crates/ra_syntax/test_data/parser/ok/0066_default_modifier.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0066_default_modifier.rs (renamed from crates/ra_syntax/test_data/parser/ok/0066_default_modifier.rs) | 0 | ||||
-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 (renamed from crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rast) | 0 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/ok/0068_item_modifiers.rs (renamed from crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rs) | 0 | ||||
-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 (renamed from crates/ra_tt/src/lib.rs) | 0 | ||||
-rw-r--r-- | crates/vfs-notify/Cargo.toml | 4 | ||||
-rw-r--r-- | crates/vfs/Cargo.toml | 4 | ||||
-rw-r--r-- | docs/dev/README.md | 14 | ||||
-rw-r--r-- | docs/dev/architecture.md | 24 | ||||
-rw-r--r-- | docs/dev/guide.md | 66 | ||||
-rw-r--r-- | docs/dev/style.md | 4 | ||||
-rw-r--r-- | docs/dev/syntax.md | 2 | ||||
-rw-r--r-- | editors/code/src/toolchain.ts | 4 | ||||
-rw-r--r-- | xtask/src/codegen.rs | 16 | ||||
-rw-r--r-- | xtask/src/codegen/gen_syntax.rs | 2 | ||||
-rw-r--r-- | xtask/src/lib.rs | 4 | ||||
-rw-r--r-- | xtask/tests/tidy.rs | 20 |
1402 files changed, 96443 insertions, 96474 deletions
diff --git a/.gitattributes b/.gitattributes index 4cd50e481..7c2f752d6 100644 --- a/.gitattributes +++ b/.gitattributes | |||
@@ -1,5 +1,5 @@ | |||
1 | * text=auto eol=lf | 1 | * text=auto eol=lf |
2 | crates/ra_syntax/test_data/** -text eof=LF | 2 | crates/syntax/test_data/** -text eof=LF |
3 | # Older git versions try to fix line endings on images, this prevents it. | 3 | # Older git versions try to fix line endings on images, this prevents it. |
4 | *.png binary | 4 | *.png binary |
5 | *.jpg binary | 5 | *.jpg binary |
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f46fb8fec..2deb009ce 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml | |||
@@ -25,7 +25,7 @@ jobs: | |||
25 | strategy: | 25 | strategy: |
26 | fail-fast: false | 26 | fail-fast: false |
27 | matrix: | 27 | matrix: |
28 | os: [ubuntu-latest, windows-latest, macos-latest] | 28 | os: [ubuntu-latest, windows-latest] #, macos-latest] |
29 | 29 | ||
30 | steps: | 30 | steps: |
31 | - name: Checkout repository | 31 | - name: Checkout repository |
@@ -115,7 +115,7 @@ jobs: | |||
115 | strategy: | 115 | strategy: |
116 | fail-fast: false | 116 | fail-fast: false |
117 | matrix: | 117 | matrix: |
118 | os: [ubuntu-latest, windows-latest, macos-latest] | 118 | os: [ubuntu-latest, windows-latest] |
119 | 119 | ||
120 | runs-on: ${{ matrix.os }} | 120 | runs-on: ${{ matrix.os }} |
121 | 121 | ||
diff --git a/Cargo.lock b/Cargo.lock index 265889162..2386c8f3a 100644 --- a/Cargo.lock +++ b/Cargo.lock | |||
@@ -16,15 +16,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
16 | checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" | 16 | checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" |
17 | 17 | ||
18 | [[package]] | 18 | [[package]] |
19 | name = "aho-corasick" | ||
20 | version = "0.7.13" | ||
21 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
22 | checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" | ||
23 | dependencies = [ | ||
24 | "memchr", | ||
25 | ] | ||
26 | |||
27 | [[package]] | ||
28 | name = "ansi_term" | 19 | name = "ansi_term" |
29 | version = "0.12.1" | 20 | version = "0.12.1" |
30 | source = "registry+https://github.com/rust-lang/crates.io-index" | 21 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -46,12 +37,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
46 | checksum = "33954243bd79057c2de7338850b85983a44588021f8a5fee574a8888c6de4344" | 37 | checksum = "33954243bd79057c2de7338850b85983a44588021f8a5fee574a8888c6de4344" |
47 | 38 | ||
48 | [[package]] | 39 | [[package]] |
40 | name = "arena" | ||
41 | version = "0.0.0" | ||
42 | |||
43 | [[package]] | ||
49 | name = "arrayvec" | 44 | name = "arrayvec" |
50 | version = "0.5.1" | 45 | version = "0.5.1" |
51 | source = "registry+https://github.com/rust-lang/crates.io-index" | 46 | source = "registry+https://github.com/rust-lang/crates.io-index" |
52 | checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" | 47 | checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" |
53 | 48 | ||
54 | [[package]] | 49 | [[package]] |
50 | name = "assists" | ||
51 | version = "0.0.0" | ||
52 | dependencies = [ | ||
53 | "base_db", | ||
54 | "either", | ||
55 | "hir", | ||
56 | "ide_db", | ||
57 | "itertools", | ||
58 | "profile", | ||
59 | "rustc-hash", | ||
60 | "stdx", | ||
61 | "syntax", | ||
62 | "test_utils", | ||
63 | "text_edit", | ||
64 | ] | ||
65 | |||
66 | [[package]] | ||
55 | name = "atty" | 67 | name = "atty" |
56 | version = "0.2.14" | 68 | version = "0.2.14" |
57 | source = "registry+https://github.com/rust-lang/crates.io-index" | 69 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -89,6 +101,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
89 | checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" | 101 | checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" |
90 | 102 | ||
91 | [[package]] | 103 | [[package]] |
104 | name = "base_db" | ||
105 | version = "0.0.0" | ||
106 | dependencies = [ | ||
107 | "cfg", | ||
108 | "profile", | ||
109 | "rustc-hash", | ||
110 | "salsa", | ||
111 | "stdx", | ||
112 | "syntax", | ||
113 | "test_utils", | ||
114 | "tt", | ||
115 | "vfs", | ||
116 | ] | ||
117 | |||
118 | [[package]] | ||
92 | name = "bitflags" | 119 | name = "bitflags" |
93 | version = "1.2.1" | 120 | version = "1.2.1" |
94 | source = "registry+https://github.com/rust-lang/crates.io-index" | 121 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -118,6 +145,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
118 | checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518" | 145 | checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518" |
119 | 146 | ||
120 | [[package]] | 147 | [[package]] |
148 | name = "cfg" | ||
149 | version = "0.0.0" | ||
150 | dependencies = [ | ||
151 | "mbe", | ||
152 | "rustc-hash", | ||
153 | "syntax", | ||
154 | "tt", | ||
155 | ] | ||
156 | |||
157 | [[package]] | ||
121 | name = "cfg-if" | 158 | name = "cfg-if" |
122 | version = "0.1.10" | 159 | version = "0.1.10" |
123 | source = "registry+https://github.com/rust-lang/crates.io-index" | 160 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -285,9 +322,9 @@ checksum = "9bda8e21c04aca2ae33ffc2fd8c23134f3cac46db123ba97bd9d3f3b8a4a85e1" | |||
285 | 322 | ||
286 | [[package]] | 323 | [[package]] |
287 | name = "either" | 324 | name = "either" |
288 | version = "1.5.3" | 325 | version = "1.6.0" |
289 | source = "registry+https://github.com/rust-lang/crates.io-index" | 326 | source = "registry+https://github.com/rust-lang/crates.io-index" |
290 | checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" | 327 | checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f" |
291 | 328 | ||
292 | [[package]] | 329 | [[package]] |
293 | name = "ena" | 330 | name = "ena" |
@@ -309,7 +346,7 @@ dependencies = [ | |||
309 | 346 | ||
310 | [[package]] | 347 | [[package]] |
311 | name = "expect" | 348 | name = "expect" |
312 | version = "0.1.0" | 349 | version = "0.0.0" |
313 | dependencies = [ | 350 | dependencies = [ |
314 | "difference", | 351 | "difference", |
315 | "once_cell", | 352 | "once_cell", |
@@ -348,14 +385,14 @@ dependencies = [ | |||
348 | 385 | ||
349 | [[package]] | 386 | [[package]] |
350 | name = "flycheck" | 387 | name = "flycheck" |
351 | version = "0.1.0" | 388 | version = "0.0.0" |
352 | dependencies = [ | 389 | dependencies = [ |
353 | "cargo_metadata", | 390 | "cargo_metadata", |
354 | "crossbeam-channel", | 391 | "crossbeam-channel", |
355 | "jod-thread", | 392 | "jod-thread", |
356 | "log", | 393 | "log", |
357 | "ra_toolchain", | ||
358 | "serde_json", | 394 | "serde_json", |
395 | "toolchain", | ||
359 | ] | 396 | ] |
360 | 397 | ||
361 | [[package]] | 398 | [[package]] |
@@ -444,6 +481,96 @@ dependencies = [ | |||
444 | ] | 481 | ] |
445 | 482 | ||
446 | [[package]] | 483 | [[package]] |
484 | name = "hir" | ||
485 | version = "0.0.0" | ||
486 | dependencies = [ | ||
487 | "arrayvec", | ||
488 | "base_db", | ||
489 | "either", | ||
490 | "hir_def", | ||
491 | "hir_expand", | ||
492 | "hir_ty", | ||
493 | "itertools", | ||
494 | "log", | ||
495 | "profile", | ||
496 | "rustc-hash", | ||
497 | "stdx", | ||
498 | "syntax", | ||
499 | ] | ||
500 | |||
501 | [[package]] | ||
502 | name = "hir_def" | ||
503 | version = "0.0.0" | ||
504 | dependencies = [ | ||
505 | "anymap", | ||
506 | "arena", | ||
507 | "base_db", | ||
508 | "cfg", | ||
509 | "drop_bomb", | ||
510 | "either", | ||
511 | "expect", | ||
512 | "fst", | ||
513 | "hir_expand", | ||
514 | "indexmap", | ||
515 | "itertools", | ||
516 | "log", | ||
517 | "mbe", | ||
518 | "once_cell", | ||
519 | "profile", | ||
520 | "rustc-hash", | ||
521 | "smallvec", | ||
522 | "stdx", | ||
523 | "syntax", | ||
524 | "test_utils", | ||
525 | "tt", | ||
526 | ] | ||
527 | |||
528 | [[package]] | ||
529 | name = "hir_expand" | ||
530 | version = "0.0.0" | ||
531 | dependencies = [ | ||
532 | "arena", | ||
533 | "base_db", | ||
534 | "either", | ||
535 | "log", | ||
536 | "mbe", | ||
537 | "parser", | ||
538 | "profile", | ||
539 | "rustc-hash", | ||
540 | "syntax", | ||
541 | "test_utils", | ||
542 | "tt", | ||
543 | ] | ||
544 | |||
545 | [[package]] | ||
546 | name = "hir_ty" | ||
547 | version = "0.0.0" | ||
548 | dependencies = [ | ||
549 | "arena", | ||
550 | "arrayvec", | ||
551 | "base_db", | ||
552 | "chalk-ir", | ||
553 | "chalk-recursive", | ||
554 | "chalk-solve", | ||
555 | "ena", | ||
556 | "expect", | ||
557 | "hir_def", | ||
558 | "hir_expand", | ||
559 | "itertools", | ||
560 | "log", | ||
561 | "profile", | ||
562 | "rustc-hash", | ||
563 | "scoped-tls", | ||
564 | "smallvec", | ||
565 | "stdx", | ||
566 | "syntax", | ||
567 | "test_utils", | ||
568 | "tracing", | ||
569 | "tracing-subscriber", | ||
570 | "tracing-tree", | ||
571 | ] | ||
572 | |||
573 | [[package]] | ||
447 | name = "home" | 574 | name = "home" |
448 | version = "0.5.3" | 575 | version = "0.5.3" |
449 | source = "registry+https://github.com/rust-lang/crates.io-index" | 576 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -453,6 +580,49 @@ dependencies = [ | |||
453 | ] | 580 | ] |
454 | 581 | ||
455 | [[package]] | 582 | [[package]] |
583 | name = "ide" | ||
584 | version = "0.0.0" | ||
585 | dependencies = [ | ||
586 | "assists", | ||
587 | "base_db", | ||
588 | "cfg", | ||
589 | "either", | ||
590 | "expect", | ||
591 | "hir", | ||
592 | "ide_db", | ||
593 | "indexmap", | ||
594 | "itertools", | ||
595 | "log", | ||
596 | "oorandom", | ||
597 | "profile", | ||
598 | "rustc-hash", | ||
599 | "ssr", | ||
600 | "stdx", | ||
601 | "syntax", | ||
602 | "test_utils", | ||
603 | "text_edit", | ||
604 | ] | ||
605 | |||
606 | [[package]] | ||
607 | name = "ide_db" | ||
608 | version = "0.0.0" | ||
609 | dependencies = [ | ||
610 | "base_db", | ||
611 | "either", | ||
612 | "fst", | ||
613 | "hir", | ||
614 | "log", | ||
615 | "once_cell", | ||
616 | "profile", | ||
617 | "rayon", | ||
618 | "rustc-hash", | ||
619 | "stdx", | ||
620 | "syntax", | ||
621 | "test_utils", | ||
622 | "text_edit", | ||
623 | ] | ||
624 | |||
625 | [[package]] | ||
456 | name = "idna" | 626 | name = "idna" |
457 | version = "0.2.0" | 627 | version = "0.2.0" |
458 | source = "registry+https://github.com/rust-lang/crates.io-index" | 628 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -547,9 +717,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" | |||
547 | 717 | ||
548 | [[package]] | 718 | [[package]] |
549 | name = "lazycell" | 719 | name = "lazycell" |
550 | version = "1.2.1" | 720 | version = "1.3.0" |
551 | source = "registry+https://github.com/rust-lang/crates.io-index" | 721 | source = "registry+https://github.com/rust-lang/crates.io-index" |
552 | checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" | 722 | checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" |
553 | 723 | ||
554 | [[package]] | 724 | [[package]] |
555 | name = "libc" | 725 | name = "libc" |
@@ -641,10 +811,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
641 | checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" | 811 | checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" |
642 | 812 | ||
643 | [[package]] | 813 | [[package]] |
644 | name = "memchr" | 814 | name = "mbe" |
645 | version = "2.3.3" | 815 | version = "0.0.0" |
646 | source = "registry+https://github.com/rust-lang/crates.io-index" | 816 | dependencies = [ |
647 | checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" | 817 | "log", |
818 | "parser", | ||
819 | "rustc-hash", | ||
820 | "smallvec", | ||
821 | "syntax", | ||
822 | "test_utils", | ||
823 | "tt", | ||
824 | ] | ||
648 | 825 | ||
649 | [[package]] | 826 | [[package]] |
650 | name = "memmap" | 827 | name = "memmap" |
@@ -831,8 +1008,15 @@ dependencies = [ | |||
831 | ] | 1008 | ] |
832 | 1009 | ||
833 | [[package]] | 1010 | [[package]] |
1011 | name = "parser" | ||
1012 | version = "0.0.0" | ||
1013 | dependencies = [ | ||
1014 | "drop_bomb", | ||
1015 | ] | ||
1016 | |||
1017 | [[package]] | ||
834 | name = "paths" | 1018 | name = "paths" |
835 | version = "0.1.0" | 1019 | version = "0.0.0" |
836 | 1020 | ||
837 | [[package]] | 1021 | [[package]] |
838 | name = "percent-encoding" | 1022 | name = "percent-encoding" |
@@ -891,338 +1075,72 @@ dependencies = [ | |||
891 | ] | 1075 | ] |
892 | 1076 | ||
893 | [[package]] | 1077 | [[package]] |
894 | name = "quote" | 1078 | name = "proc_macro_api" |
895 | version = "1.0.7" | 1079 | version = "0.0.0" |
896 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
897 | checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" | ||
898 | dependencies = [ | ||
899 | "proc-macro2", | ||
900 | ] | ||
901 | |||
902 | [[package]] | ||
903 | name = "ra_arena" | ||
904 | version = "0.1.0" | ||
905 | |||
906 | [[package]] | ||
907 | name = "ra_assists" | ||
908 | version = "0.1.0" | ||
909 | dependencies = [ | ||
910 | "either", | ||
911 | "itertools", | ||
912 | "ra_db", | ||
913 | "ra_fmt", | ||
914 | "ra_hir", | ||
915 | "ra_ide_db", | ||
916 | "ra_prof", | ||
917 | "ra_syntax", | ||
918 | "ra_text_edit", | ||
919 | "rustc-hash", | ||
920 | "stdx", | ||
921 | "test_utils", | ||
922 | ] | ||
923 | |||
924 | [[package]] | ||
925 | name = "ra_cfg" | ||
926 | version = "0.1.0" | ||
927 | dependencies = [ | ||
928 | "ra_mbe", | ||
929 | "ra_syntax", | ||
930 | "ra_tt", | ||
931 | "rustc-hash", | ||
932 | ] | ||
933 | |||
934 | [[package]] | ||
935 | name = "ra_db" | ||
936 | version = "0.1.0" | ||
937 | dependencies = [ | ||
938 | "ra_cfg", | ||
939 | "ra_prof", | ||
940 | "ra_syntax", | ||
941 | "ra_tt", | ||
942 | "rustc-hash", | ||
943 | "salsa", | ||
944 | "stdx", | ||
945 | "test_utils", | ||
946 | "vfs", | ||
947 | ] | ||
948 | |||
949 | [[package]] | ||
950 | name = "ra_fmt" | ||
951 | version = "0.1.0" | ||
952 | dependencies = [ | ||
953 | "itertools", | ||
954 | "ra_syntax", | ||
955 | ] | ||
956 | |||
957 | [[package]] | ||
958 | name = "ra_hir" | ||
959 | version = "0.1.0" | ||
960 | dependencies = [ | ||
961 | "arrayvec", | ||
962 | "either", | ||
963 | "itertools", | ||
964 | "log", | ||
965 | "ra_db", | ||
966 | "ra_hir_def", | ||
967 | "ra_hir_expand", | ||
968 | "ra_hir_ty", | ||
969 | "ra_prof", | ||
970 | "ra_syntax", | ||
971 | "rustc-hash", | ||
972 | "stdx", | ||
973 | ] | ||
974 | |||
975 | [[package]] | ||
976 | name = "ra_hir_def" | ||
977 | version = "0.1.0" | ||
978 | dependencies = [ | ||
979 | "anymap", | ||
980 | "drop_bomb", | ||
981 | "either", | ||
982 | "expect", | ||
983 | "fst", | ||
984 | "indexmap", | ||
985 | "itertools", | ||
986 | "log", | ||
987 | "once_cell", | ||
988 | "ra_arena", | ||
989 | "ra_cfg", | ||
990 | "ra_db", | ||
991 | "ra_hir_expand", | ||
992 | "ra_mbe", | ||
993 | "ra_prof", | ||
994 | "ra_syntax", | ||
995 | "ra_tt", | ||
996 | "rustc-hash", | ||
997 | "smallvec", | ||
998 | "stdx", | ||
999 | "test_utils", | ||
1000 | ] | ||
1001 | |||
1002 | [[package]] | ||
1003 | name = "ra_hir_expand" | ||
1004 | version = "0.1.0" | ||
1005 | dependencies = [ | ||
1006 | "either", | ||
1007 | "log", | ||
1008 | "ra_arena", | ||
1009 | "ra_db", | ||
1010 | "ra_mbe", | ||
1011 | "ra_parser", | ||
1012 | "ra_prof", | ||
1013 | "ra_syntax", | ||
1014 | "ra_tt", | ||
1015 | "rustc-hash", | ||
1016 | "test_utils", | ||
1017 | ] | ||
1018 | |||
1019 | [[package]] | ||
1020 | name = "ra_hir_ty" | ||
1021 | version = "0.1.0" | ||
1022 | dependencies = [ | ||
1023 | "arrayvec", | ||
1024 | "chalk-ir", | ||
1025 | "chalk-recursive", | ||
1026 | "chalk-solve", | ||
1027 | "ena", | ||
1028 | "expect", | ||
1029 | "itertools", | ||
1030 | "log", | ||
1031 | "ra_arena", | ||
1032 | "ra_db", | ||
1033 | "ra_hir_def", | ||
1034 | "ra_hir_expand", | ||
1035 | "ra_prof", | ||
1036 | "ra_syntax", | ||
1037 | "rustc-hash", | ||
1038 | "scoped-tls", | ||
1039 | "smallvec", | ||
1040 | "stdx", | ||
1041 | "test_utils", | ||
1042 | "tracing", | ||
1043 | "tracing-subscriber", | ||
1044 | "tracing-tree", | ||
1045 | ] | ||
1046 | |||
1047 | [[package]] | ||
1048 | name = "ra_ide" | ||
1049 | version = "0.1.0" | ||
1050 | dependencies = [ | ||
1051 | "either", | ||
1052 | "expect", | ||
1053 | "indexmap", | ||
1054 | "itertools", | ||
1055 | "log", | ||
1056 | "oorandom", | ||
1057 | "ra_assists", | ||
1058 | "ra_cfg", | ||
1059 | "ra_db", | ||
1060 | "ra_fmt", | ||
1061 | "ra_hir", | ||
1062 | "ra_ide_db", | ||
1063 | "ra_prof", | ||
1064 | "ra_ssr", | ||
1065 | "ra_syntax", | ||
1066 | "ra_text_edit", | ||
1067 | "rustc-hash", | ||
1068 | "stdx", | ||
1069 | "test_utils", | ||
1070 | ] | ||
1071 | |||
1072 | [[package]] | ||
1073 | name = "ra_ide_db" | ||
1074 | version = "0.1.0" | ||
1075 | dependencies = [ | ||
1076 | "either", | ||
1077 | "fst", | ||
1078 | "log", | ||
1079 | "once_cell", | ||
1080 | "ra_db", | ||
1081 | "ra_hir", | ||
1082 | "ra_prof", | ||
1083 | "ra_syntax", | ||
1084 | "ra_text_edit", | ||
1085 | "rayon", | ||
1086 | "rustc-hash", | ||
1087 | "stdx", | ||
1088 | "test_utils", | ||
1089 | ] | ||
1090 | |||
1091 | [[package]] | ||
1092 | name = "ra_mbe" | ||
1093 | version = "0.1.0" | ||
1094 | dependencies = [ | ||
1095 | "log", | ||
1096 | "ra_parser", | ||
1097 | "ra_syntax", | ||
1098 | "ra_tt", | ||
1099 | "rustc-hash", | ||
1100 | "smallvec", | ||
1101 | "test_utils", | ||
1102 | ] | ||
1103 | |||
1104 | [[package]] | ||
1105 | name = "ra_parser" | ||
1106 | version = "0.1.0" | ||
1107 | dependencies = [ | ||
1108 | "drop_bomb", | ||
1109 | ] | ||
1110 | |||
1111 | [[package]] | ||
1112 | name = "ra_proc_macro" | ||
1113 | version = "0.1.0" | ||
1114 | dependencies = [ | 1080 | dependencies = [ |
1115 | "crossbeam-channel", | 1081 | "crossbeam-channel", |
1116 | "jod-thread", | 1082 | "jod-thread", |
1117 | "log", | 1083 | "log", |
1118 | "ra_tt", | ||
1119 | "serde", | 1084 | "serde", |
1120 | "serde_json", | 1085 | "serde_json", |
1086 | "tt", | ||
1121 | ] | 1087 | ] |
1122 | 1088 | ||
1123 | [[package]] | 1089 | [[package]] |
1124 | name = "ra_proc_macro_srv" | 1090 | name = "proc_macro_srv" |
1125 | version = "0.1.0" | 1091 | version = "0.0.0" |
1126 | dependencies = [ | 1092 | dependencies = [ |
1127 | "cargo_metadata", | 1093 | "cargo_metadata", |
1128 | "difference", | 1094 | "difference", |
1129 | "goblin", | 1095 | "goblin", |
1130 | "libloading", | 1096 | "libloading", |
1097 | "mbe", | ||
1131 | "memmap", | 1098 | "memmap", |
1132 | "ra_mbe", | 1099 | "proc_macro_api", |
1133 | "ra_proc_macro", | ||
1134 | "ra_toolchain", | ||
1135 | "ra_tt", | ||
1136 | "serde_derive", | 1100 | "serde_derive", |
1137 | "test_utils", | 1101 | "test_utils", |
1102 | "toolchain", | ||
1103 | "tt", | ||
1138 | ] | 1104 | ] |
1139 | 1105 | ||
1140 | [[package]] | 1106 | [[package]] |
1141 | name = "ra_prof" | 1107 | name = "profile" |
1142 | version = "0.1.0" | 1108 | version = "0.0.0" |
1143 | dependencies = [ | 1109 | dependencies = [ |
1110 | "arena", | ||
1144 | "backtrace", | 1111 | "backtrace", |
1145 | "cfg-if", | 1112 | "cfg-if", |
1146 | "libc", | 1113 | "libc", |
1147 | "once_cell", | 1114 | "once_cell", |
1148 | "perf-event", | 1115 | "perf-event", |
1149 | "ra_arena", | ||
1150 | ] | 1116 | ] |
1151 | 1117 | ||
1152 | [[package]] | 1118 | [[package]] |
1153 | name = "ra_project_model" | 1119 | name = "project_model" |
1154 | version = "0.1.0" | 1120 | version = "0.0.0" |
1155 | dependencies = [ | 1121 | dependencies = [ |
1156 | "anyhow", | 1122 | "anyhow", |
1123 | "arena", | ||
1124 | "base_db", | ||
1157 | "cargo_metadata", | 1125 | "cargo_metadata", |
1126 | "cfg", | ||
1158 | "log", | 1127 | "log", |
1159 | "paths", | 1128 | "paths", |
1160 | "ra_arena", | 1129 | "proc_macro_api", |
1161 | "ra_cfg", | ||
1162 | "ra_db", | ||
1163 | "ra_proc_macro", | ||
1164 | "ra_toolchain", | ||
1165 | "rustc-hash", | 1130 | "rustc-hash", |
1166 | "serde", | 1131 | "serde", |
1167 | "serde_json", | 1132 | "serde_json", |
1168 | "stdx", | 1133 | "stdx", |
1134 | "toolchain", | ||
1169 | ] | 1135 | ] |
1170 | 1136 | ||
1171 | [[package]] | 1137 | [[package]] |
1172 | name = "ra_ssr" | 1138 | name = "quote" |
1173 | version = "0.1.0" | 1139 | version = "1.0.7" |
1174 | dependencies = [ | 1140 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1175 | "expect", | 1141 | checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" |
1176 | "ra_db", | ||
1177 | "ra_hir", | ||
1178 | "ra_ide_db", | ||
1179 | "ra_syntax", | ||
1180 | "ra_text_edit", | ||
1181 | "rustc-hash", | ||
1182 | "test_utils", | ||
1183 | ] | ||
1184 | |||
1185 | [[package]] | ||
1186 | name = "ra_syntax" | ||
1187 | version = "0.1.0" | ||
1188 | dependencies = [ | ||
1189 | "arrayvec", | ||
1190 | "expect", | ||
1191 | "itertools", | ||
1192 | "once_cell", | ||
1193 | "ra_parser", | ||
1194 | "ra_text_edit", | ||
1195 | "rayon", | ||
1196 | "rowan", | ||
1197 | "rustc-ap-rustc_lexer", | ||
1198 | "rustc-hash", | ||
1199 | "serde", | ||
1200 | "smol_str", | ||
1201 | "stdx", | ||
1202 | "test_utils", | ||
1203 | "walkdir", | ||
1204 | ] | ||
1205 | |||
1206 | [[package]] | ||
1207 | name = "ra_text_edit" | ||
1208 | version = "0.1.0" | ||
1209 | dependencies = [ | ||
1210 | "text-size", | ||
1211 | ] | ||
1212 | |||
1213 | [[package]] | ||
1214 | name = "ra_toolchain" | ||
1215 | version = "0.1.0" | ||
1216 | dependencies = [ | ||
1217 | "home", | ||
1218 | ] | ||
1219 | |||
1220 | [[package]] | ||
1221 | name = "ra_tt" | ||
1222 | version = "0.1.0" | ||
1223 | dependencies = [ | 1142 | dependencies = [ |
1224 | "smol_str", | 1143 | "proc-macro2", |
1225 | "stdx", | ||
1226 | ] | 1144 | ] |
1227 | 1145 | ||
1228 | [[package]] | 1146 | [[package]] |
@@ -1262,10 +1180,7 @@ version = "1.3.9" | |||
1262 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1180 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1263 | checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" | 1181 | checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" |
1264 | dependencies = [ | 1182 | dependencies = [ |
1265 | "aho-corasick", | ||
1266 | "memchr", | ||
1267 | "regex-syntax", | 1183 | "regex-syntax", |
1268 | "thread_local", | ||
1269 | ] | 1184 | ] |
1270 | 1185 | ||
1271 | [[package]] | 1186 | [[package]] |
@@ -1298,45 +1213,45 @@ dependencies = [ | |||
1298 | 1213 | ||
1299 | [[package]] | 1214 | [[package]] |
1300 | name = "rust-analyzer" | 1215 | name = "rust-analyzer" |
1301 | version = "0.1.0" | 1216 | version = "0.0.0" |
1302 | dependencies = [ | 1217 | dependencies = [ |
1303 | "anyhow", | 1218 | "anyhow", |
1219 | "base_db", | ||
1220 | "cfg", | ||
1304 | "crossbeam-channel", | 1221 | "crossbeam-channel", |
1305 | "env_logger", | 1222 | "env_logger", |
1306 | "expect", | 1223 | "expect", |
1307 | "flycheck", | 1224 | "flycheck", |
1225 | "hir", | ||
1226 | "hir_def", | ||
1227 | "hir_ty", | ||
1228 | "ide", | ||
1229 | "ide_db", | ||
1308 | "itertools", | 1230 | "itertools", |
1309 | "jod-thread", | 1231 | "jod-thread", |
1310 | "log", | 1232 | "log", |
1311 | "lsp-server", | 1233 | "lsp-server", |
1312 | "lsp-types", | 1234 | "lsp-types", |
1235 | "mbe", | ||
1313 | "mimalloc", | 1236 | "mimalloc", |
1314 | "oorandom", | 1237 | "oorandom", |
1315 | "parking_lot", | 1238 | "parking_lot", |
1316 | "pico-args", | 1239 | "pico-args", |
1317 | "ra_cfg", | 1240 | "proc_macro_srv", |
1318 | "ra_db", | 1241 | "profile", |
1319 | "ra_hir", | 1242 | "project_model", |
1320 | "ra_hir_def", | ||
1321 | "ra_hir_ty", | ||
1322 | "ra_ide", | ||
1323 | "ra_ide_db", | ||
1324 | "ra_mbe", | ||
1325 | "ra_proc_macro_srv", | ||
1326 | "ra_prof", | ||
1327 | "ra_project_model", | ||
1328 | "ra_ssr", | ||
1329 | "ra_syntax", | ||
1330 | "ra_text_edit", | ||
1331 | "ra_toolchain", | ||
1332 | "ra_tt", | ||
1333 | "rayon", | 1243 | "rayon", |
1334 | "rustc-hash", | 1244 | "rustc-hash", |
1335 | "serde", | 1245 | "serde", |
1336 | "serde_json", | 1246 | "serde_json", |
1247 | "ssr", | ||
1337 | "stdx", | 1248 | "stdx", |
1249 | "syntax", | ||
1338 | "test_utils", | 1250 | "test_utils", |
1251 | "text_edit", | ||
1339 | "threadpool", | 1252 | "threadpool", |
1253 | "toolchain", | ||
1254 | "tt", | ||
1340 | "vfs", | 1255 | "vfs", |
1341 | "vfs-notify", | 1256 | "vfs-notify", |
1342 | "winapi 0.3.9", | 1257 | "winapi 0.3.9", |
@@ -1457,18 +1372,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" | |||
1457 | 1372 | ||
1458 | [[package]] | 1373 | [[package]] |
1459 | name = "serde" | 1374 | name = "serde" |
1460 | version = "1.0.114" | 1375 | version = "1.0.115" |
1461 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1376 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1462 | checksum = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3" | 1377 | checksum = "e54c9a88f2da7238af84b5101443f0c0d0a3bbdc455e34a5c9497b1903ed55d5" |
1463 | dependencies = [ | 1378 | dependencies = [ |
1464 | "serde_derive", | 1379 | "serde_derive", |
1465 | ] | 1380 | ] |
1466 | 1381 | ||
1467 | [[package]] | 1382 | [[package]] |
1468 | name = "serde_derive" | 1383 | name = "serde_derive" |
1469 | version = "1.0.114" | 1384 | version = "1.0.115" |
1470 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1385 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1471 | checksum = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e" | 1386 | checksum = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48" |
1472 | dependencies = [ | 1387 | dependencies = [ |
1473 | "proc-macro2", | 1388 | "proc-macro2", |
1474 | "quote", | 1389 | "quote", |
@@ -1514,9 +1429,9 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" | |||
1514 | 1429 | ||
1515 | [[package]] | 1430 | [[package]] |
1516 | name = "smallvec" | 1431 | name = "smallvec" |
1517 | version = "1.4.1" | 1432 | version = "1.4.2" |
1518 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1433 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1519 | checksum = "3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f" | 1434 | checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" |
1520 | 1435 | ||
1521 | [[package]] | 1436 | [[package]] |
1522 | name = "smol_str" | 1437 | name = "smol_str" |
@@ -1528,8 +1443,22 @@ dependencies = [ | |||
1528 | ] | 1443 | ] |
1529 | 1444 | ||
1530 | [[package]] | 1445 | [[package]] |
1446 | name = "ssr" | ||
1447 | version = "0.0.0" | ||
1448 | dependencies = [ | ||
1449 | "base_db", | ||
1450 | "expect", | ||
1451 | "hir", | ||
1452 | "ide_db", | ||
1453 | "rustc-hash", | ||
1454 | "syntax", | ||
1455 | "test_utils", | ||
1456 | "text_edit", | ||
1457 | ] | ||
1458 | |||
1459 | [[package]] | ||
1531 | name = "stdx" | 1460 | name = "stdx" |
1532 | version = "0.1.0" | 1461 | version = "0.0.0" |
1533 | 1462 | ||
1534 | [[package]] | 1463 | [[package]] |
1535 | name = "syn" | 1464 | name = "syn" |
@@ -1555,6 +1484,27 @@ dependencies = [ | |||
1555 | ] | 1484 | ] |
1556 | 1485 | ||
1557 | [[package]] | 1486 | [[package]] |
1487 | name = "syntax" | ||
1488 | version = "0.0.0" | ||
1489 | dependencies = [ | ||
1490 | "arrayvec", | ||
1491 | "expect", | ||
1492 | "itertools", | ||
1493 | "once_cell", | ||
1494 | "parser", | ||
1495 | "rayon", | ||
1496 | "rowan", | ||
1497 | "rustc-ap-rustc_lexer", | ||
1498 | "rustc-hash", | ||
1499 | "serde", | ||
1500 | "smol_str", | ||
1501 | "stdx", | ||
1502 | "test_utils", | ||
1503 | "text_edit", | ||
1504 | "walkdir", | ||
1505 | ] | ||
1506 | |||
1507 | [[package]] | ||
1558 | name = "termcolor" | 1508 | name = "termcolor" |
1559 | version = "1.1.0" | 1509 | version = "1.1.0" |
1560 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1510 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -1565,7 +1515,7 @@ dependencies = [ | |||
1565 | 1515 | ||
1566 | [[package]] | 1516 | [[package]] |
1567 | name = "test_utils" | 1517 | name = "test_utils" |
1568 | version = "0.1.0" | 1518 | version = "0.0.0" |
1569 | dependencies = [ | 1519 | dependencies = [ |
1570 | "difference", | 1520 | "difference", |
1571 | "rustc-hash", | 1521 | "rustc-hash", |
@@ -1581,6 +1531,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1581 | checksum = "f03e7efdedc3bc78cb2337f1e2785c39e45f5ef762d9e4ebb137fff7380a6d8a" | 1531 | checksum = "f03e7efdedc3bc78cb2337f1e2785c39e45f5ef762d9e4ebb137fff7380a6d8a" |
1582 | 1532 | ||
1583 | [[package]] | 1533 | [[package]] |
1534 | name = "text_edit" | ||
1535 | version = "0.0.0" | ||
1536 | dependencies = [ | ||
1537 | "text-size", | ||
1538 | ] | ||
1539 | |||
1540 | [[package]] | ||
1584 | name = "thin-dst" | 1541 | name = "thin-dst" |
1585 | version = "1.1.0" | 1542 | version = "1.1.0" |
1586 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1543 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -1621,10 +1578,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1621 | checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" | 1578 | checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" |
1622 | 1579 | ||
1623 | [[package]] | 1580 | [[package]] |
1581 | name = "toolchain" | ||
1582 | version = "0.0.0" | ||
1583 | dependencies = [ | ||
1584 | "home", | ||
1585 | ] | ||
1586 | |||
1587 | [[package]] | ||
1624 | name = "tracing" | 1588 | name = "tracing" |
1625 | version = "0.1.18" | 1589 | version = "0.1.19" |
1626 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1590 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1627 | checksum = "f0aae59226cf195d8e74d4b34beae1859257efb4e5fed3f147d2dc2c7d372178" | 1591 | checksum = "6d79ca061b032d6ce30c660fded31189ca0b9922bf483cd70759f13a2d86786c" |
1628 | dependencies = [ | 1592 | dependencies = [ |
1629 | "cfg-if", | 1593 | "cfg-if", |
1630 | "tracing-attributes", | 1594 | "tracing-attributes", |
@@ -1633,9 +1597,9 @@ dependencies = [ | |||
1633 | 1597 | ||
1634 | [[package]] | 1598 | [[package]] |
1635 | name = "tracing-attributes" | 1599 | name = "tracing-attributes" |
1636 | version = "0.1.9" | 1600 | version = "0.1.10" |
1637 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1601 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1638 | checksum = "f0693bf8d6f2bf22c690fc61a9d21ac69efdbb894a17ed596b9af0f01e64b84b" | 1602 | checksum = "1fe233f4227389ab7df5b32649239da7ebe0b281824b4e84b342d04d3fd8c25e" |
1639 | dependencies = [ | 1603 | dependencies = [ |
1640 | "proc-macro2", | 1604 | "proc-macro2", |
1641 | "quote", | 1605 | "quote", |
@@ -1644,9 +1608,9 @@ dependencies = [ | |||
1644 | 1608 | ||
1645 | [[package]] | 1609 | [[package]] |
1646 | name = "tracing-core" | 1610 | name = "tracing-core" |
1647 | version = "0.1.13" | 1611 | version = "0.1.14" |
1648 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1612 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1649 | checksum = "d593f98af59ebc017c0648f0117525db358745a8894a8d684e185ba3f45954f9" | 1613 | checksum = "db63662723c316b43ca36d833707cc93dff82a02ba3d7e354f342682cc8b3545" |
1650 | dependencies = [ | 1614 | dependencies = [ |
1651 | "lazy_static", | 1615 | "lazy_static", |
1652 | ] | 1616 | ] |
@@ -1674,9 +1638,9 @@ dependencies = [ | |||
1674 | 1638 | ||
1675 | [[package]] | 1639 | [[package]] |
1676 | name = "tracing-subscriber" | 1640 | name = "tracing-subscriber" |
1677 | version = "0.2.10" | 1641 | version = "0.2.11" |
1678 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1642 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1679 | checksum = "f7b33f8b2ef2ab0c3778c12646d9c42a24f7772bee4cdafc72199644a9f58fdc" | 1643 | checksum = "abd165311cc4d7a555ad11cc77a37756df836182db0d81aac908c8184c584f40" |
1680 | dependencies = [ | 1644 | dependencies = [ |
1681 | "ansi_term", | 1645 | "ansi_term", |
1682 | "chrono", | 1646 | "chrono", |
@@ -1687,6 +1651,7 @@ dependencies = [ | |||
1687 | "serde_json", | 1651 | "serde_json", |
1688 | "sharded-slab", | 1652 | "sharded-slab", |
1689 | "smallvec", | 1653 | "smallvec", |
1654 | "thread_local", | ||
1690 | "tracing-core", | 1655 | "tracing-core", |
1691 | "tracing-log", | 1656 | "tracing-log", |
1692 | "tracing-serde", | 1657 | "tracing-serde", |
@@ -1707,6 +1672,14 @@ dependencies = [ | |||
1707 | ] | 1672 | ] |
1708 | 1673 | ||
1709 | [[package]] | 1674 | [[package]] |
1675 | name = "tt" | ||
1676 | version = "0.0.0" | ||
1677 | dependencies = [ | ||
1678 | "smol_str", | ||
1679 | "stdx", | ||
1680 | ] | ||
1681 | |||
1682 | [[package]] | ||
1710 | name = "ungrammar" | 1683 | name = "ungrammar" |
1711 | version = "1.1.1" | 1684 | version = "1.1.1" |
1712 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1685 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -1756,7 +1729,7 @@ dependencies = [ | |||
1756 | 1729 | ||
1757 | [[package]] | 1730 | [[package]] |
1758 | name = "vfs" | 1731 | name = "vfs" |
1759 | version = "0.1.0" | 1732 | version = "0.0.0" |
1760 | dependencies = [ | 1733 | dependencies = [ |
1761 | "fst", | 1734 | "fst", |
1762 | "paths", | 1735 | "paths", |
@@ -1765,7 +1738,7 @@ dependencies = [ | |||
1765 | 1738 | ||
1766 | [[package]] | 1739 | [[package]] |
1767 | name = "vfs-notify" | 1740 | name = "vfs-notify" |
1768 | version = "0.1.0" | 1741 | version = "0.0.0" |
1769 | dependencies = [ | 1742 | dependencies = [ |
1770 | "crossbeam-channel", | 1743 | "crossbeam-channel", |
1771 | "jod-thread", | 1744 | "jod-thread", |
@@ -39,7 +39,7 @@ https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frls-2.2E0 | |||
39 | 39 | ||
40 | * Website: https://rust-analyzer.github.io/ | 40 | * Website: https://rust-analyzer.github.io/ |
41 | * Metrics: https://rust-analyzer.github.io/metrics/ | 41 | * Metrics: https://rust-analyzer.github.io/metrics/ |
42 | * API docs: https://rust-analyzer.github.io/rust-analyzer/ra_ide/ | 42 | * API docs: https://rust-analyzer.github.io/rust-analyzer/ide/ |
43 | 43 | ||
44 | ## License | 44 | ## License |
45 | 45 | ||
@@ -1,9 +1,8 @@ | |||
1 | status = [ | 1 | status = [ |
2 | "Rust (ubuntu-latest)", | 2 | "Rust (ubuntu-latest)", |
3 | "Rust (windows-latest)", | 3 | "Rust (windows-latest)", |
4 | "Rust (macos-latest)", | 4 | # "Rust (macos-latest)", |
5 | "TypeScript (ubuntu-latest)", | 5 | "TypeScript (ubuntu-latest)", |
6 | "TypeScript (windows-latest)", | 6 | "TypeScript (windows-latest)", |
7 | "TypeScript (macos-latest)", | ||
8 | ] | 7 | ] |
9 | delete_merged_branches = true | 8 | delete_merged_branches = true |
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..4c41c16d8 --- /dev/null +++ b/crates/assists/src/ast_transform.rs | |||
@@ -0,0 +1,206 @@ | |||
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 trait AstTransform<'a> { | ||
11 | fn get_substitution(&self, node: &syntax::SyntaxNode) -> Option<syntax::SyntaxNode>; | ||
12 | |||
13 | fn chain_before(self, other: Box<dyn AstTransform<'a> + 'a>) -> Box<dyn AstTransform<'a> + 'a>; | ||
14 | fn or<T: AstTransform<'a> + 'a>(self, other: T) -> Box<dyn AstTransform<'a> + 'a> | ||
15 | where | ||
16 | Self: Sized + 'a, | ||
17 | { | ||
18 | self.chain_before(Box::new(other)) | ||
19 | } | ||
20 | } | ||
21 | |||
22 | struct NullTransformer; | ||
23 | |||
24 | impl<'a> AstTransform<'a> for NullTransformer { | ||
25 | fn get_substitution(&self, _node: &syntax::SyntaxNode) -> Option<syntax::SyntaxNode> { | ||
26 | None | ||
27 | } | ||
28 | fn chain_before(self, other: Box<dyn AstTransform<'a> + 'a>) -> Box<dyn AstTransform<'a> + 'a> { | ||
29 | other | ||
30 | } | ||
31 | } | ||
32 | |||
33 | pub struct SubstituteTypeParams<'a> { | ||
34 | source_scope: &'a SemanticsScope<'a>, | ||
35 | substs: FxHashMap<hir::TypeParam, ast::Type>, | ||
36 | previous: Box<dyn AstTransform<'a> + 'a>, | ||
37 | } | ||
38 | |||
39 | impl<'a> SubstituteTypeParams<'a> { | ||
40 | pub fn for_trait_impl( | ||
41 | source_scope: &'a SemanticsScope<'a>, | ||
42 | // FIXME: there's implicit invariant that `trait_` and `source_scope` match... | ||
43 | trait_: hir::Trait, | ||
44 | impl_def: ast::Impl, | ||
45 | ) -> SubstituteTypeParams<'a> { | ||
46 | let substs = get_syntactic_substs(impl_def).unwrap_or_default(); | ||
47 | let generic_def: hir::GenericDef = trait_.into(); | ||
48 | let substs_by_param: FxHashMap<_, _> = generic_def | ||
49 | .params(source_scope.db) | ||
50 | .into_iter() | ||
51 | // this is a trait impl, so we need to skip the first type parameter -- this is a bit hacky | ||
52 | .skip(1) | ||
53 | // The actual list of trait type parameters may be longer than the one | ||
54 | // used in the `impl` block due to trailing default type parameters. | ||
55 | // For that case we extend the `substs` with an empty iterator so we | ||
56 | // can still hit those trailing values and check if they actually have | ||
57 | // a default type. If they do, go for that type from `hir` to `ast` so | ||
58 | // the resulting change can be applied correctly. | ||
59 | .zip(substs.into_iter().map(Some).chain(std::iter::repeat(None))) | ||
60 | .filter_map(|(k, v)| match v { | ||
61 | Some(v) => Some((k, v)), | ||
62 | None => { | ||
63 | let default = k.default(source_scope.db)?; | ||
64 | Some(( | ||
65 | k, | ||
66 | ast::make::ty( | ||
67 | &default | ||
68 | .display_source_code(source_scope.db, source_scope.module()?.into()) | ||
69 | .ok()?, | ||
70 | ), | ||
71 | )) | ||
72 | } | ||
73 | }) | ||
74 | .collect(); | ||
75 | return SubstituteTypeParams { | ||
76 | source_scope, | ||
77 | substs: substs_by_param, | ||
78 | previous: Box::new(NullTransformer), | ||
79 | }; | ||
80 | |||
81 | // FIXME: It would probably be nicer if we could get this via HIR (i.e. get the | ||
82 | // trait ref, and then go from the types in the substs back to the syntax). | ||
83 | fn get_syntactic_substs(impl_def: ast::Impl) -> Option<Vec<ast::Type>> { | ||
84 | let target_trait = impl_def.trait_()?; | ||
85 | let path_type = match target_trait { | ||
86 | ast::Type::PathType(path) => path, | ||
87 | _ => return None, | ||
88 | }; | ||
89 | let generic_arg_list = path_type.path()?.segment()?.generic_arg_list()?; | ||
90 | |||
91 | let mut result = Vec::new(); | ||
92 | for generic_arg in generic_arg_list.generic_args() { | ||
93 | match generic_arg { | ||
94 | ast::GenericArg::TypeArg(type_arg) => result.push(type_arg.ty()?), | ||
95 | ast::GenericArg::AssocTypeArg(_) | ||
96 | | ast::GenericArg::LifetimeArg(_) | ||
97 | | ast::GenericArg::ConstArg(_) => (), | ||
98 | } | ||
99 | } | ||
100 | |||
101 | Some(result) | ||
102 | } | ||
103 | } | ||
104 | fn get_substitution_inner(&self, node: &syntax::SyntaxNode) -> Option<syntax::SyntaxNode> { | ||
105 | let type_ref = ast::Type::cast(node.clone())?; | ||
106 | let path = match &type_ref { | ||
107 | ast::Type::PathType(path_type) => path_type.path()?, | ||
108 | _ => return None, | ||
109 | }; | ||
110 | // FIXME: use `hir::Path::from_src` instead. | ||
111 | #[allow(deprecated)] | ||
112 | let path = hir::Path::from_ast(path)?; | ||
113 | let resolution = self.source_scope.resolve_hir_path(&path)?; | ||
114 | match resolution { | ||
115 | hir::PathResolution::TypeParam(tp) => Some(self.substs.get(&tp)?.syntax().clone()), | ||
116 | _ => None, | ||
117 | } | ||
118 | } | ||
119 | } | ||
120 | |||
121 | impl<'a> AstTransform<'a> for SubstituteTypeParams<'a> { | ||
122 | fn get_substitution(&self, node: &syntax::SyntaxNode) -> Option<syntax::SyntaxNode> { | ||
123 | self.get_substitution_inner(node).or_else(|| self.previous.get_substitution(node)) | ||
124 | } | ||
125 | fn chain_before(self, other: Box<dyn AstTransform<'a> + 'a>) -> Box<dyn AstTransform<'a> + 'a> { | ||
126 | Box::new(SubstituteTypeParams { previous: other, ..self }) | ||
127 | } | ||
128 | } | ||
129 | |||
130 | pub struct QualifyPaths<'a> { | ||
131 | target_scope: &'a SemanticsScope<'a>, | ||
132 | source_scope: &'a SemanticsScope<'a>, | ||
133 | previous: Box<dyn AstTransform<'a> + 'a>, | ||
134 | } | ||
135 | |||
136 | impl<'a> QualifyPaths<'a> { | ||
137 | pub fn new(target_scope: &'a SemanticsScope<'a>, source_scope: &'a SemanticsScope<'a>) -> Self { | ||
138 | Self { target_scope, source_scope, previous: Box::new(NullTransformer) } | ||
139 | } | ||
140 | |||
141 | fn get_substitution_inner(&self, node: &syntax::SyntaxNode) -> Option<syntax::SyntaxNode> { | ||
142 | // FIXME handle value ns? | ||
143 | let from = self.target_scope.module()?; | ||
144 | let p = ast::Path::cast(node.clone())?; | ||
145 | if p.segment().and_then(|s| s.param_list()).is_some() { | ||
146 | // don't try to qualify `Fn(Foo) -> Bar` paths, they are in prelude anyway | ||
147 | return None; | ||
148 | } | ||
149 | // FIXME: use `hir::Path::from_src` instead. | ||
150 | #[allow(deprecated)] | ||
151 | let hir_path = hir::Path::from_ast(p.clone()); | ||
152 | let resolution = self.source_scope.resolve_hir_path(&hir_path?)?; | ||
153 | match resolution { | ||
154 | PathResolution::Def(def) => { | ||
155 | let found_path = from.find_use_path(self.source_scope.db.upcast(), def)?; | ||
156 | let mut path = path_to_ast(found_path); | ||
157 | |||
158 | let type_args = p | ||
159 | .segment() | ||
160 | .and_then(|s| s.generic_arg_list()) | ||
161 | .map(|arg_list| apply(self, arg_list)); | ||
162 | if let Some(type_args) = type_args { | ||
163 | let last_segment = path.segment().unwrap(); | ||
164 | path = path.with_segment(last_segment.with_type_args(type_args)) | ||
165 | } | ||
166 | |||
167 | Some(path.syntax().clone()) | ||
168 | } | ||
169 | PathResolution::Local(_) | ||
170 | | PathResolution::TypeParam(_) | ||
171 | | PathResolution::SelfType(_) => None, | ||
172 | PathResolution::Macro(_) => None, | ||
173 | PathResolution::AssocItem(_) => None, | ||
174 | } | ||
175 | } | ||
176 | } | ||
177 | |||
178 | pub fn apply<'a, N: AstNode>(transformer: &dyn AstTransform<'a>, node: N) -> N { | ||
179 | SyntaxRewriter::from_fn(|element| match element { | ||
180 | syntax::SyntaxElement::Node(n) => { | ||
181 | let replacement = transformer.get_substitution(&n)?; | ||
182 | Some(replacement.into()) | ||
183 | } | ||
184 | _ => None, | ||
185 | }) | ||
186 | .rewrite_ast(&node) | ||
187 | } | ||
188 | |||
189 | impl<'a> AstTransform<'a> for QualifyPaths<'a> { | ||
190 | fn get_substitution(&self, node: &syntax::SyntaxNode) -> Option<syntax::SyntaxNode> { | ||
191 | self.get_substitution_inner(node).or_else(|| self.previous.get_substitution(node)) | ||
192 | } | ||
193 | fn chain_before(self, other: Box<dyn AstTransform<'a> + 'a>) -> Box<dyn AstTransform<'a> + 'a> { | ||
194 | Box::new(QualifyPaths { previous: other, ..self }) | ||
195 | } | ||
196 | } | ||
197 | |||
198 | pub(crate) fn path_to_ast(path: hir::ModPath) -> ast::Path { | ||
199 | let parse = ast::SourceFile::parse(&path.to_string()); | ||
200 | parse | ||
201 | .tree() | ||
202 | .syntax() | ||
203 | .descendants() | ||
204 | .find_map(ast::Path::cast) | ||
205 | .unwrap_or_else(|| panic!("failed to parse path {:?}, `{}`", path, path)) | ||
206 | } | ||
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..81b61ebf8 --- /dev/null +++ b/crates/assists/src/handlers/add_missing_impl_members.rs | |||
@@ -0,0 +1,711 @@ | |||
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 | // ``` | ||
54 | pub(crate) fn add_missing_impl_members(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | ||
55 | add_missing_impl_members_inner( | ||
56 | acc, | ||
57 | ctx, | ||
58 | AddMissingImplMembersMode::NoDefaultMethods, | ||
59 | "add_impl_missing_members", | ||
60 | "Implement missing members", | ||
61 | ) | ||
62 | } | ||
63 | |||
64 | // Assist: add_impl_default_members | ||
65 | // | ||
66 | // Adds scaffold for overriding default impl members. | ||
67 | // | ||
68 | // ``` | ||
69 | // trait Trait { | ||
70 | // Type X; | ||
71 | // fn foo(&self); | ||
72 | // fn bar(&self) {} | ||
73 | // } | ||
74 | // | ||
75 | // impl Trait for () { | ||
76 | // Type X = (); | ||
77 | // fn foo(&self) {}<|> | ||
78 | // | ||
79 | // } | ||
80 | // ``` | ||
81 | // -> | ||
82 | // ``` | ||
83 | // trait Trait { | ||
84 | // Type X; | ||
85 | // fn foo(&self); | ||
86 | // fn bar(&self) {} | ||
87 | // } | ||
88 | // | ||
89 | // impl Trait for () { | ||
90 | // Type X = (); | ||
91 | // fn foo(&self) {} | ||
92 | // $0fn bar(&self) {} | ||
93 | // | ||
94 | // } | ||
95 | // ``` | ||
96 | pub(crate) fn add_missing_default_members(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | ||
97 | add_missing_impl_members_inner( | ||
98 | acc, | ||
99 | ctx, | ||
100 | AddMissingImplMembersMode::DefaultMethodsOnly, | ||
101 | "add_impl_default_members", | ||
102 | "Implement default members", | ||
103 | ) | ||
104 | } | ||
105 | |||
106 | fn add_missing_impl_members_inner( | ||
107 | acc: &mut Assists, | ||
108 | ctx: &AssistContext, | ||
109 | mode: AddMissingImplMembersMode, | ||
110 | assist_id: &'static str, | ||
111 | label: &'static str, | ||
112 | ) -> Option<()> { | ||
113 | let _p = profile::span("add_missing_impl_members_inner"); | ||
114 | let impl_def = ctx.find_node_at_offset::<ast::Impl>()?; | ||
115 | let impl_item_list = impl_def.assoc_item_list()?; | ||
116 | |||
117 | let trait_ = resolve_target_trait(&ctx.sema, &impl_def)?; | ||
118 | |||
119 | let def_name = |item: &ast::AssocItem| -> Option<SmolStr> { | ||
120 | match item { | ||
121 | ast::AssocItem::Fn(def) => def.name(), | ||
122 | ast::AssocItem::TypeAlias(def) => def.name(), | ||
123 | ast::AssocItem::Const(def) => def.name(), | ||
124 | ast::AssocItem::MacroCall(_) => None, | ||
125 | } | ||
126 | .map(|it| it.text().clone()) | ||
127 | }; | ||
128 | |||
129 | let missing_items = get_missing_assoc_items(&ctx.sema, &impl_def) | ||
130 | .iter() | ||
131 | .map(|i| match i { | ||
132 | hir::AssocItem::Function(i) => ast::AssocItem::Fn(i.source(ctx.db()).value), | ||
133 | hir::AssocItem::TypeAlias(i) => ast::AssocItem::TypeAlias(i.source(ctx.db()).value), | ||
134 | hir::AssocItem::Const(i) => ast::AssocItem::Const(i.source(ctx.db()).value), | ||
135 | }) | ||
136 | .filter(|t| def_name(&t).is_some()) | ||
137 | .filter(|t| match t { | ||
138 | ast::AssocItem::Fn(def) => match mode { | ||
139 | AddMissingImplMembersMode::DefaultMethodsOnly => def.body().is_some(), | ||
140 | AddMissingImplMembersMode::NoDefaultMethods => def.body().is_none(), | ||
141 | }, | ||
142 | _ => mode == AddMissingImplMembersMode::NoDefaultMethods, | ||
143 | }) | ||
144 | .collect::<Vec<_>>(); | ||
145 | |||
146 | if missing_items.is_empty() { | ||
147 | return None; | ||
148 | } | ||
149 | |||
150 | let target = impl_def.syntax().text_range(); | ||
151 | acc.add(AssistId(assist_id, AssistKind::QuickFix), label, target, |builder| { | ||
152 | let n_existing_items = impl_item_list.assoc_items().count(); | ||
153 | let source_scope = ctx.sema.scope_for_def(trait_); | ||
154 | let target_scope = ctx.sema.scope(impl_item_list.syntax()); | ||
155 | let ast_transform = QualifyPaths::new(&target_scope, &source_scope) | ||
156 | .or(SubstituteTypeParams::for_trait_impl(&source_scope, trait_, impl_def)); | ||
157 | let items = missing_items | ||
158 | .into_iter() | ||
159 | .map(|it| ast_transform::apply(&*ast_transform, it)) | ||
160 | .map(|it| match it { | ||
161 | ast::AssocItem::Fn(def) => ast::AssocItem::Fn(add_body(def)), | ||
162 | ast::AssocItem::TypeAlias(def) => ast::AssocItem::TypeAlias(def.remove_bounds()), | ||
163 | _ => it, | ||
164 | }) | ||
165 | .map(|it| edit::remove_attrs_and_docs(&it)); | ||
166 | let new_impl_item_list = impl_item_list.append_items(items); | ||
167 | let first_new_item = new_impl_item_list.assoc_items().nth(n_existing_items).unwrap(); | ||
168 | |||
169 | let original_range = impl_item_list.syntax().text_range(); | ||
170 | match ctx.config.snippet_cap { | ||
171 | None => builder.replace(original_range, new_impl_item_list.to_string()), | ||
172 | Some(cap) => { | ||
173 | let mut cursor = Cursor::Before(first_new_item.syntax()); | ||
174 | let placeholder; | ||
175 | if let ast::AssocItem::Fn(func) = &first_new_item { | ||
176 | if let Some(m) = func.syntax().descendants().find_map(ast::MacroCall::cast) { | ||
177 | if m.syntax().text() == "todo!()" { | ||
178 | placeholder = m; | ||
179 | cursor = Cursor::Replace(placeholder.syntax()); | ||
180 | } | ||
181 | } | ||
182 | } | ||
183 | builder.replace_snippet( | ||
184 | cap, | ||
185 | original_range, | ||
186 | render_snippet(cap, new_impl_item_list.syntax(), cursor), | ||
187 | ) | ||
188 | } | ||
189 | }; | ||
190 | }) | ||
191 | } | ||
192 | |||
193 | fn add_body(fn_def: ast::Fn) -> ast::Fn { | ||
194 | if fn_def.body().is_some() { | ||
195 | return fn_def; | ||
196 | } | ||
197 | let body = make::block_expr(None, Some(make::expr_todo())).indent(IndentLevel(1)); | ||
198 | fn_def.with_body(body) | ||
199 | } | ||
200 | |||
201 | #[cfg(test)] | ||
202 | mod tests { | ||
203 | use crate::tests::{check_assist, check_assist_not_applicable}; | ||
204 | |||
205 | use super::*; | ||
206 | |||
207 | #[test] | ||
208 | fn test_add_missing_impl_members() { | ||
209 | check_assist( | ||
210 | add_missing_impl_members, | ||
211 | r#" | ||
212 | trait Foo { | ||
213 | type Output; | ||
214 | |||
215 | const CONST: usize = 42; | ||
216 | |||
217 | fn foo(&self); | ||
218 | fn bar(&self); | ||
219 | fn baz(&self); | ||
220 | } | ||
221 | |||
222 | struct S; | ||
223 | |||
224 | impl Foo for S { | ||
225 | fn bar(&self) {} | ||
226 | <|> | ||
227 | }"#, | ||
228 | r#" | ||
229 | trait Foo { | ||
230 | type Output; | ||
231 | |||
232 | const CONST: usize = 42; | ||
233 | |||
234 | fn foo(&self); | ||
235 | fn bar(&self); | ||
236 | fn baz(&self); | ||
237 | } | ||
238 | |||
239 | struct S; | ||
240 | |||
241 | impl Foo for S { | ||
242 | fn bar(&self) {} | ||
243 | $0type Output; | ||
244 | const CONST: usize = 42; | ||
245 | fn foo(&self) { | ||
246 | todo!() | ||
247 | } | ||
248 | fn baz(&self) { | ||
249 | todo!() | ||
250 | } | ||
251 | |||
252 | }"#, | ||
253 | ); | ||
254 | } | ||
255 | |||
256 | #[test] | ||
257 | fn test_copied_overriden_members() { | ||
258 | check_assist( | ||
259 | add_missing_impl_members, | ||
260 | r#" | ||
261 | trait Foo { | ||
262 | fn foo(&self); | ||
263 | fn bar(&self) -> bool { true } | ||
264 | fn baz(&self) -> u32 { 42 } | ||
265 | } | ||
266 | |||
267 | struct S; | ||
268 | |||
269 | impl Foo for S { | ||
270 | fn bar(&self) {} | ||
271 | <|> | ||
272 | }"#, | ||
273 | r#" | ||
274 | trait Foo { | ||
275 | fn foo(&self); | ||
276 | fn bar(&self) -> bool { true } | ||
277 | fn baz(&self) -> u32 { 42 } | ||
278 | } | ||
279 | |||
280 | struct S; | ||
281 | |||
282 | impl Foo for S { | ||
283 | fn bar(&self) {} | ||
284 | fn foo(&self) { | ||
285 | ${0:todo!()} | ||
286 | } | ||
287 | |||
288 | }"#, | ||
289 | ); | ||
290 | } | ||
291 | |||
292 | #[test] | ||
293 | fn test_empty_impl_def() { | ||
294 | check_assist( | ||
295 | add_missing_impl_members, | ||
296 | r#" | ||
297 | trait Foo { fn foo(&self); } | ||
298 | struct S; | ||
299 | impl Foo for S { <|> }"#, | ||
300 | r#" | ||
301 | trait Foo { fn foo(&self); } | ||
302 | struct S; | ||
303 | impl Foo for S { | ||
304 | fn foo(&self) { | ||
305 | ${0:todo!()} | ||
306 | } | ||
307 | }"#, | ||
308 | ); | ||
309 | } | ||
310 | |||
311 | #[test] | ||
312 | fn fill_in_type_params_1() { | ||
313 | check_assist( | ||
314 | add_missing_impl_members, | ||
315 | r#" | ||
316 | trait Foo<T> { fn foo(&self, t: T) -> &T; } | ||
317 | struct S; | ||
318 | impl Foo<u32> for S { <|> }"#, | ||
319 | r#" | ||
320 | trait Foo<T> { fn foo(&self, t: T) -> &T; } | ||
321 | struct S; | ||
322 | impl Foo<u32> for S { | ||
323 | fn foo(&self, t: u32) -> &u32 { | ||
324 | ${0:todo!()} | ||
325 | } | ||
326 | }"#, | ||
327 | ); | ||
328 | } | ||
329 | |||
330 | #[test] | ||
331 | fn fill_in_type_params_2() { | ||
332 | check_assist( | ||
333 | add_missing_impl_members, | ||
334 | r#" | ||
335 | trait Foo<T> { fn foo(&self, t: T) -> &T; } | ||
336 | struct S; | ||
337 | impl<U> Foo<U> for S { <|> }"#, | ||
338 | r#" | ||
339 | trait Foo<T> { fn foo(&self, t: T) -> &T; } | ||
340 | struct S; | ||
341 | impl<U> Foo<U> for S { | ||
342 | fn foo(&self, t: U) -> &U { | ||
343 | ${0:todo!()} | ||
344 | } | ||
345 | }"#, | ||
346 | ); | ||
347 | } | ||
348 | |||
349 | #[test] | ||
350 | fn test_cursor_after_empty_impl_def() { | ||
351 | check_assist( | ||
352 | add_missing_impl_members, | ||
353 | r#" | ||
354 | trait Foo { fn foo(&self); } | ||
355 | struct S; | ||
356 | impl Foo for S {}<|>"#, | ||
357 | r#" | ||
358 | trait Foo { fn foo(&self); } | ||
359 | struct S; | ||
360 | impl Foo for S { | ||
361 | fn foo(&self) { | ||
362 | ${0:todo!()} | ||
363 | } | ||
364 | }"#, | ||
365 | ) | ||
366 | } | ||
367 | |||
368 | #[test] | ||
369 | fn test_qualify_path_1() { | ||
370 | check_assist( | ||
371 | add_missing_impl_members, | ||
372 | r#" | ||
373 | mod foo { | ||
374 | pub struct Bar; | ||
375 | trait Foo { fn foo(&self, bar: Bar); } | ||
376 | } | ||
377 | struct S; | ||
378 | impl foo::Foo for S { <|> }"#, | ||
379 | r#" | ||
380 | mod foo { | ||
381 | pub struct Bar; | ||
382 | trait Foo { fn foo(&self, bar: Bar); } | ||
383 | } | ||
384 | struct S; | ||
385 | impl foo::Foo for S { | ||
386 | fn foo(&self, bar: foo::Bar) { | ||
387 | ${0:todo!()} | ||
388 | } | ||
389 | }"#, | ||
390 | ); | ||
391 | } | ||
392 | |||
393 | #[test] | ||
394 | fn test_qualify_path_generic() { | ||
395 | check_assist( | ||
396 | add_missing_impl_members, | ||
397 | r#" | ||
398 | mod foo { | ||
399 | pub struct Bar<T>; | ||
400 | trait Foo { fn foo(&self, bar: Bar<u32>); } | ||
401 | } | ||
402 | struct S; | ||
403 | impl foo::Foo for S { <|> }"#, | ||
404 | r#" | ||
405 | mod foo { | ||
406 | pub struct Bar<T>; | ||
407 | trait Foo { fn foo(&self, bar: Bar<u32>); } | ||
408 | } | ||
409 | struct S; | ||
410 | impl foo::Foo for S { | ||
411 | fn foo(&self, bar: foo::Bar<u32>) { | ||
412 | ${0:todo!()} | ||
413 | } | ||
414 | }"#, | ||
415 | ); | ||
416 | } | ||
417 | |||
418 | #[test] | ||
419 | fn test_qualify_path_and_substitute_param() { | ||
420 | check_assist( | ||
421 | add_missing_impl_members, | ||
422 | r#" | ||
423 | mod foo { | ||
424 | pub struct Bar<T>; | ||
425 | trait Foo<T> { fn foo(&self, bar: Bar<T>); } | ||
426 | } | ||
427 | struct S; | ||
428 | impl foo::Foo<u32> for S { <|> }"#, | ||
429 | r#" | ||
430 | mod foo { | ||
431 | pub struct Bar<T>; | ||
432 | trait Foo<T> { fn foo(&self, bar: Bar<T>); } | ||
433 | } | ||
434 | struct S; | ||
435 | impl foo::Foo<u32> for S { | ||
436 | fn foo(&self, bar: foo::Bar<u32>) { | ||
437 | ${0:todo!()} | ||
438 | } | ||
439 | }"#, | ||
440 | ); | ||
441 | } | ||
442 | |||
443 | #[test] | ||
444 | fn test_substitute_param_no_qualify() { | ||
445 | // when substituting params, the substituted param should not be qualified! | ||
446 | check_assist( | ||
447 | add_missing_impl_members, | ||
448 | r#" | ||
449 | mod foo { | ||
450 | trait Foo<T> { fn foo(&self, bar: T); } | ||
451 | pub struct Param; | ||
452 | } | ||
453 | struct Param; | ||
454 | struct S; | ||
455 | impl foo::Foo<Param> for S { <|> }"#, | ||
456 | r#" | ||
457 | mod foo { | ||
458 | trait Foo<T> { fn foo(&self, bar: T); } | ||
459 | pub struct Param; | ||
460 | } | ||
461 | struct Param; | ||
462 | struct S; | ||
463 | impl foo::Foo<Param> for S { | ||
464 | fn foo(&self, bar: Param) { | ||
465 | ${0:todo!()} | ||
466 | } | ||
467 | }"#, | ||
468 | ); | ||
469 | } | ||
470 | |||
471 | #[test] | ||
472 | fn test_qualify_path_associated_item() { | ||
473 | check_assist( | ||
474 | add_missing_impl_members, | ||
475 | r#" | ||
476 | mod foo { | ||
477 | pub struct Bar<T>; | ||
478 | impl Bar<T> { type Assoc = u32; } | ||
479 | trait Foo { fn foo(&self, bar: Bar<u32>::Assoc); } | ||
480 | } | ||
481 | struct S; | ||
482 | impl foo::Foo for S { <|> }"#, | ||
483 | r#" | ||
484 | mod foo { | ||
485 | pub struct Bar<T>; | ||
486 | impl Bar<T> { type Assoc = u32; } | ||
487 | trait Foo { fn foo(&self, bar: Bar<u32>::Assoc); } | ||
488 | } | ||
489 | struct S; | ||
490 | impl foo::Foo for S { | ||
491 | fn foo(&self, bar: foo::Bar<u32>::Assoc) { | ||
492 | ${0:todo!()} | ||
493 | } | ||
494 | }"#, | ||
495 | ); | ||
496 | } | ||
497 | |||
498 | #[test] | ||
499 | fn test_qualify_path_nested() { | ||
500 | check_assist( | ||
501 | add_missing_impl_members, | ||
502 | r#" | ||
503 | mod foo { | ||
504 | pub struct Bar<T>; | ||
505 | pub struct Baz; | ||
506 | trait Foo { fn foo(&self, bar: Bar<Baz>); } | ||
507 | } | ||
508 | struct S; | ||
509 | impl foo::Foo for S { <|> }"#, | ||
510 | r#" | ||
511 | mod foo { | ||
512 | pub struct Bar<T>; | ||
513 | pub struct Baz; | ||
514 | trait Foo { fn foo(&self, bar: Bar<Baz>); } | ||
515 | } | ||
516 | struct S; | ||
517 | impl foo::Foo for S { | ||
518 | fn foo(&self, bar: foo::Bar<foo::Baz>) { | ||
519 | ${0:todo!()} | ||
520 | } | ||
521 | }"#, | ||
522 | ); | ||
523 | } | ||
524 | |||
525 | #[test] | ||
526 | fn test_qualify_path_fn_trait_notation() { | ||
527 | check_assist( | ||
528 | add_missing_impl_members, | ||
529 | r#" | ||
530 | mod foo { | ||
531 | pub trait Fn<Args> { type Output; } | ||
532 | trait Foo { fn foo(&self, bar: dyn Fn(u32) -> i32); } | ||
533 | } | ||
534 | struct S; | ||
535 | impl foo::Foo for S { <|> }"#, | ||
536 | r#" | ||
537 | mod foo { | ||
538 | pub trait Fn<Args> { type Output; } | ||
539 | trait Foo { fn foo(&self, bar: dyn Fn(u32) -> i32); } | ||
540 | } | ||
541 | struct S; | ||
542 | impl foo::Foo for S { | ||
543 | fn foo(&self, bar: dyn Fn(u32) -> i32) { | ||
544 | ${0:todo!()} | ||
545 | } | ||
546 | }"#, | ||
547 | ); | ||
548 | } | ||
549 | |||
550 | #[test] | ||
551 | fn test_empty_trait() { | ||
552 | check_assist_not_applicable( | ||
553 | add_missing_impl_members, | ||
554 | r#" | ||
555 | trait Foo; | ||
556 | struct S; | ||
557 | impl Foo for S { <|> }"#, | ||
558 | ) | ||
559 | } | ||
560 | |||
561 | #[test] | ||
562 | fn test_ignore_unnamed_trait_members_and_default_methods() { | ||
563 | check_assist_not_applicable( | ||
564 | add_missing_impl_members, | ||
565 | r#" | ||
566 | trait Foo { | ||
567 | fn (arg: u32); | ||
568 | fn valid(some: u32) -> bool { false } | ||
569 | } | ||
570 | struct S; | ||
571 | impl Foo for S { <|> }"#, | ||
572 | ) | ||
573 | } | ||
574 | |||
575 | #[test] | ||
576 | fn test_with_docstring_and_attrs() { | ||
577 | check_assist( | ||
578 | add_missing_impl_members, | ||
579 | r#" | ||
580 | #[doc(alias = "test alias")] | ||
581 | trait Foo { | ||
582 | /// doc string | ||
583 | type Output; | ||
584 | |||
585 | #[must_use] | ||
586 | fn foo(&self); | ||
587 | } | ||
588 | struct S; | ||
589 | impl Foo for S {}<|>"#, | ||
590 | r#" | ||
591 | #[doc(alias = "test alias")] | ||
592 | trait Foo { | ||
593 | /// doc string | ||
594 | type Output; | ||
595 | |||
596 | #[must_use] | ||
597 | fn foo(&self); | ||
598 | } | ||
599 | struct S; | ||
600 | impl Foo for S { | ||
601 | $0type Output; | ||
602 | fn foo(&self) { | ||
603 | todo!() | ||
604 | } | ||
605 | }"#, | ||
606 | ) | ||
607 | } | ||
608 | |||
609 | #[test] | ||
610 | fn test_default_methods() { | ||
611 | check_assist( | ||
612 | add_missing_default_members, | ||
613 | r#" | ||
614 | trait Foo { | ||
615 | type Output; | ||
616 | |||
617 | const CONST: usize = 42; | ||
618 | |||
619 | fn valid(some: u32) -> bool { false } | ||
620 | fn foo(some: u32) -> bool; | ||
621 | } | ||
622 | struct S; | ||
623 | impl Foo for S { <|> }"#, | ||
624 | r#" | ||
625 | trait Foo { | ||
626 | type Output; | ||
627 | |||
628 | const CONST: usize = 42; | ||
629 | |||
630 | fn valid(some: u32) -> bool { false } | ||
631 | fn foo(some: u32) -> bool; | ||
632 | } | ||
633 | struct S; | ||
634 | impl Foo for S { | ||
635 | $0fn valid(some: u32) -> bool { false } | ||
636 | }"#, | ||
637 | ) | ||
638 | } | ||
639 | |||
640 | #[test] | ||
641 | fn test_generic_single_default_parameter() { | ||
642 | check_assist( | ||
643 | add_missing_impl_members, | ||
644 | r#" | ||
645 | trait Foo<T = Self> { | ||
646 | fn bar(&self, other: &T); | ||
647 | } | ||
648 | |||
649 | struct S; | ||
650 | impl Foo for S { <|> }"#, | ||
651 | r#" | ||
652 | trait Foo<T = Self> { | ||
653 | fn bar(&self, other: &T); | ||
654 | } | ||
655 | |||
656 | struct S; | ||
657 | impl Foo for S { | ||
658 | fn bar(&self, other: &Self) { | ||
659 | ${0:todo!()} | ||
660 | } | ||
661 | }"#, | ||
662 | ) | ||
663 | } | ||
664 | |||
665 | #[test] | ||
666 | fn test_generic_default_parameter_is_second() { | ||
667 | check_assist( | ||
668 | add_missing_impl_members, | ||
669 | r#" | ||
670 | trait Foo<T1, T2 = Self> { | ||
671 | fn bar(&self, this: &T1, that: &T2); | ||
672 | } | ||
673 | |||
674 | struct S<T>; | ||
675 | impl Foo<T> for S<T> { <|> }"#, | ||
676 | r#" | ||
677 | trait Foo<T1, T2 = Self> { | ||
678 | fn bar(&self, this: &T1, that: &T2); | ||
679 | } | ||
680 | |||
681 | struct S<T>; | ||
682 | impl Foo<T> for S<T> { | ||
683 | fn bar(&self, this: &T, that: &Self) { | ||
684 | ${0:todo!()} | ||
685 | } | ||
686 | }"#, | ||
687 | ) | ||
688 | } | ||
689 | |||
690 | #[test] | ||
691 | fn test_assoc_type_bounds_are_removed() { | ||
692 | check_assist( | ||
693 | add_missing_impl_members, | ||
694 | r#" | ||
695 | trait Tr { | ||
696 | type Ty: Copy + 'static; | ||
697 | } | ||
698 | |||
699 | impl Tr for ()<|> { | ||
700 | }"#, | ||
701 | r#" | ||
702 | trait Tr { | ||
703 | type Ty: Copy + 'static; | ||
704 | } | ||
705 | |||
706 | impl Tr for () { | ||
707 | $0type Ty; | ||
708 | }"#, | ||
709 | ) | ||
710 | } | ||
711 | } | ||
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..cce789972 --- /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, | ||
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 | } | ||
312 | |||
313 | #[test] | ||
314 | fn applicable_when_found_an_import_in_macros() { | ||
315 | check_assist( | ||
316 | auto_import, | ||
317 | r" | ||
318 | macro_rules! foo { | ||
319 | ($i:ident) => { fn foo(a: $i) {} } | ||
320 | } | ||
321 | foo!(Pub<|>Struct); | ||
322 | |||
323 | pub mod PubMod { | ||
324 | pub struct PubStruct; | ||
325 | } | ||
326 | ", | ||
327 | r" | ||
328 | use PubMod::PubStruct; | ||
329 | |||
330 | macro_rules! foo { | ||
331 | ($i:ident) => { fn foo(a: $i) {} } | ||
332 | } | ||
333 | foo!(PubStruct); | ||
334 | |||
335 | pub mod PubMod { | ||
336 | pub struct PubStruct; | ||
337 | } | ||
338 | ", | ||
339 | ); | ||
340 | } | ||
341 | |||
342 | #[test] | ||
343 | fn auto_imports_are_merged() { | ||
344 | check_assist( | ||
345 | auto_import, | ||
346 | r" | ||
347 | use PubMod::PubStruct1; | ||
348 | |||
349 | struct Test { | ||
350 | test: Pub<|>Struct2<u8>, | ||
351 | } | ||
352 | |||
353 | pub mod PubMod { | ||
354 | pub struct PubStruct1; | ||
355 | pub struct PubStruct2<T> { | ||
356 | _t: T, | ||
357 | } | ||
358 | } | ||
359 | ", | ||
360 | r" | ||
361 | use PubMod::{PubStruct2, PubStruct1}; | ||
362 | |||
363 | struct Test { | ||
364 | test: PubStruct2<u8>, | ||
365 | } | ||
366 | |||
367 | pub mod PubMod { | ||
368 | pub struct PubStruct1; | ||
369 | pub struct PubStruct2<T> { | ||
370 | _t: T, | ||
371 | } | ||
372 | } | ||
373 | ", | ||
374 | ); | ||
375 | } | ||
376 | |||
377 | #[test] | ||
378 | fn applicable_when_found_multiple_imports() { | ||
379 | check_assist( | ||
380 | auto_import, | ||
381 | r" | ||
382 | PubSt<|>ruct | ||
383 | |||
384 | pub mod PubMod1 { | ||
385 | pub struct PubStruct; | ||
386 | } | ||
387 | pub mod PubMod2 { | ||
388 | pub struct PubStruct; | ||
389 | } | ||
390 | pub mod PubMod3 { | ||
391 | pub struct PubStruct; | ||
392 | } | ||
393 | ", | ||
394 | r" | ||
395 | use PubMod3::PubStruct; | ||
396 | |||
397 | PubStruct | ||
398 | |||
399 | pub mod PubMod1 { | ||
400 | pub struct PubStruct; | ||
401 | } | ||
402 | pub mod PubMod2 { | ||
403 | pub struct PubStruct; | ||
404 | } | ||
405 | pub mod PubMod3 { | ||
406 | pub struct PubStruct; | ||
407 | } | ||
408 | ", | ||
409 | ); | ||
410 | } | ||
411 | |||
412 | #[test] | ||
413 | fn not_applicable_for_already_imported_types() { | ||
414 | check_assist_not_applicable( | ||
415 | auto_import, | ||
416 | r" | ||
417 | use PubMod::PubStruct; | ||
418 | |||
419 | PubStruct<|> | ||
420 | |||
421 | pub mod PubMod { | ||
422 | pub struct PubStruct; | ||
423 | } | ||
424 | ", | ||
425 | ); | ||
426 | } | ||
427 | |||
428 | #[test] | ||
429 | fn not_applicable_for_types_with_private_paths() { | ||
430 | check_assist_not_applicable( | ||
431 | auto_import, | ||
432 | r" | ||
433 | PrivateStruct<|> | ||
434 | |||
435 | pub mod PubMod { | ||
436 | struct PrivateStruct; | ||
437 | } | ||
438 | ", | ||
439 | ); | ||
440 | } | ||
441 | |||
442 | #[test] | ||
443 | fn not_applicable_when_no_imports_found() { | ||
444 | check_assist_not_applicable( | ||
445 | auto_import, | ||
446 | " | ||
447 | PubStruct<|>", | ||
448 | ); | ||
449 | } | ||
450 | |||
451 | #[test] | ||
452 | fn not_applicable_in_import_statements() { | ||
453 | check_assist_not_applicable( | ||
454 | auto_import, | ||
455 | r" | ||
456 | use PubStruct<|>; | ||
457 | |||
458 | pub mod PubMod { | ||
459 | pub struct PubStruct; | ||
460 | }", | ||
461 | ); | ||
462 | } | ||
463 | |||
464 | #[test] | ||
465 | fn function_import() { | ||
466 | check_assist( | ||
467 | auto_import, | ||
468 | r" | ||
469 | test_function<|> | ||
470 | |||
471 | pub mod PubMod { | ||
472 | pub fn test_function() {}; | ||
473 | } | ||
474 | ", | ||
475 | r" | ||
476 | use PubMod::test_function; | ||
477 | |||
478 | test_function | ||
479 | |||
480 | pub mod PubMod { | ||
481 | pub fn test_function() {}; | ||
482 | } | ||
483 | ", | ||
484 | ); | ||
485 | } | ||
486 | |||
487 | #[test] | ||
488 | fn macro_import() { | ||
489 | check_assist( | ||
490 | auto_import, | ||
491 | r" | ||
492 | //- /lib.rs crate:crate_with_macro | ||
493 | #[macro_export] | ||
494 | macro_rules! foo { | ||
495 | () => () | ||
496 | } | ||
497 | |||
498 | //- /main.rs crate:main deps:crate_with_macro | ||
499 | fn main() { | ||
500 | foo<|> | ||
501 | } | ||
502 | ", | ||
503 | r"use crate_with_macro::foo; | ||
504 | |||
505 | fn main() { | ||
506 | foo | ||
507 | } | ||
508 | ", | ||
509 | ); | ||
510 | } | ||
511 | |||
512 | #[test] | ||
513 | fn auto_import_target() { | ||
514 | check_assist_target( | ||
515 | auto_import, | ||
516 | r" | ||
517 | struct AssistInfo { | ||
518 | group_label: Option<<|>GroupLabel>, | ||
519 | } | ||
520 | |||
521 | mod m { pub struct GroupLabel; } | ||
522 | ", | ||
523 | "GroupLabel", | ||
524 | ) | ||
525 | } | ||
526 | |||
527 | #[test] | ||
528 | fn not_applicable_when_path_start_is_imported() { | ||
529 | check_assist_not_applicable( | ||
530 | auto_import, | ||
531 | r" | ||
532 | pub mod mod1 { | ||
533 | pub mod mod2 { | ||
534 | pub mod mod3 { | ||
535 | pub struct TestStruct; | ||
536 | } | ||
537 | } | ||
538 | } | ||
539 | |||
540 | use mod1::mod2; | ||
541 | fn main() { | ||
542 | mod2::mod3::TestStruct<|> | ||
543 | } | ||
544 | ", | ||
545 | ); | ||
546 | } | ||
547 | |||
548 | #[test] | ||
549 | fn not_applicable_for_imported_function() { | ||
550 | check_assist_not_applicable( | ||
551 | auto_import, | ||
552 | r" | ||
553 | pub mod test_mod { | ||
554 | pub fn test_function() {} | ||
555 | } | ||
556 | |||
557 | use test_mod::test_function; | ||
558 | fn main() { | ||
559 | test_function<|> | ||
560 | } | ||
561 | ", | ||
562 | ); | ||
563 | } | ||
564 | |||
565 | #[test] | ||
566 | fn associated_struct_function() { | ||
567 | check_assist( | ||
568 | auto_import, | ||
569 | r" | ||
570 | mod test_mod { | ||
571 | pub struct TestStruct {} | ||
572 | impl TestStruct { | ||
573 | pub fn test_function() {} | ||
574 | } | ||
575 | } | ||
576 | |||
577 | fn main() { | ||
578 | TestStruct::test_function<|> | ||
579 | } | ||
580 | ", | ||
581 | r" | ||
582 | use test_mod::TestStruct; | ||
583 | |||
584 | mod test_mod { | ||
585 | pub struct TestStruct {} | ||
586 | impl TestStruct { | ||
587 | pub fn test_function() {} | ||
588 | } | ||
589 | } | ||
590 | |||
591 | fn main() { | ||
592 | TestStruct::test_function | ||
593 | } | ||
594 | ", | ||
595 | ); | ||
596 | } | ||
597 | |||
598 | #[test] | ||
599 | fn associated_struct_const() { | ||
600 | check_assist( | ||
601 | auto_import, | ||
602 | r" | ||
603 | mod test_mod { | ||
604 | pub struct TestStruct {} | ||
605 | impl TestStruct { | ||
606 | const TEST_CONST: u8 = 42; | ||
607 | } | ||
608 | } | ||
609 | |||
610 | fn main() { | ||
611 | TestStruct::TEST_CONST<|> | ||
612 | } | ||
613 | ", | ||
614 | r" | ||
615 | use test_mod::TestStruct; | ||
616 | |||
617 | mod test_mod { | ||
618 | pub struct TestStruct {} | ||
619 | impl TestStruct { | ||
620 | const TEST_CONST: u8 = 42; | ||
621 | } | ||
622 | } | ||
623 | |||
624 | fn main() { | ||
625 | TestStruct::TEST_CONST | ||
626 | } | ||
627 | ", | ||
628 | ); | ||
629 | } | ||
630 | |||
631 | #[test] | ||
632 | fn associated_trait_function() { | ||
633 | check_assist( | ||
634 | auto_import, | ||
635 | r" | ||
636 | mod test_mod { | ||
637 | pub trait TestTrait { | ||
638 | fn test_function(); | ||
639 | } | ||
640 | pub struct TestStruct {} | ||
641 | impl TestTrait for TestStruct { | ||
642 | fn test_function() {} | ||
643 | } | ||
644 | } | ||
645 | |||
646 | fn main() { | ||
647 | test_mod::TestStruct::test_function<|> | ||
648 | } | ||
649 | ", | ||
650 | r" | ||
651 | use test_mod::TestTrait; | ||
652 | |||
653 | mod test_mod { | ||
654 | pub trait TestTrait { | ||
655 | fn test_function(); | ||
656 | } | ||
657 | pub struct TestStruct {} | ||
658 | impl TestTrait for TestStruct { | ||
659 | fn test_function() {} | ||
660 | } | ||
661 | } | ||
662 | |||
663 | fn main() { | ||
664 | test_mod::TestStruct::test_function | ||
665 | } | ||
666 | ", | ||
667 | ); | ||
668 | } | ||
669 | |||
670 | #[test] | ||
671 | fn not_applicable_for_imported_trait_for_function() { | ||
672 | check_assist_not_applicable( | ||
673 | auto_import, | ||
674 | r" | ||
675 | mod test_mod { | ||
676 | pub trait TestTrait { | ||
677 | fn test_function(); | ||
678 | } | ||
679 | pub trait TestTrait2 { | ||
680 | fn test_function(); | ||
681 | } | ||
682 | pub enum TestEnum { | ||
683 | One, | ||
684 | Two, | ||
685 | } | ||
686 | impl TestTrait2 for TestEnum { | ||
687 | fn test_function() {} | ||
688 | } | ||
689 | impl TestTrait for TestEnum { | ||
690 | fn test_function() {} | ||
691 | } | ||
692 | } | ||
693 | |||
694 | use test_mod::TestTrait2; | ||
695 | fn main() { | ||
696 | test_mod::TestEnum::test_function<|>; | ||
697 | } | ||
698 | ", | ||
699 | ) | ||
700 | } | ||
701 | |||
702 | #[test] | ||
703 | fn associated_trait_const() { | ||
704 | check_assist( | ||
705 | auto_import, | ||
706 | r" | ||
707 | mod test_mod { | ||
708 | pub trait TestTrait { | ||
709 | const TEST_CONST: u8; | ||
710 | } | ||
711 | pub struct TestStruct {} | ||
712 | impl TestTrait for TestStruct { | ||
713 | const TEST_CONST: u8 = 42; | ||
714 | } | ||
715 | } | ||
716 | |||
717 | fn main() { | ||
718 | test_mod::TestStruct::TEST_CONST<|> | ||
719 | } | ||
720 | ", | ||
721 | r" | ||
722 | use test_mod::TestTrait; | ||
723 | |||
724 | mod test_mod { | ||
725 | pub trait TestTrait { | ||
726 | const TEST_CONST: u8; | ||
727 | } | ||
728 | pub struct TestStruct {} | ||
729 | impl TestTrait for TestStruct { | ||
730 | const TEST_CONST: u8 = 42; | ||
731 | } | ||
732 | } | ||
733 | |||
734 | fn main() { | ||
735 | test_mod::TestStruct::TEST_CONST | ||
736 | } | ||
737 | ", | ||
738 | ); | ||
739 | } | ||
740 | |||
741 | #[test] | ||
742 | fn not_applicable_for_imported_trait_for_const() { | ||
743 | check_assist_not_applicable( | ||
744 | auto_import, | ||
745 | r" | ||
746 | mod test_mod { | ||
747 | pub trait TestTrait { | ||
748 | const TEST_CONST: u8; | ||
749 | } | ||
750 | pub trait TestTrait2 { | ||
751 | const TEST_CONST: f64; | ||
752 | } | ||
753 | pub enum TestEnum { | ||
754 | One, | ||
755 | Two, | ||
756 | } | ||
757 | impl TestTrait2 for TestEnum { | ||
758 | const TEST_CONST: f64 = 42.0; | ||
759 | } | ||
760 | impl TestTrait for TestEnum { | ||
761 | const TEST_CONST: u8 = 42; | ||
762 | } | ||
763 | } | ||
764 | |||
765 | use test_mod::TestTrait2; | ||
766 | fn main() { | ||
767 | test_mod::TestEnum::TEST_CONST<|>; | ||
768 | } | ||
769 | ", | ||
770 | ) | ||
771 | } | ||
772 | |||
773 | #[test] | ||
774 | fn trait_method() { | ||
775 | check_assist( | ||
776 | auto_import, | ||
777 | r" | ||
778 | mod test_mod { | ||
779 | pub trait TestTrait { | ||
780 | fn test_method(&self); | ||
781 | } | ||
782 | pub struct TestStruct {} | ||
783 | impl TestTrait for TestStruct { | ||
784 | fn test_method(&self) {} | ||
785 | } | ||
786 | } | ||
787 | |||
788 | fn main() { | ||
789 | let test_struct = test_mod::TestStruct {}; | ||
790 | test_struct.test_meth<|>od() | ||
791 | } | ||
792 | ", | ||
793 | r" | ||
794 | use test_mod::TestTrait; | ||
795 | |||
796 | mod test_mod { | ||
797 | pub trait TestTrait { | ||
798 | fn test_method(&self); | ||
799 | } | ||
800 | pub struct TestStruct {} | ||
801 | impl TestTrait for TestStruct { | ||
802 | fn test_method(&self) {} | ||
803 | } | ||
804 | } | ||
805 | |||
806 | fn main() { | ||
807 | let test_struct = test_mod::TestStruct {}; | ||
808 | test_struct.test_method() | ||
809 | } | ||
810 | ", | ||
811 | ); | ||
812 | } | ||
813 | |||
814 | #[test] | ||
815 | fn trait_method_cross_crate() { | ||
816 | check_assist( | ||
817 | auto_import, | ||
818 | r" | ||
819 | //- /main.rs crate:main deps:dep | ||
820 | fn main() { | ||
821 | let test_struct = dep::test_mod::TestStruct {}; | ||
822 | test_struct.test_meth<|>od() | ||
823 | } | ||
824 | //- /dep.rs crate:dep | ||
825 | pub mod test_mod { | ||
826 | pub trait TestTrait { | ||
827 | fn test_method(&self); | ||
828 | } | ||
829 | pub struct TestStruct {} | ||
830 | impl TestTrait for TestStruct { | ||
831 | fn test_method(&self) {} | ||
832 | } | ||
833 | } | ||
834 | ", | ||
835 | r" | ||
836 | use dep::test_mod::TestTrait; | ||
837 | |||
838 | fn main() { | ||
839 | let test_struct = dep::test_mod::TestStruct {}; | ||
840 | test_struct.test_method() | ||
841 | } | ||
842 | ", | ||
843 | ); | ||
844 | } | ||
845 | |||
846 | #[test] | ||
847 | fn assoc_fn_cross_crate() { | ||
848 | check_assist( | ||
849 | auto_import, | ||
850 | r" | ||
851 | //- /main.rs crate:main deps:dep | ||
852 | fn main() { | ||
853 | dep::test_mod::TestStruct::test_func<|>tion | ||
854 | } | ||
855 | //- /dep.rs crate:dep | ||
856 | pub mod test_mod { | ||
857 | pub trait TestTrait { | ||
858 | fn test_function(); | ||
859 | } | ||
860 | pub struct TestStruct {} | ||
861 | impl TestTrait for TestStruct { | ||
862 | fn test_function() {} | ||
863 | } | ||
864 | } | ||
865 | ", | ||
866 | r" | ||
867 | use dep::test_mod::TestTrait; | ||
868 | |||
869 | fn main() { | ||
870 | dep::test_mod::TestStruct::test_function | ||
871 | } | ||
872 | ", | ||
873 | ); | ||
874 | } | ||
875 | |||
876 | #[test] | ||
877 | fn assoc_const_cross_crate() { | ||
878 | check_assist( | ||
879 | auto_import, | ||
880 | r" | ||
881 | //- /main.rs crate:main deps:dep | ||
882 | fn main() { | ||
883 | dep::test_mod::TestStruct::CONST<|> | ||
884 | } | ||
885 | //- /dep.rs crate:dep | ||
886 | pub mod test_mod { | ||
887 | pub trait TestTrait { | ||
888 | const CONST: bool; | ||
889 | } | ||
890 | pub struct TestStruct {} | ||
891 | impl TestTrait for TestStruct { | ||
892 | const CONST: bool = true; | ||
893 | } | ||
894 | } | ||
895 | ", | ||
896 | r" | ||
897 | use dep::test_mod::TestTrait; | ||
898 | |||
899 | fn main() { | ||
900 | dep::test_mod::TestStruct::CONST | ||
901 | } | ||
902 | ", | ||
903 | ); | ||
904 | } | ||
905 | |||
906 | #[test] | ||
907 | fn assoc_fn_as_method_cross_crate() { | ||
908 | check_assist_not_applicable( | ||
909 | auto_import, | ||
910 | r" | ||
911 | //- /main.rs crate:main deps:dep | ||
912 | fn main() { | ||
913 | let test_struct = dep::test_mod::TestStruct {}; | ||
914 | test_struct.test_func<|>tion() | ||
915 | } | ||
916 | //- /dep.rs crate:dep | ||
917 | pub mod test_mod { | ||
918 | pub trait TestTrait { | ||
919 | fn test_function(); | ||
920 | } | ||
921 | pub struct TestStruct {} | ||
922 | impl TestTrait for TestStruct { | ||
923 | fn test_function() {} | ||
924 | } | ||
925 | } | ||
926 | ", | ||
927 | ); | ||
928 | } | ||
929 | |||
930 | #[test] | ||
931 | fn private_trait_cross_crate() { | ||
932 | check_assist_not_applicable( | ||
933 | auto_import, | ||
934 | r" | ||
935 | //- /main.rs crate:main deps:dep | ||
936 | fn main() { | ||
937 | let test_struct = dep::test_mod::TestStruct {}; | ||
938 | test_struct.test_meth<|>od() | ||
939 | } | ||
940 | //- /dep.rs crate:dep | ||
941 | pub mod test_mod { | ||
942 | trait TestTrait { | ||
943 | fn test_method(&self); | ||
944 | } | ||
945 | pub struct TestStruct {} | ||
946 | impl TestTrait for TestStruct { | ||
947 | fn test_method(&self) {} | ||
948 | } | ||
949 | } | ||
950 | ", | ||
951 | ); | ||
952 | } | ||
953 | |||
954 | #[test] | ||
955 | fn not_applicable_for_imported_trait_for_method() { | ||
956 | check_assist_not_applicable( | ||
957 | auto_import, | ||
958 | r" | ||
959 | mod test_mod { | ||
960 | pub trait TestTrait { | ||
961 | fn test_method(&self); | ||
962 | } | ||
963 | pub trait TestTrait2 { | ||
964 | fn test_method(&self); | ||
965 | } | ||
966 | pub enum TestEnum { | ||
967 | One, | ||
968 | Two, | ||
969 | } | ||
970 | impl TestTrait2 for TestEnum { | ||
971 | fn test_method(&self) {} | ||
972 | } | ||
973 | impl TestTrait for TestEnum { | ||
974 | fn test_method(&self) {} | ||
975 | } | ||
976 | } | ||
977 | |||
978 | use test_mod::TestTrait2; | ||
979 | fn main() { | ||
980 | let one = test_mod::TestEnum::One; | ||
981 | one.test<|>_method(); | ||
982 | } | ||
983 | ", | ||
984 | ) | ||
985 | } | ||
986 | |||
987 | #[test] | ||
988 | fn dep_import() { | ||
989 | check_assist( | ||
990 | auto_import, | ||
991 | r" | ||
992 | //- /lib.rs crate:dep | ||
993 | pub struct Struct; | ||
994 | |||
995 | //- /main.rs crate:main deps:dep | ||
996 | fn main() { | ||
997 | Struct<|> | ||
998 | } | ||
999 | ", | ||
1000 | r"use dep::Struct; | ||
1001 | |||
1002 | fn main() { | ||
1003 | Struct | ||
1004 | } | ||
1005 | ", | ||
1006 | ); | ||
1007 | } | ||
1008 | |||
1009 | #[test] | ||
1010 | fn whole_segment() { | ||
1011 | // Tests that only imports whose last segment matches the identifier get suggested. | ||
1012 | check_assist( | ||
1013 | auto_import, | ||
1014 | r" | ||
1015 | //- /lib.rs crate:dep | ||
1016 | pub mod fmt { | ||
1017 | pub trait Display {} | ||
1018 | } | ||
1019 | |||
1020 | pub fn panic_fmt() {} | ||
1021 | |||
1022 | //- /main.rs crate:main deps:dep | ||
1023 | struct S; | ||
1024 | |||
1025 | impl f<|>mt::Display for S {} | ||
1026 | ", | ||
1027 | r"use dep::fmt; | ||
1028 | |||
1029 | struct S; | ||
1030 | |||
1031 | impl fmt::Display for S {} | ||
1032 | ", | ||
1033 | ); | ||
1034 | } | ||
1035 | |||
1036 | #[test] | ||
1037 | fn macro_generated() { | ||
1038 | // Tests that macro-generated items are suggested from external crates. | ||
1039 | check_assist( | ||
1040 | auto_import, | ||
1041 | r" | ||
1042 | //- /lib.rs crate:dep | ||
1043 | macro_rules! mac { | ||
1044 | () => { | ||
1045 | pub struct Cheese; | ||
1046 | }; | ||
1047 | } | ||
1048 | |||
1049 | mac!(); | ||
1050 | |||
1051 | //- /main.rs crate:main deps:dep | ||
1052 | fn main() { | ||
1053 | Cheese<|>; | ||
1054 | } | ||
1055 | ", | ||
1056 | r"use dep::Cheese; | ||
1057 | |||
1058 | fn main() { | ||
1059 | Cheese; | ||
1060 | } | ||
1061 | ", | ||
1062 | ); | ||
1063 | } | ||
1064 | |||
1065 | #[test] | ||
1066 | fn casing() { | ||
1067 | // Tests that differently cased names don't interfere and we only suggest the matching one. | ||
1068 | check_assist( | ||
1069 | auto_import, | ||
1070 | r" | ||
1071 | //- /lib.rs crate:dep | ||
1072 | pub struct FMT; | ||
1073 | pub struct fmt; | ||
1074 | |||
1075 | //- /main.rs crate:main deps:dep | ||
1076 | fn main() { | ||
1077 | FMT<|>; | ||
1078 | } | ||
1079 | ", | ||
1080 | r"use dep::FMT; | ||
1081 | |||
1082 | fn main() { | ||
1083 | FMT; | ||
1084 | } | ||
1085 | ", | ||
1086 | ); | ||
1087 | } | ||
1088 | } | ||
diff --git a/crates/assists/src/handlers/change_return_type_to_result.rs b/crates/assists/src/handlers/change_return_type_to_result.rs new file mode 100644 index 000000000..be480943c --- /dev/null +++ b/crates/assists/src/handlers/change_return_type_to_result.rs | |||
@@ -0,0 +1,998 @@ | |||
1 | use std::iter; | ||
2 | |||
3 | use syntax::{ | ||
4 | ast::{self, make, B |