diff options
-rw-r--r-- | .cargo/config | 12 | ||||
-rw-r--r-- | .travis.yml | 9 | ||||
-rw-r--r-- | Cargo.lock | 101 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | crates/ra_assists/src/assist_ctx.rs | 15 | ||||
-rw-r--r-- | crates/ra_assists/src/auto_import.rs | 18 | ||||
-rw-r--r-- | crates/ra_cli/src/analysis_bench.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/nameres/collector.rs | 148 | ||||
-rw-r--r-- | crates/ra_hir/src/nameres/tests/mods.rs | 53 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_scope.rs | 447 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_snippet.rs | 77 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/completion_item.rs | 7 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/presentation.rs | 203 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap | 23 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap | 31 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap | 32 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap | 30 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap | 24 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap | 16 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap | 16 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap | 24 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap | 15 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap | 23 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap | 22 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap | 24 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap | 24 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap | 16 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap | 30 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap | 23 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap | 23 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap | 23 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path.snap | 5 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path2.snap | 5 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap | 22 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap | 23 | ||||
-rw-r--r-- | crates/ra_ide_api/src/display/snapshots/tests__file_structure.snap | 191 | ||||
-rw-r--r-- | crates/ra_ide_api/src/display/structure.rs | 188 | ||||
-rw-r--r-- | crates/ra_ide_api/src/inlay_hints.rs | 470 | ||||
-rw-r--r-- | crates/ra_ide_api/src/lib.rs | 86 | ||||
-rw-r--r-- | crates/ra_ide_api/src/references.rs | 72 | ||||
-rw-r--r-- | crates/ra_ide_api/src/runnables.rs | 72 | ||||
-rw-r--r-- | crates/ra_ide_api/src/snapshots/tests__highlights_code_inside_macros.snap | 44 | ||||
-rw-r--r-- | crates/ra_ide_api/src/snapshots/tests__rename_mod.snap | 38 | ||||
-rw-r--r-- | crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap | 38 | ||||
-rw-r--r-- | crates/ra_ide_api/src/snapshots/tests__runnables.snap | 24 | ||||
-rw-r--r-- | crates/ra_ide_api/src/snapshots/tests__runnables_module.snap | 20 | ||||
-rw-r--r-- | crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap | 20 | ||||
-rw-r--r-- | crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap | 20 | ||||
-rw-r--r-- | crates/ra_ide_api/src/syntax_tree.rs | 14 | ||||
-rw-r--r-- | crates/ra_ide_api/src/typing.rs | 4 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/conv.rs | 14 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 70 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/req.rs | 4 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/world.rs | 7 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/expressions/atom.rs | 3 | ||||
-rw-r--r-- | crates/ra_syntax/Cargo.toml | 4 | ||||
-rw-r--r-- | crates/ra_syntax/src/lib.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/tests.rs (renamed from crates/ra_syntax/tests/test.rs) | 17 | ||||
-rw-r--r-- | crates/ra_syntax/src/validation.rs | 91 | ||||
-rw-r--r-- | crates/ra_syntax/src/validation/unescape.rs | 521 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/00012_block_comment.rs (renamed from crates/ra_syntax/tests/data/lexer/00012_block_comment.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/00012_block_comment.txt (renamed from crates/ra_syntax/tests/data/lexer/00012_block_comment.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0001_hello.rs (renamed from crates/ra_syntax/tests/data/lexer/0001_hello.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0001_hello.txt (renamed from crates/ra_syntax/tests/data/lexer/0001_hello.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0002_whitespace.rs (renamed from crates/ra_syntax/tests/data/lexer/0002_whitespace.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0002_whitespace.txt (renamed from crates/ra_syntax/tests/data/lexer/0002_whitespace.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0003_ident.rs (renamed from crates/ra_syntax/tests/data/lexer/0003_ident.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0003_ident.txt (renamed from crates/ra_syntax/tests/data/lexer/0003_ident.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0004_numbers.rs (renamed from crates/ra_syntax/tests/data/lexer/0004_numbers.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0004_numbers.txt (renamed from crates/ra_syntax/tests/data/lexer/0004_numbers.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0005_symbols.rs (renamed from crates/ra_syntax/tests/data/lexer/0005_symbols.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0005_symbols.txt (renamed from crates/ra_syntax/tests/data/lexer/0005_symbols.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0006_chars.rs (renamed from crates/ra_syntax/tests/data/lexer/0006_chars.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0006_chars.txt (renamed from crates/ra_syntax/tests/data/lexer/0006_chars.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0007_lifetimes.rs (renamed from crates/ra_syntax/tests/data/lexer/0007_lifetimes.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0007_lifetimes.txt (renamed from crates/ra_syntax/tests/data/lexer/0007_lifetimes.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0008_byte_strings.rs (renamed from crates/ra_syntax/tests/data/lexer/0008_byte_strings.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0008_byte_strings.txt (renamed from crates/ra_syntax/tests/data/lexer/0008_byte_strings.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0009_strings.rs (renamed from crates/ra_syntax/tests/data/lexer/0009_strings.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0009_strings.txt (renamed from crates/ra_syntax/tests/data/lexer/0009_strings.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0010_comments.rs (renamed from crates/ra_syntax/tests/data/lexer/0010_comments.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0010_comments.txt (renamed from crates/ra_syntax/tests/data/lexer/0010_comments.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0011_keywords.rs (renamed from crates/ra_syntax/tests/data/lexer/0011_keywords.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0011_keywords.txt (renamed from crates/ra_syntax/tests/data/lexer/0011_keywords.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0013_raw_strings.rs (renamed from crates/ra_syntax/tests/data/lexer/0013_raw_strings.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0013_raw_strings.txt (renamed from crates/ra_syntax/tests/data/lexer/0013_raw_strings.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0014_unclosed_char.rs (renamed from crates/ra_syntax/tests/data/lexer/0014_unclosed_char.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0014_unclosed_char.txt (renamed from crates/ra_syntax/tests/data/lexer/0014_unclosed_char.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0015_unclosed_string.rs (renamed from crates/ra_syntax/tests/data/lexer/0015_unclosed_string.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0015_unclosed_string.txt (renamed from crates/ra_syntax/tests/data/lexer/0015_unclosed_string.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0016_raw_ident.rs (renamed from crates/ra_syntax/tests/data/lexer/0016_raw_ident.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/lexer/0016_raw_ident.txt (renamed from crates/ra_syntax/tests/data/lexer/0016_raw_ident.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rs (renamed from crates/ra_syntax/tests/data/parser/err/0000_struct_field_missing_comma.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.txt (renamed from crates/ra_syntax/tests/data/parser/err/0000_struct_field_missing_comma.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rs (renamed from crates/ra_syntax/tests/data/parser/err/0001_item_recovery_in_file.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.txt (renamed from crates/ra_syntax/tests/data/parser/err/0001_item_recovery_in_file.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0002_duplicate_shebang.rs (renamed from crates/ra_syntax/tests/data/parser/err/0002_duplicate_shebang.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0002_duplicate_shebang.txt (renamed from crates/ra_syntax/tests/data/parser/err/0002_duplicate_shebang.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rs (renamed from crates/ra_syntax/tests/data/parser/err/0003_C++_semicolon.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.txt (renamed from crates/ra_syntax/tests/data/parser/err/0003_C++_semicolon.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.rs (renamed from crates/ra_syntax/tests/data/parser/err/0004_use_path_bad_segment.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.txt (renamed from crates/ra_syntax/tests/data/parser/err/0004_use_path_bad_segment.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0005_attribute_recover.rs (renamed from crates/ra_syntax/tests/data/parser/err/0005_attribute_recover.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0005_attribute_recover.txt (renamed from crates/ra_syntax/tests/data/parser/err/0005_attribute_recover.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rs (renamed from crates/ra_syntax/tests/data/parser/err/0006_named_field_recovery.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.txt (renamed from crates/ra_syntax/tests/data/parser/err/0006_named_field_recovery.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rs (renamed from crates/ra_syntax/tests/data/parser/err/0007_stray_curly_in_file.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.txt (renamed from crates/ra_syntax/tests/data/parser/err/0007_stray_curly_in_file.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rs (renamed from crates/ra_syntax/tests/data/parser/err/0008_item_block_recovery.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.txt (renamed from crates/ra_syntax/tests/data/parser/err/0008_item_block_recovery.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rs (renamed from crates/ra_syntax/tests/data/parser/err/0009_broken_struct_type_parameter.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.txt (renamed from crates/ra_syntax/tests/data/parser/err/0009_broken_struct_type_parameter.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rs (renamed from crates/ra_syntax/tests/data/parser/err/0010_unsafe_lambda_block.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.txt (renamed from crates/ra_syntax/tests/data/parser/err/0010_unsafe_lambda_block.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0011_extern_struct.rs (renamed from crates/ra_syntax/tests/data/parser/err/0011_extern_struct.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0011_extern_struct.txt (renamed from crates/ra_syntax/tests/data/parser/err/0011_extern_struct.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0012_broken_lambda.txt (renamed from crates/ra_syntax/tests/data/parser/err/0012_broken_lambda.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0013_invalid_type.rs (renamed from crates/ra_syntax/tests/data/parser/err/0013_invalid_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0013_invalid_type.txt (renamed from crates/ra_syntax/tests/data/parser/err/0013_invalid_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.rs (renamed from crates/ra_syntax/tests/data/parser/err/0014_where_no_bounds.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.txt (renamed from crates/ra_syntax/tests/data/parser/err/0014_where_no_bounds.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rs (renamed from crates/ra_syntax/tests/data/parser/err/0015_curly_in_params.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0015_curly_in_params.txt (renamed from crates/ra_syntax/tests/data/parser/err/0015_curly_in_params.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0016_missing_semi.rs (renamed from crates/ra_syntax/tests/data/parser/err/0016_missing_semi.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0016_missing_semi.txt (renamed from crates/ra_syntax/tests/data/parser/err/0016_missing_semi.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rs (renamed from crates/ra_syntax/tests/data/parser/err/0017_incomplete_binexpr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.txt (renamed from crates/ra_syntax/tests/data/parser/err/0017_incomplete_binexpr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rs (renamed from crates/ra_syntax/tests/data/parser/err/0018_incomplete_fn.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt (renamed from crates/ra_syntax/tests/data/parser/err/0018_incomplete_fn.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0019_let_recover.rs (renamed from crates/ra_syntax/tests/data/parser/err/0019_let_recover.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0019_let_recover.txt (renamed from crates/ra_syntax/tests/data/parser/err/0019_let_recover.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0020_fn_recover.rs (renamed from crates/ra_syntax/tests/data/parser/err/0020_fn_recover.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0020_fn_recover.txt (renamed from crates/ra_syntax/tests/data/parser/err/0020_fn_recover.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rs (renamed from crates/ra_syntax/tests/data/parser/err/0021_incomplete_param.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0021_incomplete_param.txt (renamed from crates/ra_syntax/tests/data/parser/err/0021_incomplete_param.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rs (renamed from crates/ra_syntax/tests/data/parser/err/0022_bad_exprs.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0022_bad_exprs.txt (renamed from crates/ra_syntax/tests/data/parser/err/0022_bad_exprs.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rs (renamed from crates/ra_syntax/tests/data/parser/err/0023_mismatched_paren.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.txt (renamed from crates/ra_syntax/tests/data/parser/err/0023_mismatched_paren.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rs (renamed from crates/ra_syntax/tests/data/parser/err/0024_many_type_parens.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0024_many_type_parens.txt (renamed from crates/ra_syntax/tests/data/parser/err/0024_many_type_parens.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0025_nope.rs (renamed from crates/ra_syntax/tests/data/parser/err/0025_nope.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0025_nope.txt (renamed from crates/ra_syntax/tests/data/parser/err/0025_nope.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0026_imp_recovery.rs (renamed from crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0026_imp_recovery.txt (renamed from crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rs (renamed from crates/ra_syntax/tests/data/parser/err/0027_incomplere_where_for.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.txt (renamed from crates/ra_syntax/tests/data/parser/err/0027_incomplere_where_for.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0028_macro_2.0.rs (renamed from crates/ra_syntax/tests/data/parser/err/0028_macro_2.0.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0028_macro_2.0.txt (renamed from crates/ra_syntax/tests/data/parser/err/0028_macro_2.0.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0029_field_completion.rs (renamed from crates/ra_syntax/tests/data/parser/err/0029_field_completion.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0029_field_completion.txt (renamed from crates/ra_syntax/tests/data/parser/err/0029_field_completion.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rs (renamed from crates/ra_syntax/tests/data/parser/err/0031_block_inner_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.txt (renamed from crates/ra_syntax/tests/data/parser/err/0031_block_inner_attrs.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rs (renamed from crates/ra_syntax/tests/data/parser/err/0032_match_arms_inner_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.txt (renamed from crates/ra_syntax/tests/data/parser/err/0032_match_arms_inner_attrs.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rs (renamed from crates/ra_syntax/tests/data/parser/err/0033_match_arms_outer_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.txt (renamed from crates/ra_syntax/tests/data/parser/err/0033_match_arms_outer_attrs.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/fuzz-failures/0000.rs (renamed from crates/ra_syntax/tests/data/parser/fuzz-failures/0000.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/fuzz-failures/0001.rs (renamed from crates/ra_syntax/tests/data/parser/fuzz-failures/0001.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/fuzz-failures/0002.rs (renamed from crates/ra_syntax/tests/data/parser/fuzz-failures/0002.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/fuzz-failures/0003.rs (renamed from crates/ra_syntax/tests/data/parser/fuzz-failures/0003.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/fuzz-failures/0004.rs (renamed from crates/ra_syntax/tests/data/parser/fuzz-failures/0004.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rs (renamed from crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.txt (renamed from crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rs (renamed from crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.txt (renamed from crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rs (renamed from crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.txt (renamed from crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rs (renamed from crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt (renamed from crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rs (renamed from crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.txt (renamed from crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rs (renamed from crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.txt (renamed from crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rs (renamed from crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.txt (renamed from crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rs (renamed from crates/ra_syntax/tests/data/parser/inline/err/0010_wrong_order_fns.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.txt (renamed from crates/ra_syntax/tests/data/parser/inline/err/0010_wrong_order_fns.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/err/0014_default_fn_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/err/0014_default_fn_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0002_use_tree_list.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0002_use_tree_list.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0002_use_tree_list.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0002_use_tree_list.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0004_value_parameters_no_patterns.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0004_value_parameters_no_patterns.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0006_self_param.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0006_self_param.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0008_path_part.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0008_path_part.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0009_loop_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0009_loop_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0010_extern_block.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0010_extern_block.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0010_extern_block.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0010_extern_block.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0011_field_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0011_field_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0013_pointer_type_mut.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0013_pointer_type_mut.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0014_never_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0014_never_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0015_continue_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0015_continue_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0016_unsafe_trait.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0016_unsafe_trait.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0017_array_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0017_array_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0018_arb_self_types.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0018_arb_self_types.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0019_unary_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0019_unary_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0020_use_star.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0020_use_star.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0020_use_star.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0020_use_star.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0021_impl_item_list.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0021_impl_item_list.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0022_crate_visibility.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0022_crate_visibility.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0023_placeholder_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0023_placeholder_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0024_slice_pat.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0024_slice_pat.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0025_slice_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0025_slice_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0026_tuple_pat_fields.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0026_tuple_pat_fields.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0027_ref_pat.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0027_ref_pat.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0029_cast_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0029_cast_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0030_cond.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0030_cond.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0030_cond.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0031_while_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0031_while_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0032_fn_pointer_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0032_fn_pointer_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0033_reference_type;.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0033_reference_type;.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0034_break_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0034_break_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0036_unsafe_extern_fn.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0036_unsafe_extern_fn.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0037_qual_paths.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0037_qual_paths.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0038_full_range_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0038_full_range_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0039_type_arg.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0039_type_arg.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0040_crate_keyword_vis.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0040_crate_keyword_vis.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0041_trait_item.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0041_trait_item.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0042_call_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0042_call_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0043_use_alias.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0043_use_alias.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0043_use_alias.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0043_use_alias.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0044_block_items.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0044_block_items.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0046_singleton_tuple_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0046_singleton_tuple_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0047_unsafe_default_impl.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0047_unsafe_default_impl.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0050_fn_decl.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0050_fn_decl.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0051_unit_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0051_unit_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0052_path_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0052_path_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0053_path_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0053_path_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0054_field_attrs.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0054_field_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0054_field_attrs.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0054_field_attrs.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0055_literal_pattern.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0055_literal_pattern.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0057_const_fn.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0057_const_fn.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0058_range_pat.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0058_range_pat.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0059_match_arms_commas.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0059_match_arms_commas.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0060_extern_crate.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0060_extern_crate.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0060_extern_crate.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0060_extern_crate.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0061_struct_lit.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0061_struct_lit.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0061_struct_lit.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0061_struct_lit.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0062_mod_contents.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0062_mod_contents.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0063_impl_block_neg.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0063_impl_block_neg.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0063_impl_block_neg.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0063_impl_block_neg.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0064_if_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0064_if_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0066_match_arm.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0066_match_arm.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0067_crate_path.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0067_crate_path.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0067_crate_path.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0067_crate_path.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0068_union_items.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0068_union_items.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0069_use_tree_list_after_path.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0069_use_tree_list_after_path.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0071_match_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0071_match_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0072_return_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0072_return_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0073_type_item_type_params.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0073_type_item_type_params.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0075_block.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0075_block.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0075_block.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0075_block.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0077_try_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0077_try_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0078_type_item.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0078_type_item.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0079_impl_block.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0079_impl_block.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0080_postfix_range.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0080_postfix_range.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0082_ref_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0082_ref_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0083_struct_items.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0083_struct_items.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0084_paren_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0084_paren_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0085_expr_literals.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0085_expr_literals.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0086_function_ret_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0086_function_ret_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0087_unsafe_impl.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0087_unsafe_impl.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0088_break_ambiguity.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0088_break_ambiguity.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0089_extern_fn.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0089_extern_fn.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0090_type_param_default.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0090_type_param_default.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0091_auto_trait.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0091_auto_trait.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0092_fn_pointer_type_with_ret.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0092_fn_pointer_type_with_ret.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0093_index_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0093_index_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0094_unsafe_auto_trait.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0094_unsafe_auto_trait.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0095_placeholder_pat.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0095_placeholder_pat.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0096_no_semi_after_block.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0096_no_semi_after_block.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0097_default_impl.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0097_default_impl.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0098_const_unsafe_fn.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0098_const_unsafe_fn.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0099_param_list.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0099_param_list.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0100_for_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0100_for_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0101_unsafe_fn.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0101_unsafe_fn.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0102_field_pat_list.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0102_field_pat_list.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0102_field_pat_list.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0102_field_pat_list.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0103_array_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0103_array_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0104_path_fn_trait_args.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0104_path_fn_trait_args.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0105_block_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0105_block_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0105_block_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0105_block_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0107_method_call_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0107_method_call_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0108_tuple_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0108_tuple_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0109_label.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0109_label.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0109_label.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0109_label.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0110_use_path.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0110_use_path.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0110_use_path.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0110_use_path.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0111_tuple_pat.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0111_tuple_pat.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0112_bind_pat.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0112_bind_pat.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0113_nocontentexpr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0113_nocontentexpr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0115_pos_field_attrs.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0115_pos_field_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0115_pos_field_attrs.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0115_pos_field_attrs.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0118_impl_inner_attributes.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0118_impl_inner_attributes.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0118_match_guard.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0118_match_guard.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0120_match_arms_inner_attribute.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0120_match_arms_inner_attribute.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0121_match_arms_outer_attributes.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0121_match_arms_outer_attributes.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0122_generic_lifetime_type_attribute.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0122_generic_lifetime_type_attribute.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0123_param_list_vararg.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0123_param_list_vararg.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0124_async_fn.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0124_async_fn.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0125_crate_keyword_path.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0125_crate_keyword_path.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0125_struct_literal_field_with_attr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0125_struct_literal_field_with_attr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0125_struct_literal_field_with_attr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0125_struct_literal_field_with_attr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0126_attr_on_expr_stmt.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0126_attr_on_expr_stmt.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0127_attr_on_last_expr_in_block.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0127_attr_on_last_expr_in_block.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0128_combined_fns.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0128_combined_fns.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0129_marco_pat.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0129_marco_pat.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0130_let_stmt.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0130_let_stmt.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0131_existential_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0131_existential_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rs | 5 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.txt | 89 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0132_default_fn_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0132_default_fn_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0134_nocontentexpr_after_item.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0134_nocontentexpr_after_item.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0135_first_array_member_attributes.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0135_first_array_member_attributes.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0136_subsequent_array_member_attributes.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0136_subsequent_array_member_attributes.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.rs (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0137_await_expr.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.txt (renamed from crates/ra_syntax/tests/data/parser/inline/ok/0137_await_expr.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0000_empty.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0000_empty.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0000_empty.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0000_empty.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0001_struct_item.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0001_struct_item.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0001_struct_item.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0001_struct_item.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0002_struct_item_field.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0002_struct_item_field.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0004_file_shebang.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0004_file_shebang.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0004_file_shebang.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0004_file_shebang.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0005_fn_item.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0005_fn_item.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0005_fn_item.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0005_fn_item.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0006_inner_attributes.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0006_inner_attributes.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0006_inner_attributes.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0006_inner_attributes.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0007_extern_crate.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0007_extern_crate.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0007_extern_crate.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0007_extern_crate.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0008_mod_item.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0008_mod_item.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0008_mod_item.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0008_mod_item.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0009_use_item.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0009_use_item.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0009_use_item.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0009_use_item.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0010_use_path_segments.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0010_use_path_segments.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0010_use_path_segments.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0010_use_path_segments.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0011_outer_attribute.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0011_outer_attribute.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0012_visibility.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0012_visibility.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0012_visibility.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0012_visibility.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0013_use_path_self_super.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0013_use_path_self_super.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0013_use_path_self_super.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0013_use_path_self_super.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0014_use_tree.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0014_use_tree.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0014_use_tree.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0014_use_tree.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0015_use_tree.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0015_use_tree.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0015_use_tree.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0015_use_tree.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0016_struct_flavors.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0016_struct_flavors.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0017_attr_trailing_comma.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0017_attr_trailing_comma.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0018_struct_type_params.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0018_struct_type_params.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0019_enums.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0019_enums.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0019_enums.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0019_enums.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0020_type_param_bounds.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0020_type_param_bounds.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0020_type_param_bounds.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0020_type_param_bounds.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0021_extern_fn.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0021_extern_fn.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0021_extern_fn.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0022_empty_extern_block.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0022_empty_extern_block.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0022_empty_extern_block.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0022_empty_extern_block.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0023_static_items.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0023_static_items.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0023_static_items.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0023_static_items.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0024_const_item.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0024_const_item.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0024_const_item.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0024_const_item.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0025_extern_fn_in_block.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0025_extern_fn_in_block.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0025_extern_fn_in_block.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0025_extern_fn_in_block.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0026_const_fn_in_block.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0026_const_fn_in_block.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0026_const_fn_in_block.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0026_const_fn_in_block.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0027_unsafe_fn_in_block.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0027_unsafe_fn_in_block.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0027_unsafe_fn_in_block.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0028_operator_binding_power.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0028_operator_binding_power.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0028_operator_binding_power.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0028_operator_binding_power.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0029_range_forms.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0029_range_forms.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0029_range_forms.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0029_range_forms.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0030_string_suffixes.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0030_string_suffixes.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0030_string_suffixes.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0030_string_suffixes.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0030_traits.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0030_traits.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0030_traits.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0030_traits.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0031_extern.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0031_extern.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0031_extern.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0031_extern.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0032_where_for.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0032_where_for.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0032_where_for.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0032_where_for.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0033_label_break.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0033_label_break.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0033_label_break.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0033_label_break.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0034_crate_path_in_call.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0034_crate_path_in_call.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0034_crate_path_in_call.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0034_crate_path_in_call.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0035_weird_exprs.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0035_weird_exprs.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0036_fully_qualified.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0036_fully_qualified.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0037_mod.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0037_mod.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0037_mod.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0037_mod.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0038_where_pred_type.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0038_where_pred_type.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0038_where_pred_type.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0038_where_pred_type.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0039_raw_fn_item.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0039_raw_fn_item.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0039_raw_fn_item.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0039_raw_fn_item.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0040_raw_struct_item_field.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0040_raw_struct_item_field.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0041_raw_keywords.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0041_raw_keywords.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0041_raw_keywords.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0041_raw_keywords.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0042_ufcs_call_list.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0042_ufcs_call_list.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0043_complex_assignment.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0043_complex_assignment.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0044_let_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0044_let_attrs.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0044_let_attrs.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0045_block_inner_attrs.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0045_block_inner_attrs.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0046_extern_inner_attributes.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0046_extern_inner_attributes.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0046_extern_inner_attributes.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0046_extern_inner_attributes.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0047_minus_in_inner_pattern.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0047_minus_in_inner_pattern.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0048_compound_assignment.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0048_compound_assignment.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0048_compound_assignment.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0048_compound_assignment.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0049_async_block.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0049_async_block.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0049_async_block.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0049_async_block.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0050_async_block_as_argument.rs (renamed from crates/ra_syntax/tests/data/parser/ok/0050_async_block_as_argument.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0050_async_block_as_argument.txt (renamed from crates/ra_syntax/tests/data/parser/ok/0050_async_block_as_argument.txt) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/reparse/fuzz-failures/0000.rs (renamed from crates/ra_syntax/tests/data/reparse/fuzz-failures/0000.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/reparse/fuzz-failures/0001.rs (renamed from crates/ra_syntax/tests/data/reparse/fuzz-failures/0001.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/reparse/fuzz-failures/0002.rs (renamed from crates/ra_syntax/tests/data/reparse/fuzz-failures/0002.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/reparse/fuzz-failures/0003.rs (renamed from crates/ra_syntax/tests/data/reparse/fuzz-failures/0003.rs) | bin | 8 -> 8 bytes | |||
-rw-r--r-- | crates/ra_syntax/test_data/reparse/fuzz-failures/0004.rs (renamed from crates/ra_syntax/tests/data/reparse/fuzz-failures/0004.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/reparse/fuzz-failures/0005.rs (renamed from crates/ra_syntax/tests/data/reparse/fuzz-failures/0005.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/tests/data/parser/inline/ok/0132_box_expr.rs | 3 | ||||
-rw-r--r-- | crates/ra_syntax/tests/data/parser/inline/ok/0132_box_expr.txt | 31 | ||||
-rw-r--r-- | crates/ra_tools/src/lib.rs | 27 | ||||
-rw-r--r-- | crates/ra_tools/src/main.rs | 141 | ||||
-rw-r--r-- | docs/dev/README.md | 10 | ||||
-rw-r--r-- | docs/user/README.md | 9 | ||||
-rw-r--r-- | editors/code/package-lock.json | 215 | ||||
-rw-r--r-- | editors/code/package.json | 30 | ||||
-rw-r--r-- | editors/code/src/commands/index.ts | 4 | ||||
-rw-r--r-- | editors/code/src/commands/inlay_hints.ts | 109 | ||||
-rw-r--r-- | editors/code/src/config.ts | 5 | ||||
-rw-r--r-- | editors/code/src/extension.ts | 24 | ||||
-rw-r--r-- | editors/emacs/ra-emacs-lsp.el | 42 |
582 files changed, 2248 insertions, 2102 deletions
diff --git a/.cargo/config b/.cargo/config index 3ac2ce336..92a3acfd0 100644 --- a/.cargo/config +++ b/.cargo/config | |||
@@ -1,23 +1,23 @@ | |||
1 | [alias] | 1 | [alias] |
2 | # Automatically generates the ast and syntax kinds files | 2 | # Automatically generates the ast and syntax kinds files |
3 | gen-syntax = "run --package ra_tools --bin ra_tools -- gen-syntax" | 3 | gen-syntax = "run --package ra_tools --bin ra_tools -- gen-syntax" |
4 | |||
4 | # Extracts the tests from | 5 | # Extracts the tests from |
5 | gen-tests = "run --package ra_tools --bin ra_tools -- gen-tests" | 6 | gen-tests = "run --package ra_tools --bin ra_tools -- gen-tests" |
6 | # Installs ra_lsp_server | 7 | |
7 | install-lsp = "install --path crates/ra_lsp_server --force" | ||
8 | # Installs ra_lsp_server with the jemalloc feature | ||
9 | jinstall-lsp = "install --path crates/ra_lsp_server --force --features jemalloc" | ||
10 | # Installs the visual studio code extension | 8 | # Installs the visual studio code extension |
11 | install-code = "run --package ra_tools --bin ra_tools -- install-code" | 9 | install-ra = "run --package ra_tools --bin ra_tools -- install-ra" |
10 | install-code = "run --package ra_tools --bin ra_tools -- install-ra" # just an alias | ||
11 | |||
12 | # Formats the full repository or installs the git hook to do it automatically. | 12 | # Formats the full repository or installs the git hook to do it automatically. |
13 | format = "run --package ra_tools --bin ra_tools -- format" | 13 | format = "run --package ra_tools --bin ra_tools -- format" |
14 | format-hook = "run --package ra_tools --bin ra_tools -- format-hook" | 14 | format-hook = "run --package ra_tools --bin ra_tools -- format-hook" |
15 | |||
15 | # Run clippy | 16 | # Run clippy |
16 | lint = "run --package ra_tools --bin ra_tools -- lint" | 17 | lint = "run --package ra_tools --bin ra_tools -- lint" |
17 | 18 | ||
18 | # Runs the fuzzing test suite (currently only parser) | 19 | # Runs the fuzzing test suite (currently only parser) |
19 | fuzz-tests = "run --package ra_tools --bin ra_tools -- fuzz-tests" | 20 | fuzz-tests = "run --package ra_tools --bin ra_tools -- fuzz-tests" |
20 | 21 | ||
21 | render-test = "run --package ra_cli -- render-test" | ||
22 | # Parse a file. This should be piped the file contents | 22 | # Parse a file. This should be piped the file contents |
23 | parse = "run --package ra_cli -- parse" | 23 | parse = "run --package ra_cli -- parse" |
diff --git a/.travis.yml b/.travis.yml index e151cc8f0..87b546442 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -1,9 +1,7 @@ | |||
1 | cache: cargo | 1 | cache: cargo |
2 | before_cache: | 2 | before_cache: |
3 | # ask Cargo to clean up artifacts for workspace crates | 3 | - find ./target/debug -maxdepth 1 -type f -delete |
4 | - cargo clean $(printf -- '--package %s ' $(cd crates; ls)) | 4 | - rm -fr ./target/debug/{deps,.fingerprint}/{*ra_*,*heavy_test*,*gen_lsp*,*thread_worker*} |
5 | # Cargo doesn't clean up depinfo itself, do it manually | ||
6 | - find ./target/debug -maxdepth 2 -iname '*.d' -delete | ||
7 | - rm -f ./target/.rustc_info.json | 5 | - rm -f ./target/.rustc_info.json |
8 | 6 | ||
9 | matrix: | 7 | matrix: |
@@ -43,10 +41,9 @@ matrix: | |||
43 | - xvfb | 41 | - xvfb |
44 | before_install: cd editors/code | 42 | before_install: cd editors/code |
45 | install: | 43 | install: |
46 | - npm install | 44 | - npm ci |
47 | - npm run vscode:prepublish | 45 | - npm run vscode:prepublish |
48 | script: | 46 | script: |
49 | - npm ci | ||
50 | - npm run travis | 47 | - npm run travis |
51 | env: | 48 | env: |
52 | - CXX="g++-4.9", CC="gcc-4.9" | 49 | - CXX="g++-4.9", CC="gcc-4.9" |
diff --git a/Cargo.lock b/Cargo.lock index 7c7836a13..fd4d876de 100644 --- a/Cargo.lock +++ b/Cargo.lock | |||
@@ -68,7 +68,7 @@ name = "backtrace-sys" | |||
68 | version = "0.1.31" | 68 | version = "0.1.31" |
69 | source = "registry+https://github.com/rust-lang/crates.io-index" | 69 | source = "registry+https://github.com/rust-lang/crates.io-index" |
70 | dependencies = [ | 70 | dependencies = [ |
71 | "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", | 71 | "cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", |
72 | "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", | 72 | "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", |
73 | ] | 73 | ] |
74 | 74 | ||
@@ -150,7 +150,7 @@ dependencies = [ | |||
150 | 150 | ||
151 | [[package]] | 151 | [[package]] |
152 | name = "cc" | 152 | name = "cc" |
153 | version = "1.0.37" | 153 | version = "1.0.38" |
154 | source = "registry+https://github.com/rust-lang/crates.io-index" | 154 | source = "registry+https://github.com/rust-lang/crates.io-index" |
155 | 155 | ||
156 | [[package]] | 156 | [[package]] |
@@ -291,11 +291,10 @@ dependencies = [ | |||
291 | 291 | ||
292 | [[package]] | 292 | [[package]] |
293 | name = "crossbeam-channel" | 293 | name = "crossbeam-channel" |
294 | version = "0.3.8" | 294 | version = "0.3.9" |
295 | source = "registry+https://github.com/rust-lang/crates.io-index" | 295 | source = "registry+https://github.com/rust-lang/crates.io-index" |
296 | dependencies = [ | 296 | dependencies = [ |
297 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", | 297 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", |
298 | "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", | ||
299 | ] | 298 | ] |
300 | 299 | ||
301 | [[package]] | 300 | [[package]] |
@@ -303,21 +302,21 @@ name = "crossbeam-deque" | |||
303 | version = "0.6.3" | 302 | version = "0.6.3" |
304 | source = "registry+https://github.com/rust-lang/crates.io-index" | 303 | source = "registry+https://github.com/rust-lang/crates.io-index" |
305 | dependencies = [ | 304 | dependencies = [ |
306 | "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", | 305 | "crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", |
307 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", | 306 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", |
308 | ] | 307 | ] |
309 | 308 | ||
310 | [[package]] | 309 | [[package]] |
311 | name = "crossbeam-epoch" | 310 | name = "crossbeam-epoch" |
312 | version = "0.7.1" | 311 | version = "0.7.2" |
313 | source = "registry+https://github.com/rust-lang/crates.io-index" | 312 | source = "registry+https://github.com/rust-lang/crates.io-index" |
314 | dependencies = [ | 313 | dependencies = [ |
315 | "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", | 314 | "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", |
316 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", | 315 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", |
317 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", | 316 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", |
318 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", | 317 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", |
319 | "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", | 318 | "memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", |
320 | "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", | 319 | "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", |
321 | ] | 320 | ] |
322 | 321 | ||
323 | [[package]] | 322 | [[package]] |
@@ -325,12 +324,12 @@ name = "crossbeam-queue" | |||
325 | version = "0.1.2" | 324 | version = "0.1.2" |
326 | source = "registry+https://github.com/rust-lang/crates.io-index" | 325 | source = "registry+https://github.com/rust-lang/crates.io-index" |
327 | dependencies = [ | 326 | dependencies = [ |
328 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", | 327 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", |
329 | ] | 328 | ] |
330 | 329 | ||
331 | [[package]] | 330 | [[package]] |
332 | name = "crossbeam-utils" | 331 | name = "crossbeam-utils" |
333 | version = "0.6.5" | 332 | version = "0.6.6" |
334 | source = "registry+https://github.com/rust-lang/crates.io-index" | 333 | source = "registry+https://github.com/rust-lang/crates.io-index" |
335 | dependencies = [ | 334 | dependencies = [ |
336 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", | 335 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", |
@@ -353,7 +352,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
353 | dependencies = [ | 352 | dependencies = [ |
354 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", | 353 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", |
355 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", | 354 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", |
356 | "syn 0.15.40 (registry+https://github.com/rust-lang/crates.io-index)", | 355 | "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", |
357 | ] | 356 | ] |
358 | 357 | ||
359 | [[package]] | 358 | [[package]] |
@@ -443,7 +442,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
443 | dependencies = [ | 442 | dependencies = [ |
444 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", | 443 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", |
445 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", | 444 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", |
446 | "syn 0.15.40 (registry+https://github.com/rust-lang/crates.io-index)", | 445 | "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", |
447 | "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", | 446 | "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", |
448 | ] | 447 | ] |
449 | 448 | ||
@@ -537,7 +536,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
537 | name = "gen_lsp_server" | 536 | name = "gen_lsp_server" |
538 | version = "0.2.0" | 537 | version = "0.2.0" |
539 | dependencies = [ | 538 | dependencies = [ |
540 | "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", | 539 | "crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", |
541 | "flexi_logger 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", | 540 | "flexi_logger 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", |
542 | "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", | 541 | "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", |
543 | "lsp-types 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", | 542 | "lsp-types 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", |
@@ -687,7 +686,7 @@ name = "jemalloc-sys" | |||
687 | version = "0.3.2" | 686 | version = "0.3.2" |
688 | source = "registry+https://github.com/rust-lang/crates.io-index" | 687 | source = "registry+https://github.com/rust-lang/crates.io-index" |
689 | dependencies = [ | 688 | dependencies = [ |
690 | "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", | 689 | "cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", |
691 | "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", | 690 | "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", |
692 | "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", | 691 | "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", |
693 | ] | 692 | ] |
@@ -804,8 +803,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
804 | 803 | ||
805 | [[package]] | 804 | [[package]] |
806 | name = "memoffset" | 805 | name = "memoffset" |
807 | version = "0.2.1" | 806 | version = "0.5.1" |
808 | source = "registry+https://github.com/rust-lang/crates.io-index" | 807 | source = "registry+https://github.com/rust-lang/crates.io-index" |
808 | dependencies = [ | ||
809 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", | ||
810 | ] | ||
809 | 811 | ||
810 | [[package]] | 812 | [[package]] |
811 | name = "mio" | 813 | name = "mio" |
@@ -886,7 +888,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
886 | dependencies = [ | 888 | dependencies = [ |
887 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", | 889 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", |
888 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", | 890 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", |
889 | "syn 0.15.40 (registry+https://github.com/rust-lang/crates.io-index)", | 891 | "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", |
890 | ] | 892 | ] |
891 | 893 | ||
892 | [[package]] | 894 | [[package]] |
@@ -1006,7 +1008,7 @@ dependencies = [ | |||
1006 | "proc-macro-hack 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)", | 1008 | "proc-macro-hack 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)", |
1007 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", | 1009 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", |
1008 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", | 1010 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", |
1009 | "syn 0.15.40 (registry+https://github.com/rust-lang/crates.io-index)", | 1011 | "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", |
1010 | ] | 1012 | ] |
1011 | 1013 | ||
1012 | [[package]] | 1014 | [[package]] |
@@ -1040,7 +1042,7 @@ dependencies = [ | |||
1040 | "pest_meta 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", | 1042 | "pest_meta 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", |
1041 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", | 1043 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", |
1042 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", | 1044 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", |
1043 | "syn 0.15.40 (registry+https://github.com/rust-lang/crates.io-index)", | 1045 | "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", |
1044 | ] | 1046 | ] |
1045 | 1047 | ||
1046 | [[package]] | 1048 | [[package]] |
@@ -1074,7 +1076,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1074 | dependencies = [ | 1076 | dependencies = [ |
1075 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", | 1077 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", |
1076 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", | 1078 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", |
1077 | "syn 0.15.40 (registry+https://github.com/rust-lang/crates.io-index)", | 1079 | "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", |
1078 | ] | 1080 | ] |
1079 | 1081 | ||
1080 | [[package]] | 1082 | [[package]] |
@@ -1239,7 +1241,7 @@ dependencies = [ | |||
1239 | name = "ra_lsp_server" | 1241 | name = "ra_lsp_server" |
1240 | version = "0.1.0" | 1242 | version = "0.1.0" |
1241 | dependencies = [ | 1243 | dependencies = [ |
1242 | "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", | 1244 | "crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", |
1243 | "flexi_logger 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1245 | "flexi_logger 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1244 | "gen_lsp_server 0.2.0", | 1246 | "gen_lsp_server 0.2.0", |
1245 | "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", | 1247 | "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", |
@@ -1310,7 +1312,7 @@ dependencies = [ | |||
1310 | 1312 | ||
1311 | [[package]] | 1313 | [[package]] |
1312 | name = "ra_rustc_lexer" | 1314 | name = "ra_rustc_lexer" |
1313 | version = "0.1.0-pre.1" | 1315 | version = "0.1.0-pre.2" |
1314 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1316 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1315 | dependencies = [ | 1317 | dependencies = [ |
1316 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1318 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", |
@@ -1322,9 +1324,9 @@ version = "0.1.0" | |||
1322 | dependencies = [ | 1324 | dependencies = [ |
1323 | "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1325 | "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1324 | "ra_parser 0.1.0", | 1326 | "ra_parser 0.1.0", |
1325 | "ra_rustc_lexer 0.1.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", | 1327 | "ra_rustc_lexer 0.1.0-pre.2 (registry+https://github.com/rust-lang/crates.io-index)", |
1326 | "ra_text_edit 0.1.0", | 1328 | "ra_text_edit 0.1.0", |
1327 | "rowan 0.6.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", | 1329 | "rowan 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1328 | "smol_str 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", | 1330 | "smol_str 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", |
1329 | "test_utils 0.1.0", | 1331 | "test_utils 0.1.0", |
1330 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1332 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", |
@@ -1362,7 +1364,7 @@ name = "ra_vfs" | |||
1362 | version = "0.2.5" | 1364 | version = "0.2.5" |
1363 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1365 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1364 | dependencies = [ | 1366 | dependencies = [ |
1365 | "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", | 1367 | "crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", |
1366 | "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", | 1368 | "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", |
1367 | "notify 4.0.12 (registry+https://github.com/rust-lang/crates.io-index)", | 1369 | "notify 4.0.12 (registry+https://github.com/rust-lang/crates.io-index)", |
1368 | "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1370 | "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", |
@@ -1396,7 +1398,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1396 | dependencies = [ | 1398 | dependencies = [ |
1397 | "getrandom 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", | 1399 | "getrandom 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", |
1398 | "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", | 1400 | "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", |
1399 | "rand_chacha 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1401 | "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", |
1400 | "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1402 | "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1401 | "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1403 | "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1402 | "rand_pcg 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1404 | "rand_pcg 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", |
@@ -1413,10 +1415,9 @@ dependencies = [ | |||
1413 | 1415 | ||
1414 | [[package]] | 1416 | [[package]] |
1415 | name = "rand_chacha" | 1417 | name = "rand_chacha" |
1416 | version = "0.2.0" | 1418 | version = "0.2.1" |
1417 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1419 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1418 | dependencies = [ | 1420 | dependencies = [ |
1419 | "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1420 | "c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", | 1421 | "c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", |
1421 | "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1422 | "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1422 | ] | 1423 | ] |
@@ -1532,7 +1533,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1532 | dependencies = [ | 1533 | dependencies = [ |
1533 | "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", | 1534 | "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", |
1534 | "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", | 1535 | "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", |
1535 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", | 1536 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", |
1536 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1537 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1537 | "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", | 1538 | "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", |
1538 | ] | 1539 | ] |
@@ -1595,7 +1596,7 @@ dependencies = [ | |||
1595 | 1596 | ||
1596 | [[package]] | 1597 | [[package]] |
1597 | name = "rowan" | 1598 | name = "rowan" |
1598 | version = "0.6.0-pre.1" | 1599 | version = "0.6.0" |
1599 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1600 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1600 | dependencies = [ | 1601 | dependencies = [ |
1601 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", | 1602 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", |
@@ -1653,7 +1654,7 @@ dependencies = [ | |||
1653 | "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", | 1654 | "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", |
1654 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", | 1655 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", |
1655 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", | 1656 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", |
1656 | "syn 0.15.40 (registry+https://github.com/rust-lang/crates.io-index)", | 1657 | "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", |
1657 | ] | 1658 | ] |
1658 | 1659 | ||
1659 | [[package]] | 1660 | [[package]] |
@@ -1666,11 +1667,6 @@ dependencies = [ | |||
1666 | 1667 | ||
1667 | [[package]] | 1668 | [[package]] |
1668 | name = "scopeguard" | 1669 | name = "scopeguard" |
1669 | version = "0.3.3" | ||
1670 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1671 | |||
1672 | [[package]] | ||
1673 | name = "scopeguard" | ||
1674 | version = "1.0.0" | 1670 | version = "1.0.0" |
1675 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1671 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1676 | 1672 | ||
@@ -1703,7 +1699,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1703 | dependencies = [ | 1699 | dependencies = [ |
1704 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", | 1700 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", |
1705 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", | 1701 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", |
1706 | "syn 0.15.40 (registry+https://github.com/rust-lang/crates.io-index)", | 1702 | "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", |
1707 | ] | 1703 | ] |
1708 | 1704 | ||
1709 | [[package]] | 1705 | [[package]] |
@@ -1774,7 +1770,7 @@ name = "stacker" | |||
1774 | version = "0.1.5" | 1770 | version = "0.1.5" |
1775 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1771 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1776 | dependencies = [ | 1772 | dependencies = [ |
1777 | "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", | 1773 | "cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", |
1778 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", | 1774 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", |
1779 | "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", | 1775 | "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", |
1780 | "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", | 1776 | "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", |
@@ -1792,7 +1788,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1792 | 1788 | ||
1793 | [[package]] | 1789 | [[package]] |
1794 | name = "syn" | 1790 | name = "syn" |
1795 | version = "0.15.40" | 1791 | version = "0.15.42" |
1796 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1792 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1797 | dependencies = [ | 1793 | dependencies = [ |
1798 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", | 1794 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", |
@@ -1807,7 +1803,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1807 | dependencies = [ | 1803 | dependencies = [ |
1808 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", | 1804 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", |
1809 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", | 1805 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", |
1810 | "syn 0.15.40 (registry+https://github.com/rust-lang/crates.io-index)", | 1806 | "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", |
1811 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1807 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1812 | ] | 1808 | ] |
1813 | 1809 | ||
@@ -1896,7 +1892,7 @@ dependencies = [ | |||
1896 | name = "thread_worker" | 1892 | name = "thread_worker" |
1897 | version = "0.1.0" | 1893 | version = "0.1.0" |
1898 | dependencies = [ | 1894 | dependencies = [ |
1899 | "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", | 1895 | "crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", |
1900 | "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", | 1896 | "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", |
1901 | ] | 1897 | ] |
1902 | 1898 | ||
@@ -2147,7 +2143,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2147 | "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" | 2143 | "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" |
2148 | "checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" | 2144 | "checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" |
2149 | "checksum cargo_metadata 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5e904f164f39cae0c3a4f2713eb97a47ba64676a071e99a69ddfef4994694d2c" | 2145 | "checksum cargo_metadata 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5e904f164f39cae0c3a4f2713eb97a47ba64676a071e99a69ddfef4994694d2c" |
2150 | "checksum cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)" = "39f75544d7bbaf57560d2168f28fd649ff9c76153874db88bdbdfd839b1a7e7d" | 2146 | "checksum cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "ce400c638d48ee0e9ab75aef7997609ec57367ccfe1463f21bf53c3eca67bf46" |
2151 | "checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" | 2147 | "checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" |
2152 | "checksum chalk-engine 0.9.0 (git+https://github.com/rust-lang/chalk.git)" = "<none>" | 2148 | "checksum chalk-engine 0.9.0 (git+https://github.com/rust-lang/chalk.git)" = "<none>" |
2153 | "checksum chalk-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git)" = "<none>" | 2149 | "checksum chalk-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git)" = "<none>" |
@@ -2161,11 +2157,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2161 | "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" | 2157 | "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" |
2162 | "checksum console 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8ca57c2c14b8a2bf3105bc9d15574aad80babf6a9c44b1058034cdf8bd169628" | 2158 | "checksum console 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8ca57c2c14b8a2bf3105bc9d15574aad80babf6a9c44b1058034cdf8bd169628" |
2163 | "checksum cpuprofiler 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "33f07976bb6821459632d7a18d97ccca005cb5c552f251f822c7c1781c1d7035" | 2159 | "checksum cpuprofiler 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "33f07976bb6821459632d7a18d97ccca005cb5c552f251f822c7c1781c1d7035" |
2164 | "checksum crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b" | 2160 | "checksum crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c8ec7fcd21571dc78f96cc96243cab8d8f035247c3efd16c687be154c3fa9efa" |
2165 | "checksum crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "05e44b8cf3e1a625844d1750e1f7820da46044ff6d28f4d43e455ba3e5bb2c13" | 2161 | "checksum crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "05e44b8cf3e1a625844d1750e1f7820da46044ff6d28f4d43e455ba3e5bb2c13" |
2166 | "checksum crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04c9e3102cc2d69cd681412141b390abd55a362afc1540965dad0ad4d34280b4" | 2162 | "checksum crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9" |
2167 | "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" | 2163 | "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" |
2168 | "checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" | 2164 | "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" |
2169 | "checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" | 2165 | "checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" |
2170 | "checksum derive-new 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c3fd04571b29c91cfbe1e7c9a228e069ac8635f180ffb4ccd6a6907617ee8bb0" | 2166 | "checksum derive-new 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c3fd04571b29c91cfbe1e7c9a228e069ac8635f180ffb4ccd6a6907617ee8bb0" |
2171 | "checksum deunicode 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" | 2167 | "checksum deunicode 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" |
@@ -2226,7 +2222,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2226 | "checksum maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08cbb6b4fef96b6d77bfc40ec491b1690c779e77b05cd9f07f787ed376fd4c43" | 2222 | "checksum maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08cbb6b4fef96b6d77bfc40ec491b1690c779e77b05cd9f07f787ed376fd4c43" |
2227 | "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" | 2223 | "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" |
2228 | "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" | 2224 | "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" |
2229 | "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" | 2225 | "checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f" |
2230 | "checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" | 2226 | "checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" |
2231 | "checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40" | 2227 | "checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40" |
2232 | "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" | 2228 | "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" |
@@ -2259,12 +2255,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2259 | "checksum proptest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cf147e022eacf0c8a054ab864914a7602618adba841d800a9a9868a5237a529f" | 2255 | "checksum proptest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cf147e022eacf0c8a054ab864914a7602618adba841d800a9a9868a5237a529f" |
2260 | "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" | 2256 | "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" |
2261 | "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" | 2257 | "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" |
2262 | "checksum ra_rustc_lexer 0.1.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e8d92772f822978a6c9c4657aa61af439e4e635180628b3354049b283b749f1e" | 2258 | "checksum ra_rustc_lexer 0.1.0-pre.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6baccda91574dfadd7f8a0bc8f9f110f874b6b484289b2536d3dbf4f0d5d97bb" |
2263 | "checksum ra_vfs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fb7cd4e302032c5ab514f1c01c89727cd96fd950dd36f9ebee9252df45d9fb1a" | 2259 | "checksum ra_vfs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fb7cd4e302032c5ab514f1c01c89727cd96fd950dd36f9ebee9252df45d9fb1a" |
2264 | "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" | 2260 | "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" |
2265 | "checksum rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" | 2261 | "checksum rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" |
2266 | "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" | 2262 | "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" |
2267 | "checksum rand_chacha 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e193067942ef6f485a349a113329140d0ab9e2168ce92274499bb0e9a4190d9d" | 2263 | "checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" |
2268 | "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" | 2264 | "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" |
2269 | "checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" | 2265 | "checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" |
2270 | "checksum rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" | 2266 | "checksum rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" |
@@ -2285,7 +2281,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2285 | "checksum relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0e7790c7f1cc73d831d28dc5a7deb316a006e7848e6a7f467cdb10a0a9e0fb1c" | 2281 | "checksum relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0e7790c7f1cc73d831d28dc5a7deb316a006e7848e6a7f467cdb10a0a9e0fb1c" |
2286 | "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" | 2282 | "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" |
2287 | "checksum ron 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "17f52a24414403f81528b67488cf8edc4eda977d3af1646bb6b106a600ead78f" | 2283 | "checksum ron 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "17f52a24414403f81528b67488cf8edc4eda977d3af1646bb6b106a600ead78f" |
2288 | "checksum rowan 0.6.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0eeee40f1a2724b7d0d9fa5f73a7804cd2f4c91b37ba9f785d429f31819d60df" | 2284 | "checksum rowan 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a796c0517d6969224c42e9ef01356363b0a7c57d10ec986c9a600d075666a5ff" |
2289 | "checksum rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f4dccf6f4891ebcc0c39f9b6eb1a83b9bf5d747cb439ec6fba4f3b977038af" | 2285 | "checksum rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f4dccf6f4891ebcc0c39f9b6eb1a83b9bf5d747cb439ec6fba4f3b977038af" |
2290 | "checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" | 2286 | "checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" |
2291 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" | 2287 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" |
@@ -2293,7 +2289,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2293 | "checksum salsa 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2891cd628406e8a0ca714b827511de1bff76f796e3382cc72a3de732ccad5aea" | 2289 | "checksum salsa 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2891cd628406e8a0ca714b827511de1bff76f796e3382cc72a3de732ccad5aea" |
2294 | "checksum salsa-macros 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b7f1e25ca2b995bdf032946174929d62156ffd57abd7ff88dc6f9bdeb5ac0c59" | 2290 | "checksum salsa-macros 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b7f1e25ca2b995bdf032946174929d62156ffd57abd7ff88dc6f9bdeb5ac0c59" |
2295 | "checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" | 2291 | "checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" |
2296 | "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" | ||
2297 | "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" | 2292 | "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" |
2298 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" | 2293 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" |
2299 | "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" | 2294 | "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" |
@@ -2310,7 +2305,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2310 | "checksum stacker 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fb79482f57cf598af52094ec4cc3b3c42499d3ce5bd426f2ac41515b7e57404b" | 2305 | "checksum stacker 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fb79482f57cf598af52094ec4cc3b3c42499d3ce5bd426f2ac41515b7e57404b" |
2311 | "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" | 2306 | "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" |
2312 | "checksum superslice 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab16ced94dbd8a46c82fd81e3ed9a8727dac2977ea869d217bcc4ea1f122e81f" | 2307 | "checksum superslice 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab16ced94dbd8a46c82fd81e3ed9a8727dac2977ea869d217bcc4ea1f122e81f" |
2313 | "checksum syn 0.15.40 (registry+https://github.com/rust-lang/crates.io-index)" = "bc945221ccf4a7e8c31222b9d1fc77aefdd6638eb901a6ce457a3dc29d4c31e8" | 2308 | "checksum syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)" = "eadc09306ca51a40555dd6fc2b415538e9e18bc9f870e47b1a524a79fe2dcf5e" |
2314 | "checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" | 2309 | "checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" |
2315 | "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" | 2310 | "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" |
2316 | "checksum tera 0.11.20 (registry+https://github.com/rust-lang/crates.io-index)" = "4b505279e19d8f7d24b1a9dc58327c9c36174b1a2c7ebdeac70792d017cb64f3" | 2311 | "checksum tera 0.11.20 (registry+https://github.com/rust-lang/crates.io-index)" = "4b505279e19d8f7d24b1a9dc58327c9c36174b1a2c7ebdeac70792d017cb64f3" |
@@ -32,10 +32,10 @@ For setup for other editors, see [./docs/user](./docs/user). | |||
32 | $ git clone https://github.com/rust-analyzer/rust-analyzer && cd rust-analyzer | 32 | $ git clone https://github.com/rust-analyzer/rust-analyzer && cd rust-analyzer |
33 | 33 | ||
34 | # install both the language server and VS Code extension | 34 | # install both the language server and VS Code extension |
35 | $ cargo install-code | 35 | $ cargo install-ra |
36 | 36 | ||
37 | # alternatively, install only the server. Binary name is `ra_lsp_server`. | 37 | # alternatively, install only the server. Binary name is `ra_lsp_server`. |
38 | $ cargo install-lsp | 38 | $ cargo install-ra --server |
39 | ``` | 39 | ``` |
40 | ## Documentation | 40 | ## Documentation |
41 | 41 | ||
diff --git a/crates/ra_assists/src/assist_ctx.rs b/crates/ra_assists/src/assist_ctx.rs index a12c3ed54..c45262efa 100644 --- a/crates/ra_assists/src/assist_ctx.rs +++ b/crates/ra_assists/src/assist_ctx.rs | |||
@@ -129,10 +129,13 @@ pub(crate) struct AssistBuilder { | |||
129 | } | 129 | } |
130 | 130 | ||
131 | impl AssistBuilder { | 131 | impl AssistBuilder { |
132 | /// Replaces specified `range` of text with a given string. | ||
132 | pub(crate) fn replace(&mut self, range: TextRange, replace_with: impl Into<String>) { | 133 | pub(crate) fn replace(&mut self, range: TextRange, replace_with: impl Into<String>) { |
133 | self.edit.replace(range, replace_with.into()) | 134 | self.edit.replace(range, replace_with.into()) |
134 | } | 135 | } |
135 | 136 | ||
137 | /// Replaces specified `node` of text with a given string, reindenting the | ||
138 | /// string to maintain `node`'s existing indent. | ||
136 | pub(crate) fn replace_node_and_indent( | 139 | pub(crate) fn replace_node_and_indent( |
137 | &mut self, | 140 | &mut self, |
138 | node: &SyntaxNode, | 141 | node: &SyntaxNode, |
@@ -145,27 +148,31 @@ impl AssistBuilder { | |||
145 | self.replace(node.text_range(), replace_with) | 148 | self.replace(node.text_range(), replace_with) |
146 | } | 149 | } |
147 | 150 | ||
148 | pub(crate) fn set_edit_builder(&mut self, edit: TextEditBuilder) { | 151 | /// Remove specified `range` of text. |
149 | self.edit = edit; | ||
150 | } | ||
151 | |||
152 | #[allow(unused)] | 152 | #[allow(unused)] |
153 | pub(crate) fn delete(&mut self, range: TextRange) { | 153 | pub(crate) fn delete(&mut self, range: TextRange) { |
154 | self.edit.delete(range) | 154 | self.edit.delete(range) |
155 | } | 155 | } |
156 | 156 | ||
157 | /// Append specified `text` at the given `offset` | ||
157 | pub(crate) fn insert(&mut self, offset: TextUnit, text: impl Into<String>) { | 158 | pub(crate) fn insert(&mut self, offset: TextUnit, text: impl Into<String>) { |
158 | self.edit.insert(offset, text.into()) | 159 | self.edit.insert(offset, text.into()) |
159 | } | 160 | } |
160 | 161 | ||
162 | /// Specify desired position of the cursor after the assist is applied. | ||
161 | pub(crate) fn set_cursor(&mut self, offset: TextUnit) { | 163 | pub(crate) fn set_cursor(&mut self, offset: TextUnit) { |
162 | self.cursor_position = Some(offset) | 164 | self.cursor_position = Some(offset) |
163 | } | 165 | } |
164 | 166 | ||
167 | /// Specify that the assist should be active withing the `target` range. | ||
168 | /// | ||
169 | /// Target ranges are used to sort assists: the smaller the target range, | ||
170 | /// the more specific assist is, and so it should be sorted first. | ||
165 | pub(crate) fn target(&mut self, target: TextRange) { | 171 | pub(crate) fn target(&mut self, target: TextRange) { |
166 | self.target = Some(target) | 172 | self.target = Some(target) |
167 | } | 173 | } |
168 | 174 | ||
175 | /// Get access to the raw `TextEditBuilder`. | ||
169 | pub(crate) fn text_edit_builder(&mut self) -> &mut TextEditBuilder { | 176 | pub(crate) fn text_edit_builder(&mut self) -> &mut TextEditBuilder { |
170 | &mut self.edit | 177 | &mut self.edit |
171 | } | 178 | } |
diff --git a/crates/ra_assists/src/auto_import.rs b/crates/ra_assists/src/auto_import.rs index 43e75eee1..a32e2f9b6 100644 --- a/crates/ra_assists/src/auto_import.rs +++ b/crates/ra_assists/src/auto_import.rs | |||
@@ -562,9 +562,12 @@ pub(crate) fn auto_import(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist | |||
562 | AssistId("auto_import"), | 562 | AssistId("auto_import"), |
563 | format!("import {} in mod {}", fmt_segments(&segments), name.text()), | 563 | format!("import {} in mod {}", fmt_segments(&segments), name.text()), |
564 | |edit| { | 564 | |edit| { |
565 | let mut text_edit = TextEditBuilder::default(); | 565 | apply_auto_import( |
566 | apply_auto_import(item_list.syntax(), &path, &segments, &mut text_edit); | 566 | item_list.syntax(), |
567 | edit.set_edit_builder(text_edit); | 567 | &path, |
568 | &segments, | ||
569 | edit.text_edit_builder(), | ||
570 | ); | ||
568 | }, | 571 | }, |
569 | ); | 572 | ); |
570 | } | 573 | } |
@@ -574,9 +577,12 @@ pub(crate) fn auto_import(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist | |||
574 | AssistId("auto_import"), | 577 | AssistId("auto_import"), |
575 | format!("import {} in the current file", fmt_segments(&segments)), | 578 | format!("import {} in the current file", fmt_segments(&segments)), |
576 | |edit| { | 579 | |edit| { |
577 | let mut text_edit = TextEditBuilder::default(); | 580 | apply_auto_import( |
578 | apply_auto_import(current_file.syntax(), &path, &segments, &mut text_edit); | 581 | current_file.syntax(), |
579 | edit.set_edit_builder(text_edit); | 582 | &path, |
583 | &segments, | ||
584 | edit.text_edit_builder(), | ||
585 | ); | ||
580 | }, | 586 | }, |
581 | ); | 587 | ); |
582 | } | 588 | } |
diff --git a/crates/ra_cli/src/analysis_bench.rs b/crates/ra_cli/src/analysis_bench.rs index 639ac763e..5e9d0c16d 100644 --- a/crates/ra_cli/src/analysis_bench.rs +++ b/crates/ra_cli/src/analysis_bench.rs | |||
@@ -55,7 +55,7 @@ pub(crate) fn run(verbose: bool, path: &Path, op: Op) -> Result<()> { | |||
55 | Op::Complete { line, column, .. } => { | 55 | Op::Complete { line, column, .. } => { |
56 | let offset = host | 56 | let offset = host |
57 | .analysis() | 57 | .analysis() |
58 | .file_line_index(file_id) | 58 | .file_line_index(file_id)? |
59 | .offset(LineCol { line, col_utf16: column }); | 59 | .offset(LineCol { line, col_utf16: column }); |
60 | let file_postion = FilePosition { file_id, offset }; | 60 | let file_postion = FilePosition { file_id, offset }; |
61 | 61 | ||
diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs index 7f765caf3..06b732215 100644 --- a/crates/ra_hir/src/nameres/collector.rs +++ b/crates/ra_hir/src/nameres/collector.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | use std::borrow::Cow; | 1 | use std::borrow::Cow; |
2 | use std::sync::Arc; | ||
2 | 3 | ||
3 | use arrayvec::ArrayVec; | 4 | use ra_db::{FileId, SourceRoot}; |
4 | use ra_db::FileId; | ||
5 | use ra_syntax::{ast, SmolStr}; | 5 | use ra_syntax::{ast, SmolStr}; |
6 | use relative_path::RelativePathBuf; | 6 | use relative_path::RelativePathBuf; |
7 | use rustc_hash::FxHashMap; | 7 | use rustc_hash::FxHashMap; |
@@ -105,6 +105,7 @@ where | |||
105 | module_id, | 105 | module_id, |
106 | file_id: file_id.into(), | 106 | file_id: file_id.into(), |
107 | raw_items: &raw_items, | 107 | raw_items: &raw_items, |
108 | parent_module: None, | ||
108 | } | 109 | } |
109 | .collect(raw_items.items()); | 110 | .collect(raw_items.items()); |
110 | 111 | ||
@@ -455,8 +456,14 @@ where | |||
455 | if !self.macro_stack_monitor.is_poison(macro_def_id) { | 456 | if !self.macro_stack_monitor.is_poison(macro_def_id) { |
456 | let file_id: HirFileId = macro_call_id.as_file(MacroFileKind::Items); | 457 | let file_id: HirFileId = macro_call_id.as_file(MacroFileKind::Items); |
457 | let raw_items = self.db.raw_items(file_id); | 458 | let raw_items = self.db.raw_items(file_id); |
458 | ModCollector { def_collector: &mut *self, file_id, module_id, raw_items: &raw_items } | 459 | ModCollector { |
459 | .collect(raw_items.items()); | 460 | def_collector: &mut *self, |
461 | file_id, | ||
462 | module_id, | ||
463 | raw_items: &raw_items, | ||
464 | parent_module: None, | ||
465 | } | ||
466 | .collect(raw_items.items()); | ||
460 | } else { | 467 | } else { |
461 | log::error!("Too deep macro expansion: {:?}", macro_call_id); | 468 | log::error!("Too deep macro expansion: {:?}", macro_call_id); |
462 | self.def_map.poison_macros.insert(macro_def_id); | 469 | self.def_map.poison_macros.insert(macro_def_id); |
@@ -476,6 +483,7 @@ struct ModCollector<'a, D> { | |||
476 | module_id: CrateModuleId, | 483 | module_id: CrateModuleId, |
477 | file_id: HirFileId, | 484 | file_id: HirFileId, |
478 | raw_items: &'a raw::RawItems, | 485 | raw_items: &'a raw::RawItems, |
486 | parent_module: Option<&'a Name>, | ||
479 | } | 487 | } |
480 | 488 | ||
481 | impl<DB> ModCollector<'_, &'_ mut DefCollector<&'_ DB>> | 489 | impl<DB> ModCollector<'_, &'_ mut DefCollector<&'_ DB>> |
@@ -508,6 +516,7 @@ where | |||
508 | module_id, | 516 | module_id, |
509 | file_id: self.file_id, | 517 | file_id: self.file_id, |
510 | raw_items: self.raw_items, | 518 | raw_items: self.raw_items, |
519 | parent_module: Some(name), | ||
511 | } | 520 | } |
512 | .collect(&*items); | 521 | .collect(&*items); |
513 | } | 522 | } |
@@ -521,6 +530,7 @@ where | |||
521 | name, | 530 | name, |
522 | is_root, | 531 | is_root, |
523 | attr_path.as_ref(), | 532 | attr_path.as_ref(), |
533 | self.parent_module, | ||
524 | ) { | 534 | ) { |
525 | Ok(file_id) => { | 535 | Ok(file_id) => { |
526 | let module_id = self.push_child_module(name.clone(), ast_id, Some(file_id)); | 536 | let module_id = self.push_child_module(name.clone(), ast_id, Some(file_id)); |
@@ -530,6 +540,7 @@ where | |||
530 | module_id, | 540 | module_id, |
531 | file_id: file_id.into(), | 541 | file_id: file_id.into(), |
532 | raw_items: &raw_items, | 542 | raw_items: &raw_items, |
543 | parent_module: None, | ||
533 | } | 544 | } |
534 | .collect(raw_items.items()) | 545 | .collect(raw_items.items()) |
535 | } | 546 | } |
@@ -636,46 +647,47 @@ fn resolve_submodule( | |||
636 | name: &Name, | 647 | name: &Name, |
637 | is_root: bool, | 648 | is_root: bool, |
638 | attr_path: Option<&SmolStr>, | 649 | attr_path: Option<&SmolStr>, |
650 | parent_module: Option<&Name>, | ||
639 | ) -> Result<FileId, RelativePathBuf> { | 651 | ) -> Result<FileId, RelativePathBuf> { |
640 | // FIXME: handle submodules of inline modules properly | ||
641 | let file_id = file_id.original_file(db); | 652 | let file_id = file_id.original_file(db); |
642 | let source_root_id = db.file_source_root(file_id); | 653 | let source_root_id = db.file_source_root(file_id); |
643 | let path = db.file_relative_path(file_id); | 654 | let path = db.file_relative_path(file_id); |
644 | let root = RelativePathBuf::default(); | 655 | let root = RelativePathBuf::default(); |
645 | let dir_path = path.parent().unwrap_or(&root); | 656 | let dir_path = path.parent().unwrap_or(&root); |
646 | let mod_name = path.file_stem().unwrap_or("unknown"); | 657 | let mod_name = path.file_stem().unwrap_or("unknown"); |
647 | let is_dir_owner = is_root || mod_name == "mod"; | 658 | |
648 | 659 | let resolve_mode = match (attr_path.filter(|p| !p.is_empty()), parent_module) { | |
649 | let file_mod = dir_path.join(format!("{}.rs", name)); | 660 | (Some(file_path), Some(parent_name)) => { |
650 | let dir_mod = dir_path.join(format!("{}/mod.rs", name)); | 661 | let file_path = normalize_attribute_path(file_path); |
651 | let file_dir_mod = dir_path.join(format!("{}/{}.rs", mod_name, name)); | 662 | let path = dir_path.join(format!("{}/{}", parent_name, file_path)).normalize(); |
652 | let mut candidates = ArrayVec::<[_; 3]>::new(); | 663 | ResolutionMode::InsideInlineModule(InsideInlineModuleMode::WithAttributePath(path)) |
653 | let file_attr_mod = attr_path.map(|file_path| { | 664 | } |
654 | let file_path = normalize_attribute_path(file_path); | 665 | (Some(file_path), None) => { |
655 | let file_attr_mod = dir_path.join(file_path.as_ref()).normalize(); | 666 | let file_path = normalize_attribute_path(file_path); |
656 | candidates.push(file_attr_mod.clone()); | 667 | let path = dir_path.join(file_path.as_ref()).normalize(); |
657 | 668 | ResolutionMode::OutOfLine(OutOfLineMode::WithAttributePath(path)) | |
658 | file_attr_mod | 669 | } |
659 | }); | 670 | (None, Some(parent_name)) => { |
660 | if is_dir_owner { | 671 | let path = dir_path.join(format!("{}/{}.rs", parent_name, name)); |
661 | candidates.push(file_mod.clone()); | 672 | ResolutionMode::InsideInlineModule(InsideInlineModuleMode::File(path)) |
662 | candidates.push(dir_mod); | 673 | } |
663 | } else { | 674 | _ => { |
664 | candidates.push(file_dir_mod.clone()); | 675 | let is_dir_owner = is_root || mod_name == "mod"; |
665 | }; | 676 | if is_dir_owner { |
666 | let sr = db.source_root(source_root_id); | 677 | let file_mod = dir_path.join(format!("{}.rs", name)); |
667 | let mut points_to = candidates.into_iter().filter_map(|path| sr.files.get(&path)).copied(); | 678 | let dir_mod = dir_path.join(format!("{}/mod.rs", name)); |
668 | // FIXME: handle ambiguity | 679 | ResolutionMode::OutOfLine(OutOfLineMode::RootOrModRs { |
669 | match points_to.next() { | 680 | file: file_mod, |
670 | Some(file_id) => Ok(file_id), | 681 | directory: dir_mod, |
671 | None => { | 682 | }) |
672 | if let Some(file_attr_mod) = file_attr_mod { | ||
673 | Err(file_attr_mod) | ||
674 | } else { | 683 | } else { |
675 | Err(if is_dir_owner { file_mod } else { file_dir_mod }) | 684 | let path = dir_path.join(format!("{}/{}.rs", mod_name, name)); |
685 | ResolutionMode::OutOfLine(OutOfLineMode::FileInDirectory(path)) | ||
676 | } | 686 | } |
677 | } | 687 | } |
678 | } | 688 | }; |
689 | |||
690 | resolve_mode.resolve(db.source_root(source_root_id)) | ||
679 | } | 691 | } |
680 | 692 | ||
681 | fn normalize_attribute_path(file_path: &SmolStr) -> Cow<str> { | 693 | fn normalize_attribute_path(file_path: &SmolStr) -> Cow<str> { |
@@ -693,6 +705,74 @@ fn normalize_attribute_path(file_path: &SmolStr) -> Cow<str> { | |||
693 | } | 705 | } |
694 | } | 706 | } |
695 | 707 | ||
708 | enum OutOfLineMode { | ||
709 | RootOrModRs { file: RelativePathBuf, directory: RelativePathBuf }, | ||
710 | FileInDirectory(RelativePathBuf), | ||
711 | WithAttributePath(RelativePathBuf), | ||
712 | } | ||
713 | |||
714 | impl OutOfLineMode { | ||
715 | pub fn resolve(&self, source_root: Arc<SourceRoot>) -> Result<FileId, RelativePathBuf> { | ||
716 | match self { | ||
717 | OutOfLineMode::RootOrModRs { file, directory } => match source_root.files.get(file) { | ||
718 | None => resolve_simple_path(source_root, directory).map_err(|_| file.clone()), | ||
719 | file_id => resolve_find_result(file_id, file), | ||
720 | }, | ||
721 | OutOfLineMode::FileInDirectory(path) => resolve_simple_path(source_root, path), | ||
722 | OutOfLineMode::WithAttributePath(path) => resolve_simple_path(source_root, path), | ||
723 | } | ||
724 | } | ||
725 | } | ||
726 | |||
727 | enum InsideInlineModuleMode { | ||
728 | File(RelativePathBuf), | ||
729 | WithAttributePath(RelativePathBuf), | ||
730 | } | ||
731 | |||
732 | impl InsideInlineModuleMode { | ||
733 | pub fn resolve(&self, source_root: Arc<SourceRoot>) -> Result<FileId, RelativePathBuf> { | ||
734 | match self { | ||
735 | InsideInlineModuleMode::File(path) => resolve_simple_path(source_root, path), | ||
736 | InsideInlineModuleMode::WithAttributePath(path) => { | ||
737 | resolve_simple_path(source_root, path) | ||
738 | } | ||
739 | } | ||
740 | } | ||
741 | } | ||
742 | |||
743 | enum ResolutionMode { | ||
744 | OutOfLine(OutOfLineMode), | ||
745 | InsideInlineModule(InsideInlineModuleMode), | ||
746 | } | ||
747 | |||
748 | impl ResolutionMode { | ||
749 | pub fn resolve(&self, source_root: Arc<SourceRoot>) -> Result<FileId, RelativePathBuf> { | ||
750 | use self::ResolutionMode::*; | ||
751 | |||
752 | match self { | ||
753 | OutOfLine(mode) => mode.resolve(source_root), | ||
754 | InsideInlineModule(mode) => mode.resolve(source_root), | ||
755 | } | ||
756 | } | ||
757 | } | ||
758 | |||
759 | fn resolve_simple_path( | ||
760 | source_root: Arc<SourceRoot>, | ||
761 | path: &RelativePathBuf, | ||
762 | ) -> Result<FileId, RelativePathBuf> { | ||
763 | resolve_find_result(source_root.files.get(path), path) | ||
764 | } | ||
765 | |||
766 | fn resolve_find_result( | ||
767 | file_id: Option<&FileId>, | ||
768 | path: &RelativePathBuf, | ||
769 | ) -> Result<FileId, RelativePathBuf> { | ||
770 | match file_id { | ||
771 | Some(file_id) => Ok(file_id.clone()), | ||
772 | None => Err(path.clone()), | ||
773 | } | ||
774 | } | ||
775 | |||
696 | #[cfg(test)] | 776 | #[cfg(test)] |
697 | mod tests { | 777 | mod tests { |
698 | use ra_db::SourceDatabase; | 778 | use ra_db::SourceDatabase; |
diff --git a/crates/ra_hir/src/nameres/tests/mods.rs b/crates/ra_hir/src/nameres/tests/mods.rs index d714a3276..382728149 100644 --- a/crates/ra_hir/src/nameres/tests/mods.rs +++ b/crates/ra_hir/src/nameres/tests/mods.rs | |||
@@ -336,10 +336,10 @@ fn module_resolution_explicit_path_mod_rs_with_win_separator() { | |||
336 | "###); | 336 | "###); |
337 | } | 337 | } |
338 | 338 | ||
339 | // FIXME: issue #1510. not support out-of-line modules inside inline. | 339 | // FIXME: issue #1529. not support out-of-line modules inside inline. |
340 | #[test] | 340 | #[test] |
341 | #[ignore] | 341 | #[ignore] |
342 | fn module_resolution_decl_inside_inline_module() { | 342 | fn module_resolution_decl_inside_inline_module_with_path_attribute() { |
343 | let map = def_map_with_crate_graph( | 343 | let map = def_map_with_crate_graph( |
344 | r###" | 344 | r###" |
345 | //- /main.rs | 345 | //- /main.rs |
@@ -368,10 +368,39 @@ fn module_resolution_decl_inside_inline_module() { | |||
368 | "###); | 368 | "###); |
369 | } | 369 | } |
370 | 370 | ||
371 | // FIXME: issue #1510. not support out-of-line modules inside inline. | 371 | #[test] |
372 | fn module_resolution_decl_inside_inline_module() { | ||
373 | let map = def_map_with_crate_graph( | ||
374 | r###" | ||
375 | //- /main.rs | ||
376 | mod foo { | ||
377 | mod bar; | ||
378 | } | ||
379 | |||
380 | //- /foo/bar.rs | ||
381 | pub struct Baz; | ||
382 | "###, | ||
383 | crate_graph! { | ||
384 | "main": ("/main.rs", []), | ||
385 | }, | ||
386 | ); | ||
387 | |||
388 | assert_snapshot_matches!(map, @r###" | ||
389 | â‹®crate | ||
390 | â‹®foo: t | ||
391 | â‹® | ||
392 | â‹®crate::foo | ||
393 | â‹®bar: t | ||
394 | â‹® | ||
395 | â‹®crate::foo::bar | ||
396 | â‹®Baz: t v | ||
397 | "###); | ||
398 | } | ||
399 | |||
400 | // FIXME: issue #1529. not support out-of-line modules inside inline. | ||
372 | #[test] | 401 | #[test] |
373 | #[ignore] | 402 | #[ignore] |
374 | fn module_resolution_decl_inside_inline_module_2() { | 403 | fn module_resolution_decl_inside_inline_module_2_with_path_attribute() { |
375 | let map = def_map_with_crate_graph( | 404 | let map = def_map_with_crate_graph( |
376 | r###" | 405 | r###" |
377 | //- /main.rs | 406 | //- /main.rs |
@@ -400,7 +429,7 @@ fn module_resolution_decl_inside_inline_module_2() { | |||
400 | "###); | 429 | "###); |
401 | } | 430 | } |
402 | 431 | ||
403 | // FIXME: issue #1510. not support out-of-line modules inside inline. | 432 | // FIXME: issue #1529. not support out-of-line modules inside inline. |
404 | #[test] | 433 | #[test] |
405 | #[ignore] | 434 | #[ignore] |
406 | fn module_resolution_decl_inside_inline_module_3() { | 435 | fn module_resolution_decl_inside_inline_module_3() { |
@@ -433,7 +462,7 @@ fn module_resolution_decl_inside_inline_module_3() { | |||
433 | "###); | 462 | "###); |
434 | } | 463 | } |
435 | 464 | ||
436 | // FIXME: issue #1510. not support out-of-line modules inside inline. | 465 | // FIXME: issue #1529. not support out-of-line modules inside inline. |
437 | #[test] | 466 | #[test] |
438 | #[ignore] | 467 | #[ignore] |
439 | fn module_resolution_decl_inside_inline_module_empty_path() { | 468 | fn module_resolution_decl_inside_inline_module_empty_path() { |
@@ -491,7 +520,7 @@ fn module_resolution_decl_empty_path() { | |||
491 | "###); | 520 | "###); |
492 | } | 521 | } |
493 | 522 | ||
494 | // FIXME: issue #1510. not support out-of-line modules inside inline. | 523 | // FIXME: issue #1529. not support out-of-line modules inside inline. |
495 | #[test] | 524 | #[test] |
496 | #[ignore] | 525 | #[ignore] |
497 | fn module_resolution_decl_inside_inline_module_relative_path() { | 526 | fn module_resolution_decl_inside_inline_module_relative_path() { |
@@ -523,9 +552,7 @@ fn module_resolution_decl_inside_inline_module_relative_path() { | |||
523 | "###); | 552 | "###); |
524 | } | 553 | } |
525 | 554 | ||
526 | // FIXME: issue #1510. not support out-of-line modules inside inline. | ||
527 | #[test] | 555 | #[test] |
528 | #[ignore] | ||
529 | fn module_resolution_decl_inside_inline_module_in_crate_root() { | 556 | fn module_resolution_decl_inside_inline_module_in_crate_root() { |
530 | let map = def_map_with_crate_graph( | 557 | let map = def_map_with_crate_graph( |
531 | r###" | 558 | r###" |
@@ -557,9 +584,7 @@ fn module_resolution_decl_inside_inline_module_in_crate_root() { | |||
557 | "###); | 584 | "###); |
558 | } | 585 | } |
559 | 586 | ||
560 | // FIXME: issue #1510. not support out-of-line modules inside inline. | ||
561 | #[test] | 587 | #[test] |
562 | #[ignore] | ||
563 | fn module_resolution_decl_inside_inline_module_in_mod_rs() { | 588 | fn module_resolution_decl_inside_inline_module_in_mod_rs() { |
564 | let map = def_map_with_crate_graph( | 589 | let map = def_map_with_crate_graph( |
565 | r###" | 590 | r###" |
@@ -597,9 +622,7 @@ fn module_resolution_decl_inside_inline_module_in_mod_rs() { | |||
597 | "###); | 622 | "###); |
598 | } | 623 | } |
599 | 624 | ||
600 | // FIXME: issue #1510. not support out-of-line modules inside inline. | ||
601 | #[test] | 625 | #[test] |
602 | #[ignore] | ||
603 | fn module_resolution_decl_inside_inline_module_in_non_crate_root() { | 626 | fn module_resolution_decl_inside_inline_module_in_non_crate_root() { |
604 | let map = def_map_with_crate_graph( | 627 | let map = def_map_with_crate_graph( |
605 | r###" | 628 | r###" |
@@ -613,7 +636,7 @@ fn module_resolution_decl_inside_inline_module_in_non_crate_root() { | |||
613 | } | 636 | } |
614 | use self::bar::baz::Baz; | 637 | use self::bar::baz::Baz; |
615 | 638 | ||
616 | //- /foo/bar/qwe.rs | 639 | //- /bar/qwe.rs |
617 | pub struct Baz; | 640 | pub struct Baz; |
618 | "###, | 641 | "###, |
619 | crate_graph! { | 642 | crate_graph! { |
@@ -637,7 +660,7 @@ fn module_resolution_decl_inside_inline_module_in_non_crate_root() { | |||
637 | "###); | 660 | "###); |
638 | } | 661 | } |
639 | 662 | ||
640 | // FIXME: issue #1510. not support out-of-line modules inside inline. | 663 | // FIXME: issue #1529. not support out-of-line modules inside inline. |
641 | #[test] | 664 | #[test] |
642 | #[ignore] | 665 | #[ignore] |
643 | fn module_resolution_decl_inside_inline_module_in_non_crate_root_2() { | 666 | fn module_resolution_decl_inside_inline_module_in_non_crate_root_2() { |
diff --git a/crates/ra_ide_api/src/completion.rs b/crates/ra_ide_api/src/completion.rs index 85160358a..a6b68be75 100644 --- a/crates/ra_ide_api/src/completion.rs +++ b/crates/ra_ide_api/src/completion.rs | |||
@@ -16,7 +16,7 @@ mod complete_postfix; | |||
16 | use ra_db::SourceDatabase; | 16 | use ra_db::SourceDatabase; |
17 | 17 | ||
18 | #[cfg(test)] | 18 | #[cfg(test)] |
19 | use crate::completion::completion_item::{check_completion, do_completion}; | 19 | use crate::completion::completion_item::do_completion; |
20 | use crate::{ | 20 | use crate::{ |
21 | completion::{ | 21 | completion::{ |
22 | completion_context::CompletionContext, | 22 | completion_context::CompletionContext, |
diff --git a/crates/ra_ide_api/src/completion/complete_scope.rs b/crates/ra_ide_api/src/completion/complete_scope.rs index f92034055..2000d953a 100644 --- a/crates/ra_ide_api/src/completion/complete_scope.rs +++ b/crates/ra_ide_api/src/completion/complete_scope.rs | |||
@@ -121,172 +121,413 @@ impl ImportResolver { | |||
121 | 121 | ||
122 | #[cfg(test)] | 122 | #[cfg(test)] |
123 | mod tests { | 123 | mod tests { |
124 | use crate::completion::{check_completion, CompletionKind}; | 124 | use crate::completion::{do_completion, CompletionItem, CompletionKind}; |
125 | use insta::assert_debug_snapshot_matches; | ||
125 | 126 | ||
126 | fn check_reference_completion(name: &str, code: &str) { | 127 | fn do_reference_completion(code: &str) -> Vec<CompletionItem> { |
127 | check_completion(name, code, CompletionKind::Reference); | 128 | do_completion(code, CompletionKind::Reference) |
128 | } | 129 | } |
129 | 130 | ||
130 | #[test] | 131 | #[test] |
131 | fn completes_bindings_from_let() { | 132 | fn completes_bindings_from_let() { |
132 | check_reference_completion( | 133 | assert_debug_snapshot_matches!( |
133 | "bindings_from_let", | 134 | do_reference_completion( |
134 | r" | 135 | r" |
135 | fn quux(x: i32) { | 136 | fn quux(x: i32) { |
136 | let y = 92; | 137 | let y = 92; |
137 | 1 + <|>; | 138 | 1 + <|>; |
138 | let z = (); | 139 | let z = (); |
139 | } | 140 | } |
140 | ", | 141 | " |
142 | ), | ||
143 | @r###"[ | ||
144 | CompletionItem { | ||
145 | label: "quux", | ||
146 | source_range: [91; 91), | ||
147 | delete: [91; 91), | ||
148 | insert: "quux($0)", | ||
149 | kind: Function, | ||
150 | detail: "fn quux(x: i32)", | ||
151 | }, | ||
152 | CompletionItem { | ||
153 | label: "x", | ||
154 | source_range: [91; 91), | ||
155 | delete: [91; 91), | ||
156 | insert: "x", | ||
157 | kind: Binding, | ||
158 | detail: "i32", | ||
159 | }, | ||
160 | CompletionItem { | ||
161 | label: "y", | ||
162 | source_range: [91; 91), | ||
163 | delete: [91; 91), | ||
164 | insert: "y", | ||
165 | kind: Binding, | ||
166 | detail: "i32", | ||
167 | }, | ||
168 | ]"### | ||
141 | ); | 169 | ); |
142 | } | 170 | } |
143 | 171 | ||
144 | #[test] | 172 | #[test] |
145 | fn completes_bindings_from_if_let() { | 173 | fn completes_bindings_from_if_let() { |
146 | check_reference_completion( | 174 | assert_debug_snapshot_matches!( |
147 | "bindings_from_if_let", | 175 | do_reference_completion( |
148 | r" | 176 | r" |
149 | fn quux() { | 177 | fn quux() { |
150 | if let Some(x) = foo() { | 178 | if let Some(x) = foo() { |
151 | let y = 92; | 179 | let y = 92; |
152 | }; | 180 | }; |
153 | if let Some(a) = bar() { | 181 | if let Some(a) = bar() { |
154 | let b = 62; | 182 | let b = 62; |
155 | 1 + <|> | 183 | 1 + <|> |
184 | } | ||
156 | } | 185 | } |
157 | } | 186 | " |
158 | ", | 187 | ), |
188 | @r###"[ | ||
189 | CompletionItem { | ||
190 | label: "a", | ||
191 | source_range: [242; 242), | ||
192 | delete: [242; 242), | ||
193 | insert: "a", | ||
194 | kind: Binding, | ||
195 | }, | ||
196 | CompletionItem { | ||
197 | label: "b", | ||
198 | source_range: [242; 242), | ||
199 | delete: [242; 242), | ||
200 | insert: "b", | ||
201 | kind: Binding, | ||
202 | detail: "i32", | ||
203 | }, | ||
204 | CompletionItem { | ||
205 | label: "quux", | ||
206 | source_range: [242; 242), | ||
207 | delete: [242; 242), | ||
208 | insert: "quux()$0", | ||
209 | kind: Function, | ||
210 | detail: "fn quux()", | ||
211 | }, | ||
212 | ]"### | ||
159 | ); | 213 | ); |
160 | } | 214 | } |
161 | 215 | ||
162 | #[test] | 216 | #[test] |
163 | fn completes_bindings_from_for() { | 217 | fn completes_bindings_from_for() { |
164 | check_reference_completion( | 218 | assert_debug_snapshot_matches!( |
165 | "bindings_from_for", | 219 | do_reference_completion( |
166 | r" | 220 | r" |
167 | fn quux() { | 221 | fn quux() { |
168 | for x in &[1, 2, 3] { | 222 | for x in &[1, 2, 3] { |
169 | <|> | 223 | <|> |
224 | } | ||
170 | } | 225 | } |
171 | } | 226 | " |
172 | ", | 227 | ), |
228 | @r###"[ | ||
229 | CompletionItem { | ||
230 | label: "quux", | ||
231 | source_range: [95; 95), | ||
232 | delete: [95; 95), | ||
233 | insert: "quux()$0", | ||
234 | kind: Function, | ||
235 | detail: "fn quux()", | ||
236 | }, | ||
237 | CompletionItem { | ||
238 | label: "x", | ||
239 | source_range: [95; 95), | ||
240 | delete: [95; 95), | ||
241 | insert: "x", | ||
242 | kind: Binding, | ||
243 | }, | ||
244 | ]"### | ||
173 | ); | 245 | ); |
174 | } | 246 | } |
175 | 247 | ||
176 | #[test] | 248 | #[test] |
177 | fn completes_generic_params() { | 249 | fn completes_generic_params() { |
178 | check_reference_completion( | 250 | assert_debug_snapshot_matches!( |
179 | "generic_params", | 251 | do_reference_completion( |
180 | r" | 252 | r" |
181 | fn quux<T>() { | 253 | fn quux<T>() { |
182 | <|> | 254 | <|> |
183 | } | 255 | } |
184 | ", | 256 | " |
257 | ), | ||
258 | @r###"[ | ||
259 | CompletionItem { | ||
260 | label: "T", | ||
261 | source_range: [52; 52), | ||
262 | delete: [52; 52), | ||
263 | insert: "T", | ||
264 | kind: TypeParam, | ||
265 | }, | ||
266 | CompletionItem { | ||
267 | label: "quux", | ||
268 | source_range: [52; 52), | ||
269 | delete: [52; 52), | ||
270 | insert: "quux()$0", | ||
271 | kind: Function, | ||
272 | detail: "fn quux<T>()", | ||
273 | }, | ||
274 | ]"### | ||
185 | ); | 275 | ); |
186 | } | 276 | } |
187 | 277 | ||
188 | #[test] | 278 | #[test] |
189 | fn completes_generic_params_in_struct() { | 279 | fn completes_generic_params_in_struct() { |
190 | check_reference_completion( | 280 | assert_debug_snapshot_matches!( |
191 | "generic_params_in_struct", | 281 | do_reference_completion( |
192 | r" | 282 | r" |
193 | struct X<T> { | 283 | struct X<T> { |
194 | x: <|> | 284 | x: <|> |
195 | } | 285 | } |
196 | ", | 286 | " |
287 | ), | ||
288 | @r###"[ | ||
289 | CompletionItem { | ||
290 | label: "T", | ||
291 | source_range: [54; 54), | ||
292 | delete: [54; 54), | ||
293 | insert: "T", | ||
294 | kind: TypeParam, | ||
295 | }, | ||
296 | CompletionItem { | ||
297 | label: "X", | ||
298 | source_range: [54; 54), | ||
299 | delete: [54; 54), | ||
300 | insert: "X", | ||
301 | kind: Struct, | ||
302 | }, | ||
303 | ]"### | ||
197 | ); | 304 | ); |
198 | } | 305 | } |
199 | 306 | ||
200 | #[test] | 307 | #[test] |
201 | fn completes_module_items() { | 308 | fn completes_module_items() { |
202 | check_reference_completion( | 309 | assert_debug_snapshot_matches!( |
203 | "module_items", | 310 | do_reference_completion( |
204 | r" | 311 | r" |
205 | struct Foo; | 312 | struct Foo; |
206 | enum Baz {} | 313 | enum Baz {} |
207 | fn quux() { | 314 | fn quux() { |
208 | <|> | 315 | <|> |
209 | } | 316 | } |
210 | ", | 317 | " |
211 | ); | 318 | ), |
319 | @r###"[ | ||
320 | CompletionItem { | ||
321 | label: "Baz", | ||
322 | source_range: [105; 105), | ||
323 | delete: [105; 105), | ||
324 | insert: "Baz", | ||
325 | kind: Enum, | ||
326 | }, | ||
327 | CompletionItem { | ||
328 | label: "Foo", | ||
329 | source_range: [105; 105), | ||
330 | delete: [105; 105), | ||
331 | insert: "Foo", | ||
332 | kind: Struct, | ||
333 | }, | ||
334 | CompletionItem { | ||
335 | label: "quux", | ||
336 | source_range: [105; 105), | ||
337 | delete: [105; 105), | ||
338 | insert: "quux()$0", | ||
339 | kind: Function, | ||
340 | detail: "fn quux()", | ||
341 | }, | ||
342 | ]"### | ||
343 | ); | ||
212 | } | 344 | } |
213 | 345 | ||
214 | #[test] | 346 | #[test] |
215 | fn completes_extern_prelude() { | 347 | fn completes_extern_prelude() { |
216 | check_reference_completion( | 348 | assert_debug_snapshot_matches!( |
217 | "extern_prelude", | 349 | do_reference_completion( |
218 | r" | 350 | r" |
219 | //- /lib.rs | 351 | //- /lib.rs |
220 | use <|>; | 352 | use <|>; |
221 | 353 | ||
222 | //- /other_crate/lib.rs | 354 | //- /other_crate/lib.rs |
223 | // nothing here | 355 | // nothing here |
224 | ", | 356 | " |
357 | ), | ||
358 | @r#"[ | ||
359 | CompletionItem { | ||
360 | label: "other_crate", | ||
361 | source_range: [4; 4), | ||
362 | delete: [4; 4), | ||
363 | insert: "other_crate", | ||
364 | kind: Module, | ||
365 | }, | ||
366 | ]"# | ||
225 | ); | 367 | ); |
226 | } | 368 | } |
227 | 369 | ||
228 | #[test] | 370 | #[test] |
229 | fn completes_module_items_in_nested_modules() { | 371 | fn completes_module_items_in_nested_modules() { |
230 | check_reference_completion( | 372 | assert_debug_snapshot_matches!( |
231 | "module_items_in_nested_modules", | 373 | do_reference_completion( |
232 | r" | 374 | r" |
233 | struct Foo; | 375 | struct Foo; |
234 | mod m { | 376 | mod m { |
235 | struct Bar; | 377 | struct Bar; |
236 | fn quux() { <|> } | 378 | fn quux() { <|> } |
237 | } | 379 | } |
238 | ", | 380 | " |
381 | ), | ||
382 | @r###"[ | ||
383 | CompletionItem { | ||
384 | label: "Bar", | ||
385 | source_range: [117; 117), | ||
386 | delete: [117; 117), | ||
387 | insert: "Bar", | ||
388 | kind: Struct, | ||
389 | }, | ||
390 | CompletionItem { | ||
391 | label: "quux", | ||
392 | source_range: [117; 117), | ||
393 | delete: [117; 117), | ||
394 | insert: "quux()$0", | ||
395 | kind: Function, | ||
396 | detail: "fn quux()", | ||
397 | }, | ||
398 | ]"### | ||
239 | ); | 399 | ); |
240 | } | 400 | } |
241 | 401 | ||
242 | #[test] | 402 | #[test] |
243 | fn completes_return_type() { | 403 | fn completes_return_type() { |
244 | check_reference_completion( | 404 | assert_debug_snapshot_matches!( |
245 | "return_type", | 405 | do_reference_completion( |
246 | r" | 406 | r" |
247 | struct Foo; | 407 | struct Foo; |
248 | fn x() -> <|> | 408 | fn x() -> <|> |
249 | ", | 409 | " |
250 | ) | 410 | ), |
411 | @r###"[ | ||
412 | CompletionItem { | ||
413 | label: "Foo", | ||
414 | source_range: [55; 55), | ||
415 | delete: [55; 55), | ||
416 | insert: "Foo", | ||
417 | kind: Struct, | ||
418 | }, | ||
419 | CompletionItem { | ||
420 | label: "x", | ||
421 | source_range: [55; 55), | ||
422 | delete: [55; 55), | ||
423 | insert: "x()$0", | ||
424 | kind: Function, | ||
425 | detail: "fn x()", | ||
426 | }, | ||
427 | ]"### | ||
428 | ); | ||
251 | } | 429 | } |
252 | 430 | ||
253 | #[test] | 431 | #[test] |
254 | fn dont_show_both_completions_for_shadowing() { | 432 | fn dont_show_both_completions_for_shadowing() { |
255 | check_reference_completion( | 433 | assert_debug_snapshot_matches!( |
256 | "dont_show_both_completions_for_shadowing", | 434 | do_reference_completion( |
257 | r" | 435 | r" |
258 | fn foo() { | 436 | fn foo() { |
259 | let bar = 92; | 437 | let bar = 92; |
260 | { | 438 | { |
261 | let bar = 62; | 439 | let bar = 62; |
262 | <|> | 440 | <|> |
441 | } | ||
263 | } | 442 | } |
264 | } | 443 | " |
265 | ", | 444 | ), |
266 | ) | 445 | @r###"[ |
446 | CompletionItem { | ||
447 | label: "bar", | ||
448 | source_range: [146; 146), | ||
449 | delete: [146; 146), | ||
450 | insert: "bar", | ||
451 | kind: Binding, | ||
452 | detail: "i32", | ||
453 | }, | ||
454 | CompletionItem { | ||
455 | label: "foo", | ||
456 | source_range: [146; 146), | ||
457 | delete: [146; 146), | ||
458 | insert: "foo()$0", | ||
459 | kind: Function, | ||
460 | detail: "fn foo()", | ||
461 | }, | ||
462 | ]"### | ||
463 | ); | ||
267 | } | 464 | } |
268 | 465 | ||
269 | #[test] | 466 | #[test] |
270 | fn completes_self_in_methods() { | 467 | fn completes_self_in_methods() { |
271 | check_reference_completion("self_in_methods", r"impl S { fn foo(&self) { <|> } }") | 468 | assert_debug_snapshot_matches!( |
469 | do_reference_completion(r"impl S { fn foo(&self) { <|> } }"), | ||
470 | @r#"[ | ||
471 | CompletionItem { | ||
472 | label: "Self", | ||
473 | source_range: [25; 25), | ||
474 | delete: [25; 25), | ||
475 | insert: "Self", | ||
476 | kind: TypeParam, | ||
477 | }, | ||
478 | CompletionItem { | ||
479 | label: "self", | ||
480 | source_range: [25; 25), | ||
481 | delete: [25; 25), | ||
482 | insert: "self", | ||
483 | kind: Binding, | ||
484 | detail: "&{unknown}", | ||
485 | }, | ||
486 | ]"# | ||
487 | ); | ||
272 | } | 488 | } |
273 | 489 | ||
274 | #[test] | 490 | #[test] |
275 | fn completes_prelude() { | 491 | fn completes_prelude() { |
276 | check_reference_completion( | 492 | assert_debug_snapshot_matches!( |
277 | "completes_prelude", | 493 | do_reference_completion( |
278 | " | 494 | " |
279 | //- /main.rs | 495 | //- /main.rs |
280 | fn foo() { let x: <|> } | 496 | fn foo() { let x: <|> } |
281 | 497 | ||
282 | //- /std/lib.rs | 498 | //- /std/lib.rs |
283 | #[prelude_import] | 499 | #[prelude_import] |
284 | use prelude::*; | 500 | use prelude::*; |
285 | 501 | ||
286 | mod prelude { | 502 | mod prelude { |
287 | struct Option; | 503 | struct Option; |
288 | } | 504 | } |
289 | ", | 505 | " |
506 | ), | ||
507 | @r#"[ | ||
508 | CompletionItem { | ||
509 | label: "Option", | ||
510 | source_range: [18; 18), | ||
511 | delete: [18; 18), | ||
512 | insert: "Option", | ||
513 | kind: Struct, | ||
514 | }, | ||
515 | CompletionItem { | ||
516 | label: "foo", | ||
517 | source_range: [18; 18), | ||
518 | delete: [18; 18), | ||
519 | insert: "foo()$0", | ||
520 | kind: Function, | ||
521 | detail: "fn foo()", | ||
522 | }, | ||
523 | CompletionItem { | ||
524 | label: "std", | ||
525 | source_range: [18; 18), | ||
526 | delete: [18; 18), | ||
527 | insert: "std", | ||
528 | kind: Module, | ||
529 | }, | ||
530 | ]"# | ||
290 | ); | 531 | ); |
291 | } | 532 | } |
292 | } | 533 | } |
diff --git a/crates/ra_ide_api/src/completion/complete_snippet.rs b/crates/ra_ide_api/src/completion/complete_snippet.rs index d2d364b57..a35f31511 100644 --- a/crates/ra_ide_api/src/completion/complete_snippet.rs +++ b/crates/ra_ide_api/src/completion/complete_snippet.rs | |||
@@ -39,39 +39,76 @@ fn ${1:feature}() { | |||
39 | 39 | ||
40 | #[cfg(test)] | 40 | #[cfg(test)] |
41 | mod tests { | 41 | mod tests { |
42 | use crate::completion::{check_completion, CompletionKind}; | 42 | use crate::completion::{do_completion, CompletionItem, CompletionKind}; |
43 | use insta::assert_debug_snapshot_matches; | ||
43 | 44 | ||
44 | fn check_snippet_completion(name: &str, code: &str) { | 45 | fn do_snippet_completion(code: &str) -> Vec<CompletionItem> { |
45 | check_completion(name, code, CompletionKind::Snippet); | 46 | do_completion(code, CompletionKind::Snippet) |
46 | } | 47 | } |
47 | 48 | ||
48 | #[test] | 49 | #[test] |
49 | fn completes_snippets_in_expressions() { | 50 | fn completes_snippets_in_expressions() { |
50 | check_snippet_completion("snippets_in_expressions", r"fn foo(x: i32) { <|> }"); | 51 | assert_debug_snapshot_matches!( |
52 | do_snippet_completion(r"fn foo(x: i32) { <|> }"), | ||
53 | @r#"[ | ||
54 | CompletionItem { | ||
55 | label: "pd", | ||
56 | source_range: [17; 17), | ||
57 | delete: [17; 17), | ||
58 | insert: "eprintln!(\"$0 = {:?}\", $0);", | ||
59 | kind: Snippet, | ||
60 | }, | ||
61 | CompletionItem { | ||
62 | label: "ppd", | ||
63 | source_range: [17; 17), | ||
64 | delete: [17; 17), | ||
65 | insert: "eprintln!(\"$0 = {:#?}\", $0);", | ||
66 | kind: Snippet, | ||
67 | }, | ||
68 | ]"# | ||
69 | ); | ||
51 | } | 70 | } |
52 | 71 | ||
53 | #[test] | 72 | #[test] |
54 | fn should_not_complete_snippets_in_path() { | 73 | fn should_not_complete_snippets_in_path() { |
55 | check_snippet_completion( | 74 | assert_debug_snapshot_matches!( |
56 | "should_not_complete_snippets_in_path", | 75 | do_snippet_completion(r"fn foo(x: i32) { ::foo<|> }"), |
57 | r"fn foo(x: i32) { ::foo<|> }", | 76 | @r#"[]"# |
58 | ); | 77 | ); |
59 | check_snippet_completion( | 78 | assert_debug_snapshot_matches!( |
60 | "should_not_complete_snippets_in_path2", | 79 | do_snippet_completion(r"fn foo(x: i32) { ::<|> }"), |
61 | r"fn foo(x: i32) { ::<|> }", | 80 | @r#"[]"# |
62 | ); | 81 | ); |
63 | } | 82 | } |
64 | 83 | ||
65 | #[test] | 84 | #[test] |
66 | fn completes_snippets_in_items() { | 85 | fn completes_snippets_in_items() { |
67 | check_snippet_completion( | 86 | assert_debug_snapshot_matches!( |
68 | "snippets_in_items", | 87 | do_snippet_completion( |
69 | r" | 88 | r" |
70 | #[cfg(test)] | 89 | #[cfg(test)] |
71 | mod tests { | 90 | mod tests { |
72 | <|> | 91 | <|> |
73 | } | 92 | } |
74 | ", | 93 | " |
94 | ), | ||
95 | @r###"[ | ||
96 | CompletionItem { | ||
97 | label: "Test function", | ||
98 | source_range: [78; 78), | ||
99 | delete: [78; 78), | ||
100 | insert: "#[test]\nfn ${1:feature}() {\n $0\n}", | ||
101 | kind: Snippet, | ||
102 | lookup: "tfn", | ||
103 | }, | ||
104 | CompletionItem { | ||
105 | label: "pub(crate)", | ||
106 | source_range: [78; 78), | ||
107 | delete: [78; 78), | ||
108 | insert: "pub(crate) $0", | ||
109 | kind: Snippet, | ||
110 | }, | ||
111 | ]"### | ||
75 | ); | 112 | ); |
76 | } | 113 | } |
77 | } | 114 | } |
diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs index f78c4c877..d787bb69e 100644 --- a/crates/ra_ide_api/src/completion/completion_item.rs +++ b/crates/ra_ide_api/src/completion/completion_item.rs | |||
@@ -299,10 +299,3 @@ pub(crate) fn do_completion(code: &str, kind: CompletionKind) -> Vec<CompletionI | |||
299 | kind_completions.sort_by_key(|c| c.label.clone()); | 299 | kind_completions.sort_by_key(|c| c.label.clone()); |
300 | kind_completions | 300 | kind_completions |
301 | } | 301 | } |
302 | |||
303 | #[cfg(test)] | ||
304 | pub(crate) fn check_completion(test_name: &str, code: &str, kind: CompletionKind) { | ||
305 | use insta::assert_debug_snapshot_matches; | ||
306 | let kind_completions = do_completion(code, kind); | ||
307 | assert_debug_snapshot_matches!(test_name, kind_completions); | ||
308 | } | ||
diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs index 5cf55a496..6878008d3 100644 --- a/crates/ra_ide_api/src/completion/presentation.rs +++ b/crates/ra_ide_api/src/completion/presentation.rs | |||
@@ -182,80 +182,169 @@ impl Completions { | |||
182 | 182 | ||
183 | #[cfg(test)] | 183 | #[cfg(test)] |
184 | mod tests { | 184 | mod tests { |
185 | use crate::completion::{do_completion, CompletionItem, CompletionKind}; | ||
186 | use insta::assert_debug_snapshot_matches; | ||
185 | use test_utils::covers; | 187 | use test_utils::covers; |
186 | 188 | ||
187 | use crate::completion::{check_completion, CompletionKind}; | 189 | fn do_reference_completion(code: &str) -> Vec<CompletionItem> { |
188 | 190 | do_completion(code, CompletionKind::Reference) | |
189 | fn check_reference_completion(code: &str, expected_completions: &str) { | ||
190 | check_completion(code, expected_completions, CompletionKind::Reference); | ||
191 | } | 191 | } |
192 | 192 | ||
193 | #[test] | 193 | #[test] |
194 | fn inserts_parens_for_function_calls() { | 194 | fn inserts_parens_for_function_calls() { |
195 | covers!(inserts_parens_for_function_calls); | 195 | covers!(inserts_parens_for_function_calls); |
196 | check_reference_completion( | 196 | assert_debug_snapshot_matches!( |
197 | "inserts_parens_for_function_calls1", | 197 | do_reference_completion( |
198 | r" | 198 | r" |
199 | fn no_args() {} | 199 | fn no_args() {} |
200 | fn main() { no_<|> } | 200 | fn main() { no_<|> } |
201 | ", | 201 | " |
202 | ), | ||
203 | @r###"[ | ||
204 | CompletionItem { | ||
205 | label: "main", | ||
206 | source_range: [61; 64), | ||
207 | delete: [61; 64), | ||
208 | insert: "main()$0", | ||
209 | kind: Function, | ||
210 | detail: "fn main()", | ||
211 | }, | ||
212 | CompletionItem { | ||
213 | label: "no_args", | ||
214 | source_range: [61; 64), | ||
215 | delete: [61; 64), | ||
216 | insert: "no_args()$0", | ||
217 | kind: Function, | ||
218 | detail: "fn no_args()", | ||
219 | }, | ||
220 | ]"### | ||
202 | ); | 221 | ); |
203 | check_reference_completion( | 222 | assert_debug_snapshot_matches!( |
204 | "inserts_parens_for_function_calls2", | 223 | do_reference_completion( |
205 | r" | 224 | r" |
206 | fn with_args(x: i32, y: String) {} | 225 | fn with_args(x: i32, y: String) {} |
207 | fn main() { with_<|> } | 226 | fn main() { with_<|> } |
208 | ", | 227 | " |
228 | ), | ||
229 | @r###"[ | ||
230 | CompletionItem { | ||
231 | label: "main", | ||
232 | source_range: [80; 85), | ||
233 | delete: [80; 85), | ||
234 | insert: "main()$0", | ||
235 | kind: Function, | ||
236 | detail: "fn main()", | ||
237 | }, | ||
238 | CompletionItem { | ||
239 | label: "with_args", | ||
240 | source_range: [80; 85), | ||
241 | delete: [80; 85), | ||
242 | insert: "with_args($0)", | ||
243 | kind: Function, | ||
244 | detail: "fn with_args(x: i32, y: String)", | ||
245 | }, | ||
246 | ]"### | ||
247 | ); | ||
248 | assert_debug_snapshot_matches!( | ||
249 | do_reference_completion( | ||
250 | r" | ||
251 | struct S {} | ||
252 | impl S { | ||
253 | fn foo(&self) {} | ||
254 | } | ||
255 | fn bar(s: &S) { | ||
256 | s.f<|> | ||
257 | } | ||
258 | " | ||
259 | ), | ||
260 | @r###"[ | ||
261 | CompletionItem { | ||
262 | label: "foo", | ||
263 | source_range: [163; 164), | ||
264 | delete: [163; 164), | ||
265 | insert: "foo()$0", | ||
266 | kind: Method, | ||
267 | detail: "fn foo(&self)", | ||
268 | }, | ||
269 | ]"### | ||
209 | ); | 270 | ); |
210 | check_reference_completion( | ||
211 | "inserts_parens_for_function_calls3", | ||
212 | r" | ||
213 | struct S {} | ||
214 | impl S { | ||
215 | fn foo(&self) {} | ||
216 | } | ||
217 | fn bar(s: &S) { | ||
218 | s.f<|> | ||
219 | } | ||
220 | ", | ||
221 | ) | ||
222 | } | 271 | } |
223 | 272 | ||
224 | #[test] | 273 | #[test] |
225 | fn dont_render_function_parens_in_use_item() { | 274 | fn dont_render_function_parens_in_use_item() { |
226 | check_reference_completion( | 275 | assert_debug_snapshot_matches!( |
227 | "dont_render_function_parens_in_use_item", | 276 | do_reference_completion( |
228 | " | 277 | " |
229 | //- /lib.rs | 278 | //- /lib.rs |
230 | mod m { pub fn foo() {} } | 279 | mod m { pub fn foo() {} } |
231 | use crate::m::f<|>; | 280 | use crate::m::f<|>; |
232 | ", | 281 | " |
233 | ) | 282 | ), |
283 | @r#"[ | ||
284 | CompletionItem { | ||
285 | label: "foo", | ||
286 | source_range: [40; 41), | ||
287 | delete: [40; 41), | ||
288 | insert: "foo", | ||
289 | kind: Function, | ||
290 | detail: "pub fn foo()", | ||
291 | }, | ||
292 | ]"# | ||
293 | ); | ||
234 | } | 294 | } |
235 | 295 | ||
236 | #[test] | 296 | #[test] |
237 | fn dont_render_function_parens_if_already_call() { | 297 | fn dont_render_function_parens_if_already_call() { |
238 | check_reference_completion( | 298 | assert_debug_snapshot_matches!( |
239 | "dont_render_function_parens_if_already_call", | 299 | do_reference_completion( |
240 | " | 300 | " |
241 | //- /lib.rs | 301 | //- /lib.rs |
242 | fn frobnicate() {} | 302 | fn frobnicate() {} |
243 | fn main() { | 303 | fn main() { |
244 | frob<|>(); | 304 | frob<|>(); |
245 | } | 305 | } |
246 | ", | 306 | " |
307 | ), | ||
308 | @r#"[ | ||
309 | CompletionItem { | ||
310 | label: "frobnicate", | ||
311 | source_range: [35; 39), | ||
312 | delete: [35; 39), | ||
313 | insert: "frobnicate", | ||
314 | kind: Function, | ||
315 | detail: "fn frobnicate()", | ||
316 | }, | ||
317 | CompletionItem { | ||
318 | label: "main", | ||
319 | source_range: [35; 39), | ||
320 | delete: [35; 39), | ||
321 | insert: "main", | ||
322 | kind: Function, | ||
323 | detail: "fn main()", | ||
324 | }, | ||
325 | ]"# | ||
326 | ); | ||
327 | assert_debug_snapshot_matches!( | ||
328 | do_reference_completion( | ||
329 | " | ||
330 | //- /lib.rs | ||
331 | struct Foo {} | ||
332 | impl Foo { fn new() -> Foo {} } | ||
333 | fn main() { | ||
334 | Foo::ne<|>(); | ||
335 | } | ||
336 | " | ||
337 | ), | ||
338 | @r#"[ | ||
339 | CompletionItem { | ||
340 | label: "new", | ||
341 | source_range: [67; 69), | ||
342 | delete: [67; 69), | ||
343 | insert: "new", | ||
344 | kind: Function, | ||
345 | detail: "fn new() -> Foo", | ||
346 | }, | ||
347 | ]"# | ||
247 | ); | 348 | ); |
248 | check_reference_completion( | ||
249 | "dont_render_function_parens_if_already_call_assoc_fn", | ||
250 | " | ||
251 | //- /lib.rs | ||
252 | struct Foo {} | ||
253 | impl Foo { fn new() -> Foo {} } | ||
254 | fn main() { | ||
255 | Foo::ne<|>(); | ||
256 | } | ||
257 | ", | ||
258 | ) | ||
259 | } | 349 | } |
260 | |||
261 | } | 350 | } |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap deleted file mode 100644 index e9b717a45..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.119822026Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "quux", | ||
10 | source_range: [83; 83), | ||
11 | delete: [83; 83), | ||
12 | insert: "quux()$0", | ||
13 | kind: Function, | ||
14 | detail: "fn quux()", | ||
15 | }, | ||
16 | CompletionItem { | ||
17 | label: "x", | ||
18 | source_range: [83; 83), | ||
19 | delete: [83; 83), | ||
20 | insert: "x", | ||
21 | kind: Binding, | ||
22 | }, | ||
23 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap deleted file mode 100644 index f94477b43..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-07-23T16:11:48.828805910Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "a", | ||
10 | source_range: [214; 214), | ||
11 | delete: [214; 214), | ||
12 | insert: "a", | ||
13 | kind: Binding, | ||
14 | }, | ||
15 | CompletionItem { | ||
16 | label: "b", | ||
17 | source_range: [214; 214), | ||
18 | delete: [214; 214), | ||
19 | insert: "b", | ||
20 | kind: Binding, | ||
21 | detail: "i32", | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | label: "quux", | ||
25 | source_range: [214; 214), | ||
26 | delete: [214; 214), | ||
27 | insert: "quux()$0", | ||
28 | kind: Function, | ||
29 | detail: "fn quux()", | ||
30 | }, | ||
31 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap deleted file mode 100644 index 590e2a820..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-07-23T16:11:48.828811567Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "quux", | ||
10 | source_range: [79; 79), | ||
11 | delete: [79; 79), | ||
12 | insert: "quux($0)", | ||
13 | kind: Function, | ||
14 | detail: "fn quux(x: i32)", | ||
15 | }, | ||
16 | CompletionItem { | ||
17 | label: "x", | ||
18 | source_range: [79; 79), | ||
19 | delete: [79; 79), | ||
20 | insert: "x", | ||
21 | kind: Binding, | ||
22 | detail: "i32", | ||
23 | }, | ||
24 | CompletionItem { | ||
25 | label: "y", | ||
26 | source_range: [79; 79), | ||
27 | delete: [79; 79), | ||
28 | insert: "y", | ||
29 | kind: Binding, | ||
30 | detail: "i32", | ||
31 | }, | ||
32 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap deleted file mode 100644 index b339c6c5f..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.139262926Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "Option", | ||
10 | source_range: [18; 18), | ||
11 | delete: [18; 18), | ||
12 | insert: "Option", | ||
13 | kind: Struct, | ||
14 | }, | ||
15 | CompletionItem { | ||
16 | label: "foo", | ||
17 | source_range: [18; 18), | ||
18 | delete: [18; 18), | ||
19 | insert: "foo()$0", | ||
20 | kind: Function, | ||
21 | detail: "fn foo()", | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | label: "std", | ||
25 | source_range: [18; 18), | ||
26 | delete: [18; 18), | ||
27 | insert: "std", | ||
28 | kind: Module, | ||
29 | }, | ||
30 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap deleted file mode 100644 index 46bea2ccd..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.158296242Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "frobnicate", | ||
10 | source_range: [35; 39), | ||
11 | delete: [35; 39), | ||
12 | insert: "frobnicate", | ||
13 | kind: Function, | ||
14 | detail: "fn frobnicate()", | ||
15 | }, | ||
16 | CompletionItem { | ||
17 | label: "main", | ||
18 | source_range: [35; 39), | ||
19 | delete: [35; 39), | ||
20 | insert: "main", | ||
21 | kind: Function, | ||
22 | detail: "fn main()", | ||
23 | }, | ||
24 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap deleted file mode 100644 index b09a6745e..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:44:10.920136527Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "new", | ||
10 | source_range: [67; 69), | ||
11 | delete: [67; 69), | ||
12 | insert: "new", | ||
13 | kind: Function, | ||
14 | detail: "fn new() -> Foo", | ||
15 | }, | ||
16 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap deleted file mode 100644 index 84ccc8160..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.154795561Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "foo", | ||
10 | source_range: [40; 41), | ||
11 | delete: [40; 41), | ||
12 | insert: "foo", | ||
13 | kind: Function, | ||
14 | detail: "pub fn foo()", | ||
15 | }, | ||
16 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap deleted file mode 100644 index 158a2e5b9..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-07-23T16:11:48.860949870Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "bar", | ||
10 | source_range: [126; 126), | ||
11 | delete: [126; 126), | ||
12 | insert: "bar", | ||
13 | kind: Binding, | ||
14 | detail: "i32", | ||
15 | }, | ||
16 | CompletionItem { | ||
17 | label: "foo", | ||
18 | source_range: [126; 126), | ||
19 | delete: [126; 126), | ||
20 | insert: "foo()$0", | ||
21 | kind: Function, | ||
22 | detail: "fn foo()", | ||
23 | }, | ||
24 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap deleted file mode 100644 index b9449a76c..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.123197049Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "other_crate", | ||
10 | source_range: [4; 4), | ||
11 | delete: [4; 4), | ||
12 | insert: "other_crate", | ||
13 | kind: Module, | ||
14 | }, | ||
15 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap deleted file mode 100644 index eb1a4151a..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.123825399Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "T", | ||
10 | source_range: [44; 44), | ||
11 | delete: [44; 44), | ||
12 | insert: "T", | ||
13 | kind: TypeParam, | ||
14 | }, | ||
15 | CompletionItem { | ||
16 | label: "quux", | ||
17 | source_range: [44; 44), | ||
18 | delete: [44; 44), | ||
19 | insert: "quux()$0", | ||
20 | kind: Function, | ||
21 | detail: "fn quux<T>()", | ||
22 | }, | ||
23 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap deleted file mode 100644 index 52f08267f..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.130778739Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "T", | ||
10 | source_range: [46; 46), | ||
11 | delete: [46; 46), | ||
12 | insert: "T", | ||
13 | kind: TypeParam, | ||
14 | }, | ||
15 | CompletionItem { | ||
16 | label: "X", | ||
17 | source_range: [46; 46), | ||
18 | delete: [46; 46), | ||
19 | insert: "X", | ||
20 | kind: Struct, | ||
21 | }, | ||
22 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap deleted file mode 100644 index c795b9aae..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.156115632Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "main", | ||
10 | source_range: [53; 56), | ||
11 | delete: [53; 56), | ||
12 | insert: "main()$0", | ||
13 | kind: Function, | ||
14 | detail: "fn main()", | ||
15 | }, | ||
16 | CompletionItem { | ||
17 | label: "no_args", | ||
18 | source_range: [53; 56), | ||
19 | delete: [53; 56), | ||
20 | insert: "no_args()$0", | ||
21 | kind: Function, | ||
22 | detail: "fn no_args()", | ||
23 | }, | ||
24 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap deleted file mode 100644 index b49a838e0..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:44:10.916806744Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "main", | ||
10 | source_range: [72; 77), | ||
11 | delete: [72; 77), | ||
12 | insert: "main()$0", | ||
13 | kind: Function, | ||
14 | detail: "fn main()", | ||
15 | }, | ||
16 | CompletionItem { | ||
17 | label: "with_args", | ||
18 | source_range: [72; 77), | ||
19 | delete: [72; 77), | ||
20 | insert: "with_args($0)", | ||
21 | kind: Function, | ||
22 | detail: "fn with_args(x: i32, y: String)", | ||
23 | }, | ||
24 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap deleted file mode 100644 index b62cb7aa1..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:44:40.543731193Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "foo", | ||
10 | source_range: [139; 140), | ||
11 | delete: [139; 140), | ||
12 | insert: "foo()$0", | ||
13 | kind: Method, | ||
14 | detail: "fn foo(&self)", | ||
15 | }, | ||
16 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap deleted file mode 100644 index cee4898c3..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.133106898Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "Baz", | ||
10 | source_range: [89; 89), | ||
11 | delete: [89; 89), | ||
12 | insert: "Baz", | ||
13 | kind: Enum, | ||
14 | }, | ||
15 | CompletionItem { | ||
16 | label: "Foo", | ||
17 | source_range: [89; 89), | ||
18 | delete: [89; 89), | ||
19 | insert: "Foo", | ||
20 | kind: Struct, | ||
21 | }, | ||
22 | CompletionItem { | ||
23 | label: "quux", | ||
24 | source_range: [89; 89), | ||
25 | delete: [89; 89), | ||
26 | insert: "quux()$0", | ||
27 | kind: Function, | ||
28 | detail: "fn quux()", | ||
29 | }, | ||
30 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap deleted file mode 100644 index ce18e5bb7..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.134417551Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "Bar", | ||
10 | source_range: [101; 101), | ||
11 | delete: [101; 101), | ||
12 | insert: "Bar", | ||
13 | kind: Struct, | ||
14 | }, | ||
15 | CompletionItem { | ||
16 | label: "quux", | ||
17 | source_range: [101; 101), | ||
18 | delete: [101; 101), | ||
19 | insert: "quux()$0", | ||
20 | kind: Function, | ||
21 | detail: "fn quux()", | ||
22 | }, | ||
23 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap deleted file mode 100644 index 16dd18431..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.140648630Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "Foo", | ||
10 | source_range: [47; 47), | ||
11 | delete: [47; 47), | ||
12 | insert: "Foo", | ||
13 | kind: Struct, | ||
14 | }, | ||
15 | CompletionItem { | ||
16 | label: "x", | ||
17 | source_range: [47; 47), | ||
18 | delete: [47; 47), | ||
19 | insert: "x()$0", | ||
20 | kind: Function, | ||
21 | detail: "fn x()", | ||
22 | }, | ||
23 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap deleted file mode 100644 index b7bcbe864..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-07-23T16:11:48.859812318Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "Self", | ||
10 | source_range: [25; 25), | ||
11 | delete: [25; 25), | ||
12 | insert: "Self", | ||
13 | kind: TypeParam, | ||
14 | }, | ||
15 | CompletionItem { | ||
16 | label: "self", | ||
17 | source_range: [25; 25), | ||
18 | delete: [25; 25), | ||
19 | insert: "self", | ||
20 | kind: Binding, | ||
21 | detail: "&{unknown}", | ||
22 | }, | ||
23 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path.snap deleted file mode 100644 index cb3278edf..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path.snap +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | Created: 2019-01-23T05:19:36.475253+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path2.snap deleted file mode 100644 index 62c8e3de9..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path2.snap +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | Created: 2019-01-23T05:19:36.476869+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap deleted file mode 100644 index 6f41bf76f..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.141901047Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "pd", | ||
10 | source_range: [17; 17), | ||
11 | delete: [17; 17), | ||
12 | insert: "eprintln!(\"$0 = {:?}\", $0);", | ||
13 | kind: Snippet, | ||
14 | }, | ||
15 | CompletionItem { | ||
16 | label: "ppd", | ||
17 | source_range: [17; 17), | ||
18 | delete: [17; 17), | ||
19 | insert: "eprintln!(\"$0 = {:#?}\", $0);", | ||
20 | kind: Snippet, | ||
21 | }, | ||
22 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap deleted file mode 100644 index 1eb0adebe..000000000 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.149234118Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | label: "Test function", | ||
10 | source_range: [66; 66), | ||
11 | delete: [66; 66), | ||
12 | insert: "#[test]\nfn ${1:feature}() {\n $0\n}", | ||
13 | kind: Snippet, | ||
14 | lookup: "tfn", | ||
15 | }, | ||
16 | CompletionItem { | ||
17 | label: "pub(crate)", | ||
18 | source_range: [66; 66), | ||
19 | delete: [66; 66), | ||
20 | insert: "pub(crate) $0", | ||
21 | kind: Snippet, | ||
22 | }, | ||
23 | ] | ||
diff --git a/crates/ra_ide_api/src/display/snapshots/tests__file_structure.snap b/crates/ra_ide_api/src/display/snapshots/tests__file_structure.snap deleted file mode 100644 index 102efc026..000000000 --- a/crates/ra_ide_api/src/display/snapshots/tests__file_structure.snap +++ /dev/null | |||
@@ -1,191 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-06-28T20:46:18.274464142Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/display/structure.rs | ||
5 | expression: structure | ||
6 | --- | ||
7 | [ | ||
8 | StructureNode { | ||
9 | parent: None, | ||
10 | label: "Foo", | ||
11 | navigation_range: [8; 11), | ||
12 | node_range: [1; 26), | ||
13 | kind: STRUCT_DEF, | ||
14 | detail: None, | ||
15 | deprecated: false, | ||
16 | }, | ||
17 | StructureNode { | ||
18 | parent: Some( | ||
19 | 0, | ||
20 | ), | ||
21 | label: "x", | ||
22 | navigation_range: [18; 19), | ||
23 | node_range: [18; 24), | ||
24 | kind: NAMED_FIELD_DEF, | ||
25 | detail: Some( | ||
26 | "i32", | ||
27 | ), | ||
28 | deprecated: false, | ||
29 | }, | ||
30 | StructureNode { | ||
31 | parent: None, | ||
32 | label: "m", | ||
33 | navigation_range: [32; 33), | ||
34 | node_range: [28; 158), | ||
35 | kind: MODULE, | ||
36 | detail: None, | ||
37 | deprecated: false, | ||
38 | }, | ||
39 | StructureNode { | ||
40 | parent: Some( | ||
41 | 2, | ||
42 | ), | ||
43 | label: "bar1", | ||
44 | navigation_range: [43; 47), | ||
45 | node_range: [40; 52), | ||
46 | kind: FN_DEF, | ||
47 | detail: Some( | ||
48 | "fn()", | ||
49 | ), | ||
50 | deprecated: false, | ||
51 | }, | ||
52 | StructureNode { | ||
53 | parent: Some( | ||
54 | 2, | ||
55 | ), | ||
56 | label: "bar2", | ||
57 | navigation_range: [60; 64), | ||
58 | node_range: [57; 81), | ||
59 | kind: FN_DEF, | ||
60 | detail: Some( | ||
61 | "fn<T>(t: T) -> T", | ||
62 | ), | ||
63 | deprecated: false, | ||
64 | }, | ||
65 | StructureNode { | ||
66 | parent: Some( | ||
67 | 2, | ||
68 | ), | ||
69 | label: "bar3", | ||
70 | navigation_range: [89; 93), | ||
71 | node_range: [86; 156), | ||
72 | kind: FN_DEF, | ||
73 | detail: Some( | ||
74 | "fn<A, B>(a: A, b: B) -> Vec< u32 >", | ||
75 | ), | ||
76 | deprecated: false, | ||
77 | }, | ||
78 | StructureNode { | ||
79 | parent: None, | ||
80 | label: "E", | ||
81 | navigation_range: [165; 166), | ||
82 | node_range: [160; 180), | ||
83 | kind: ENUM_DEF, | ||
84 | detail: None, | ||
85 | deprecated: false, | ||
86 | }, | ||
87 | StructureNode { | ||
88 | parent: Some( | ||
89 | 6, | ||
90 | ), | ||
91 | label: "X", | ||
92 | navigation_range: [169; 170), | ||
93 | node_range: [169; 170), | ||
94 | kind: ENUM_VARIANT, | ||
95 | detail: None, | ||
96 | deprecated: false, | ||
97 | }, | ||
98 | StructureNode { | ||
99 | parent: Some( | ||
100 | 6, | ||
101 | ), | ||
102 | label: "Y", | ||
103 | navigation_range: [172; 173), | ||
104 | node_range: [172; 178), | ||
105 | kind: ENUM_VARIANT, | ||
106 | detail: None, | ||
107 | deprecated: false, | ||
108 | }, | ||
109 | StructureNode { | ||
110 | parent: None, | ||
111 | label: "T", | ||
112 | navigation_range: [186; 187), | ||
113 | node_range: [181; 193), | ||
114 | kind: TYPE_ALIAS_DEF, | ||
115 | detail: Some( | ||
116 | "()", | ||
117 | ), | ||
118 | deprecated: false, | ||
119 | }, | ||
120 | StructureNode { | ||
121 | parent: None, | ||
122 | label: "S", | ||
123 | navigation_range: [201; 202), | ||
124 | node_range: [194; 213), | ||
125 | kind: STATIC_DEF, | ||
126 | detail: Some( | ||
127 | "i32", | ||
128 | ), | ||
129 | deprecated: false, | ||
130 | }, | ||
131 | StructureNode { | ||
132 | parent: None, | ||
133 | label: "C", | ||
134 | navigation_range: [220; 221), | ||
135 | node_range: [214; 232), | ||
136 | kind: CONST_DEF, | ||
137 | detail: Some( | ||
138 | "i32", | ||
139 | ), | ||
140 | deprecated: false, | ||
141 | }, | ||
142 | StructureNode { | ||
143 | parent: None, | ||
144 | label: "impl E", | ||
145 | navigation_range: [239; 240), | ||
146 | node_range: [234; 243), | ||
147 | kind: IMPL_BLOCK, | ||
148 | detail: None, | ||
149 | deprecated: false, | ||
150 | }, | ||
151 | StructureNode { | ||
152 | parent: None, | ||
153 | label: "impl fmt::Debug for E", | ||
154 | navigation_range: [265; 266), | ||
155 | node_range: [245; 269), | ||
156 | kind: IMPL_BLOCK, | ||
157 | detail: None, | ||
158 | deprecated: false, | ||
159 | }, | ||
160 | StructureNode { | ||
161 | parent: None, | ||
162 | label: "mc", | ||
163 | navigation_range: [284; 286), | ||
164 | node_range: [271; 303), | ||
165 | kind: MACRO_CALL, | ||
166 | detail: None, | ||
167 | deprecated: false, | ||
168 | }, | ||
169 | StructureNode { | ||
170 | parent: None, | ||
171 | label: "obsolete", | ||
172 | navigation_range: [322; 330), | ||
173 | node_range: [305; 335), | ||
174 | kind: FN_DEF, | ||
175 | detail: Some( | ||
176 | "fn()", | ||
177 | ), | ||
178 | deprecated: true, | ||
179 | }, | ||
180 | StructureNode { | ||
181 | parent: None, | ||
182 | label: "very_obsolete", | ||
183 | navigation_range: [375; 388), | ||
184 | node_range: [337; 393), | ||
185 | kind: FN_DEF, | ||
186 | detail: Some( | ||
187 | "fn()", | ||
188 | ), | ||
189 | deprecated: true, | ||
190 | }, | ||
191 | ] | ||
diff --git a/crates/ra_ide_api/src/display/structure.rs b/crates/ra_ide_api/src/display/structure.rs index 2ba10b2ef..b026dfa59 100644 --- a/crates/ra_ide_api/src/display/structure.rs +++ b/crates/ra_ide_api/src/display/structure.rs | |||
@@ -204,6 +204,192 @@ fn very_obsolete() {} | |||
204 | .ok() | 204 | .ok() |
205 | .unwrap(); | 205 | .unwrap(); |
206 | let structure = file_structure(&file); | 206 | let structure = file_structure(&file); |
207 | assert_debug_snapshot_matches!("file_structure", structure); | 207 | assert_debug_snapshot_matches!(structure, |
208 | @r#"[ | ||
209 | StructureNode { | ||
210 | parent: None, | ||
211 | label: "Foo", | ||
212 | navigation_range: [8; 11), | ||
213 | node_range: [1; 26), | ||
214 | kind: STRUCT_DEF, | ||
215 | detail: None, | ||
216 | deprecated: false, | ||
217 | }, | ||
218 | StructureNode { | ||
219 | parent: Some( | ||
220 | 0, | ||
221 | ), | ||
222 | label: "x", | ||
223 | navigation_range: [18; 19), | ||
224 | node_range: [18; 24), | ||
225 | kind: NAMED_FIELD_DEF, | ||
226 | detail: Some( | ||
227 | "i32", | ||
228 | ), | ||
229 | deprecated: false, | ||
230 | }, | ||
231 | StructureNode { | ||
232 | parent: None, | ||
233 | label: "m", | ||
234 | navigation_range: [32; 33), | ||
235 | node_range: [28; 158), | ||
236 | kind: MODULE, | ||
237 | detail: None, | ||
238 | deprecated: false, | ||
239 | }, | ||
240 | StructureNode { | ||
241 | parent: Some( | ||
242 | 2, | ||
243 | ), | ||
244 | label: "bar1", | ||
245 | navigation_range: [43; 47), | ||
246 | node_range: [40; 52), | ||
247 | kind: FN_DEF, | ||
248 | detail: Some( | ||
249 | "fn()", | ||
250 | ), | ||
251 | deprecated: false, | ||
252 | }, | ||
253 | StructureNode { | ||
254 | parent: Some( | ||
255 | 2, | ||
256 | ), | ||
257 | label: "bar2", | ||
258 | navigation_range: [60; 64), | ||
259 | node_range: [57; 81), | ||
260 | kind: FN_DEF, | ||
261 | detail: Some( | ||
262 | "fn<T>(t: T) -> T", | ||
263 | ), | ||
264 | deprecated: false, | ||
265 | }, | ||
266 | StructureNode { | ||
267 | parent: Some( | ||
268 | 2, | ||
269 | ), | ||
270 | label: "bar3", | ||
271 | navigation_range: [89; 93), | ||
272 | node_range: [86; 156), | ||
273 | kind: FN_DEF, | ||
274 | detail: Some( | ||
275 | "fn<A, B>(a: A, b: B) -> Vec< u32 >", | ||
276 | ), | ||
277 | deprecated: false, | ||
278 | }, | ||
279 | StructureNode { | ||
280 | parent: None, | ||
281 | label: "E", | ||
282 | navigation_range: [165; 166), | ||
283 | node_range: [160; 180), | ||
284 | kind: ENUM_DEF, | ||
285 | detail: None, | ||
286 | deprecated: false, | ||
287 | }, | ||
288 | StructureNode { | ||
289 | parent: Some( | ||
290 | 6, | ||
291 | ), | ||
292 | label: "X", | ||
293 | navigation_range: [169; 170), | ||
294 | node_range: [169; 170), | ||
295 | kind: ENUM_VARIANT, | ||
296 | detail: None, | ||
297 | deprecated: false, | ||
298 | }, | ||
299 | StructureNode { | ||
300 | parent: Some( | ||
301 | 6, | ||
302 | ), | ||
303 | label: "Y", | ||
304 | navigation_range: [172; 173), | ||
305 | node_range: [172; 178), | ||
306 | kind: ENUM_VARIANT, | ||
307 | detail: None, | ||
308 | deprecated: false, | ||
309 | }, | ||
310 | StructureNode { | ||
311 | parent: None, | ||
312 | label: "T", | ||
313 | navigation_range: [186; 187), | ||
314 | node_range: [181; 193), | ||
315 | kind: TYPE_ALIAS_DEF, | ||
316 | detail: Some( | ||
317 | "()", | ||
318 | ), | ||
319 | deprecated: false, | ||
320 | }, | ||
321 | StructureNode { | ||
322 | parent: None, | ||
323 | label: "S", | ||
324 | navigation_range: [201; 202), | ||
325 | node_range: [194; 213), | ||
326 | kind: STATIC_DEF, | ||
327 | detail: Some( | ||
328 | "i32", | ||
329 | ), | ||
330 | deprecated: false, | ||
331 | }, | ||
332 | StructureNode { | ||
333 | parent: None, | ||
334 | label: "C", | ||
335 | navigation_range: [220; 221), | ||
336 | node_range: [214; 232), | ||
337 | kind: CONST_DEF, | ||
338 | detail: Some( | ||
339 | "i32", | ||
340 | ), | ||
341 | deprecated: false, | ||
342 | }, | ||
343 | StructureNode { | ||
344 | parent: None, | ||
345 | label: "impl E", | ||
346 | navigation_range: [239; 240), | ||
347 | node_range: [234; 243), | ||
348 | kind: IMPL_BLOCK, | ||
349 | detail: None, | ||
350 | deprecated: false, | ||
351 | }, | ||
352 | StructureNode { | ||
353 | parent: None, | ||
354 | label: "impl fmt::Debug for E", | ||
355 | navigation_range: [265; 266), | ||
356 | node_range: [245; 269), | ||
357 | kind: IMPL_BLOCK, | ||
358 | detail: None, | ||
359 | deprecated: false, | ||
360 | }, | ||
361 | StructureNode { | ||
362 | parent: None, | ||
363 | label: "mc", | ||
364 | navigation_range: [284; 286), | ||
365 | node_range: [271; 303), | ||
366 | kind: MACRO_CALL, | ||
367 | detail: None, | ||
368 | deprecated: false, | ||
369 | }, | ||
370 | StructureNode { | ||
371 | parent: None, | ||
372 | label: "obsolete", | ||
373 | navigation_range: [322; 330), | ||
374 | node_range: [305; 335), | ||
375 | kind: FN_DEF, | ||
376 | detail: Some( | ||
377 | "fn()", | ||
378 | ), | ||
379 | deprecated: true, | ||
380 | }, | ||
381 | StructureNode { | ||
382 | parent: None, | ||
383 | label: "very_obsolete", | ||
384 | navigation_range: [375; 388), | ||
385 | node_range: [337; 393), | ||
386 | kind: FN_DEF, | ||
387 | detail: Some( | ||
388 | "fn()", | ||
389 | ), | ||
390 | deprecated: true, | ||
391 | }, | ||
392 | ]"# | ||
393 | ); | ||
208 | } | 394 | } |
209 | } | 395 | } |
diff --git a/crates/ra_ide_api/src/inlay_hints.rs b/crates/ra_ide_api/src/inlay_hints.rs index 174662beb..a524e014f 100644 --- a/crates/ra_ide_api/src/inlay_hints.rs +++ b/crates/ra_ide_api/src/inlay_hints.rs | |||
@@ -1,16 +1,22 @@ | |||
1 | use crate::{db::RootDatabase, FileId}; | 1 | use crate::{db::RootDatabase, FileId}; |
2 | use hir::{HirDisplay, Ty}; | 2 | use hir::{HirDisplay, SourceAnalyzer, Ty}; |
3 | use ra_syntax::ast::Pat; | ||
4 | use ra_syntax::{ | 3 | use ra_syntax::{ |
5 | algo::visit::{visitor, Visitor}, | 4 | algo::visit::{visitor, Visitor}, |
6 | ast::{self, PatKind, TypeAscriptionOwner}, | 5 | ast::{ |
7 | AstNode, SmolStr, SourceFile, SyntaxNode, TextRange, | 6 | AstNode, ForExpr, IfExpr, LambdaExpr, LetStmt, MatchArmList, Pat, PatKind, SourceFile, |
7 | TypeAscriptionOwner, WhileExpr, | ||
8 | }, | ||
9 | SmolStr, SyntaxKind, SyntaxNode, TextRange, | ||
8 | }; | 10 | }; |
9 | 11 | ||
10 | #[derive(Debug, PartialEq, Eq)] | 12 | #[derive(Debug, PartialEq, Eq, Clone)] |
11 | pub enum InlayKind { | 13 | pub enum InlayKind { |
12 | LetBindingType, | 14 | LetBindingType, |
13 | ClosureParameterType, | 15 | ClosureParameterType, |
16 | ForExpressionBindingType, | ||
17 | IfExpressionType, | ||
18 | WhileLetExpressionType, | ||
19 | MatchArmType, | ||
14 | } | 20 | } |
15 | 21 | ||
16 | #[derive(Debug)] | 22 | #[derive(Debug)] |
@@ -34,68 +40,142 @@ fn get_inlay_hints( | |||
34 | node: &SyntaxNode, | 40 | node: &SyntaxNode, |
35 | ) -> Option<Vec<InlayHint>> { | 41 | ) -> Option<Vec<InlayHint>> { |
36 | visitor() | 42 | visitor() |
37 | .visit(|let_statement: ast::LetStmt| { | 43 | .visit(|let_statement: LetStmt| { |
38 | let let_syntax = let_statement.syntax(); | ||
39 | |||
40 | if let_statement.ascribed_type().is_some() { | 44 | if let_statement.ascribed_type().is_some() { |
41 | return None; | 45 | return None; |
42 | } | 46 | } |
43 | 47 | let pat = let_statement.pat()?; | |
44 | let let_pat = let_statement.pat()?; | 48 | let analyzer = SourceAnalyzer::new(db, file_id, let_statement.syntax(), None); |
45 | let inlay_type_string = get_node_displayable_type(db, file_id, let_syntax, &let_pat)? | 49 | Some(get_pat_hints(db, &analyzer, pat, InlayKind::LetBindingType, false)) |
46 | .display(db) | ||
47 | .to_string() | ||
48 | .into(); | ||
49 | |||
50 | let pat_range = match let_pat.kind() { | ||
51 | PatKind::BindPat(bind_pat) => bind_pat.syntax().text_range(), | ||
52 | PatKind::TuplePat(tuple_pat) => tuple_pat.syntax().text_range(), | ||
53 | _ => return None, | ||
54 | }; | ||
55 | |||
56 | Some(vec![InlayHint { | ||
57 | range: pat_range, | ||
58 | kind: InlayKind::LetBindingType, | ||
59 | label: inlay_type_string, | ||
60 | }]) | ||
61 | }) | 50 | }) |
62 | .visit(|closure_parameter: ast::LambdaExpr| match closure_parameter.param_list() { | 51 | .visit(|closure_parameter: LambdaExpr| { |
63 | Some(param_list) => Some( | 52 | let analyzer = SourceAnalyzer::new(db, file_id, closure_parameter.syntax(), None); |
53 | closure_parameter.param_list().map(|param_list| { | ||
64 | param_list | 54 | param_list |
65 | .params() | 55 | .params() |
66 | .filter(|closure_param| closure_param.ascribed_type().is_none()) | 56 | .filter(|closure_param| closure_param.ascribed_type().is_none()) |
67 | .filter_map(|closure_param| { | 57 | .filter_map(|closure_param| closure_param.pat()) |
68 | let closure_param_syntax = closure_param.syntax(); | 58 | .map(|root_pat| { |
69 | let inlay_type_string = get_node_displayable_type( | 59 | get_pat_hints( |
70 | db, | 60 | db, |
71 | file_id, | 61 | &analyzer, |
72 | closure_param_syntax, | 62 | root_pat, |
73 | &closure_param.pat()?, | 63 | InlayKind::ClosureParameterType, |
74 | )? | 64 | false, |
75 | .display(db) | 65 | ) |
76 | .to_string() | ||
77 | .into(); | ||
78 | |||
79 | Some(InlayHint { | ||
80 | range: closure_param_syntax.text_range(), | ||
81 | kind: InlayKind::ClosureParameterType, | ||
82 | label: inlay_type_string, | ||
83 | }) | ||
84 | }) | 66 | }) |
67 | .flatten() | ||
68 | .collect() | ||
69 | }) | ||
70 | }) | ||
71 | .visit(|for_expression: ForExpr| { | ||
72 | let pat = for_expression.pat()?; | ||
73 | let analyzer = SourceAnalyzer::new(db, file_id, for_expression.syntax(), None); | ||
74 | Some(get_pat_hints(db, &analyzer, pat, InlayKind::ForExpressionBindingType, false)) | ||
75 | }) | ||
76 | .visit(|if_expr: IfExpr| { | ||
77 | let pat = if_expr.condition()?.pat()?; | ||
78 | let analyzer = SourceAnalyzer::new(db, file_id, if_expr.syntax(), None); | ||
79 | Some(get_pat_hints(db, &analyzer, pat, InlayKind::IfExpressionType, true)) | ||
80 | }) | ||
81 | .visit(|while_expr: WhileExpr| { | ||
82 | let pat = while_expr.condition()?.pat()?; | ||
83 | let analyzer = SourceAnalyzer::new(db, file_id, while_expr.syntax(), None); | ||
84 | Some(get_pat_hints(db, &analyzer, pat, InlayKind::WhileLetExpressionType, true)) | ||
85 | }) | ||
86 | .visit(|match_arm_list: MatchArmList| { | ||
87 | let analyzer = SourceAnalyzer::new(db, file_id, match_arm_list.syntax(), None); | ||
88 | Some( | ||
89 | match_arm_list | ||
90 | .arms() | ||
91 | .map(|match_arm| match_arm.pats()) | ||
92 | .flatten() | ||
93 | .map(|root_pat| { | ||
94 | get_pat_hints(db, &analyzer, root_pat, InlayKind::MatchArmType, true) | ||
95 | }) | ||
96 | .flatten() | ||
85 | .collect(), | 97 | .collect(), |
86 | ), | 98 | ) |
87 | None => None, | ||
88 | }) | 99 | }) |
89 | .accept(&node)? | 100 | .accept(&node)? |
90 | } | 101 | } |
91 | 102 | ||
103 | fn get_pat_hints( | ||
104 | db: &RootDatabase, | ||
105 | analyzer: &SourceAnalyzer, | ||
106 | root_pat: Pat, | ||
107 | kind: InlayKind, | ||
108 | skip_root_pat_hint: bool, | ||
109 | ) -> Vec<InlayHint> { | ||
110 | let original_pat = &root_pat.clone(); | ||
111 | |||
112 | get_leaf_pats(root_pat) | ||
113 | .into_iter() | ||
114 | .filter(|pat| !skip_root_pat_hint || pat != original_pat) | ||
115 | .filter_map(|pat| { | ||
116 | get_node_displayable_type(db, &analyzer, &pat) | ||
117 | .map(|pat_type| (pat.syntax().text_range(), pat_type)) | ||
118 | }) | ||
119 | .map(|(range, pat_type)| InlayHint { | ||
120 | range, | ||
121 | kind: kind.clone(), | ||
122 | label: pat_type.display(db).to_string().into(), | ||
123 | }) | ||
124 | .collect() | ||
125 | } | ||
126 | |||
127 | fn get_leaf_pats(root_pat: Pat) -> Vec<Pat> { | ||
128 | let mut pats_to_process = std::collections::VecDeque::<Pat>::new(); | ||
129 | pats_to_process.push_back(root_pat); | ||
130 | |||
131 | let mut leaf_pats = Vec::new(); | ||
132 | |||
133 | while let Some(maybe_leaf_pat) = pats_to_process.pop_front() { | ||
134 | match maybe_leaf_pat.kind() { | ||
135 | PatKind::BindPat(bind_pat) => { | ||
136 | if let Some(pat) = bind_pat.pat() { | ||
137 | pats_to_process.push_back(pat); | ||
138 | } else { | ||
139 | leaf_pats.push(maybe_leaf_pat); | ||
140 | } | ||
141 | } | ||
142 | PatKind::TuplePat(tuple_pat) => { | ||
143 | for arg_pat in tuple_pat.args() { | ||
144 | pats_to_process.push_back(arg_pat); | ||
145 | } | ||
146 | } | ||
147 | PatKind::StructPat(struct_pat) => { | ||
148 | if let Some(pat_list) = struct_pat.field_pat_list() { | ||
149 | pats_to_process.extend( | ||
150 | pat_list | ||
151 | .field_pats() | ||
152 | .filter_map(|field_pat| { | ||
153 | field_pat | ||
154 | .pat() | ||
155 | .filter(|pat| pat.syntax().kind() != SyntaxKind::BIND_PAT) | ||
156 | }) | ||
157 | .chain(pat_list.bind_pats().map(|bind_pat| { | ||
158 | bind_pat.pat().unwrap_or_else(|| Pat::from(bind_pat)) | ||
159 | })), | ||
160 | ); | ||
161 | } | ||
162 | } | ||
163 | PatKind::TupleStructPat(tuple_struct_pat) => { | ||
164 | for arg_pat in tuple_struct_pat.args() { | ||
165 | pats_to_process.push_back(arg_pat); | ||
166 | } | ||
167 | } | ||
168 | _ => (), | ||
169 | } | ||
170 | } | ||
171 | leaf_pats | ||
172 | } | ||
173 | |||
92 | fn get_node_displayable_type( | 174 | fn get_node_displayable_type( |
93 | db: &RootDatabase, | 175 | db: &RootDatabase, |
94 | file_id: FileId, | 176 | analyzer: &SourceAnalyzer, |
95 | node_syntax: &SyntaxNode, | ||
96 | node_pat: &Pat, | 177 | node_pat: &Pat, |
97 | ) -> Option<Ty> { | 178 | ) -> Option<Ty> { |
98 | let analyzer = hir::SourceAnalyzer::new(db, file_id, node_syntax, None); | ||
99 | analyzer.type_of_pat(db, node_pat).and_then(|resolved_type| { | 179 | analyzer.type_of_pat(db, node_pat).and_then(|resolved_type| { |
100 | if let Ty::Apply(_) = resolved_type { | 180 | if let Ty::Apply(_) = resolved_type { |
101 | Some(resolved_type) | 181 | Some(resolved_type) |
@@ -111,68 +191,306 @@ mod tests { | |||
111 | use insta::assert_debug_snapshot_matches; | 191 | use insta::assert_debug_snapshot_matches; |
112 | 192 | ||
113 | #[test] | 193 | #[test] |
114 | fn test_inlay_hints() { | 194 | fn let_statement() { |
115 | let (analysis, file_id) = single_file( | 195 | let (analysis, file_id) = single_file( |
116 | r#" | 196 | r#" |
117 | struct OuterStruct {} | 197 | #[derive(PartialEq)] |
198 | enum CustomOption<T> { | ||
199 | None, | ||
200 | Some(T), | ||
201 | } | ||
202 | |||
203 | #[derive(PartialEq)] | ||
204 | struct Test { | ||
205 | a: CustomOption<u32>, | ||
206 | b: u8, | ||
207 | } | ||
118 | 208 | ||
119 | fn main() { | 209 | fn main() { |
120 | struct InnerStruct {} | 210 | struct InnerStruct {} |
121 | 211 | ||
122 | let test = 54; | 212 | let test = 54; |
123 | let test = InnerStruct {}; | 213 | let test: i32 = 33; |
124 | let test = OuterStruct {}; | ||
125 | let test = vec![222]; | ||
126 | let mut test = Vec::new(); | ||
127 | test.push(333); | ||
128 | let test = test.into_iter().map(|i| i * i).collect::<Vec<_>>(); | ||
129 | let mut test = 33; | 214 | let mut test = 33; |
130 | let _ = 22; | 215 | let _ = 22; |
131 | let test: Vec<_> = (0..3).collect(); | 216 | let test = "test"; |
217 | let test = InnerStruct {}; | ||
132 | 218 | ||
133 | let _ = (0..23).map(|i: u32| { | 219 | let test = vec![222]; |
134 | let i_squared = i * i; | 220 | let test: Vec<_> = (0..3).collect(); |
135 | i_squared | 221 | let test = (0..3).collect::<Vec<i128>>(); |
136 | }); | 222 | let test = (0..3).collect::<Vec<_>>(); |
137 | 223 | ||
138 | let test: i32 = 33; | 224 | let mut test = Vec::new(); |
225 | test.push(333); | ||
139 | 226 | ||
140 | let (x, c) = (42, 'a'); | ||
141 | let test = (42, 'a'); | 227 | let test = (42, 'a'); |
142 | } | 228 | let (a, (b, c, (d, e), f)) = (2, (3, 4, (6.6, 7.7), 5)); |
143 | "#, | 229 | }"#, |
144 | ); | 230 | ); |
145 | 231 | ||
146 | assert_debug_snapshot_matches!(analysis.inlay_hints(file_id).unwrap(), @r#"[ | 232 | assert_debug_snapshot_matches!(analysis.inlay_hints(file_id).unwrap(), @r#"[ |
147 | InlayHint { | 233 | InlayHint { |
148 | range: [71; 75), | 234 | range: [193; 197), |
149 | kind: LetBindingType, | 235 | kind: LetBindingType, |
150 | label: "i32", | 236 | label: "i32", |
151 | }, | 237 | }, |
152 | InlayHint { | 238 | InlayHint { |
153 | range: [121; 125), | 239 | range: [236; 244), |
154 | kind: LetBindingType, | 240 | kind: LetBindingType, |
155 | label: "OuterStruct", | 241 | label: "i32", |
156 | }, | 242 | }, |
157 | InlayHint { | 243 | InlayHint { |
158 | range: [297; 305), | 244 | range: [275; 279), |
245 | kind: LetBindingType, | ||
246 | label: "&str", | ||
247 | }, | ||
248 | InlayHint { | ||
249 | range: [539; 543), | ||
250 | kind: LetBindingType, | ||
251 | label: "(i32, char)", | ||
252 | }, | ||
253 | InlayHint { | ||
254 | range: [566; 567), | ||
159 | kind: LetBindingType, | 255 | kind: LetBindingType, |
160 | label: "i32", | 256 | label: "i32", |
161 | }, | 257 | }, |
162 | InlayHint { | 258 | InlayHint { |
163 | range: [417; 426), | 259 | range: [570; 571), |
164 | kind: LetBindingType, | 260 | kind: LetBindingType, |
165 | label: "u32", | 261 | label: "i32", |
166 | }, | 262 | }, |
167 | InlayHint { | 263 | InlayHint { |
168 | range: [496; 502), | 264 | range: [573; 574), |
169 | kind: LetBindingType, | 265 | kind: LetBindingType, |
170 | label: "(i32, char)", | 266 | label: "i32", |
171 | }, | 267 | }, |
172 | InlayHint { | 268 | InlayHint { |
173 | range: [524; 528), | 269 | range: [584; 585), |
174 | kind: LetBindingType, | 270 | kind: LetBindingType, |
175 | label: "(i32, char)", | 271 | label: "i32", |
272 | }, | ||
273 | InlayHint { | ||
274 | range: [577; 578), | ||
275 | kind: LetBindingType, | ||
276 | label: "f64", | ||
277 | }, | ||
278 | InlayHint { | ||
279 | range: [580; 581), | ||
280 | kind: LetBindingType, | ||
281 | label: "f64", | ||
282 | }, | ||
283 | ]"# | ||
284 | ); | ||
285 | } | ||
286 | |||
287 | #[test] | ||
288 | fn closure_parameter() { | ||
289 | let (analysis, file_id) = single_file( | ||
290 | r#" | ||
291 | fn main() { | ||
292 | let mut start = 0; | ||
293 | (0..2).for_each(|increment| { | ||
294 | start += increment; | ||
295 | }) | ||
296 | }"#, | ||
297 | ); | ||
298 | |||
299 | assert_debug_snapshot_matches!(analysis.inlay_hints(file_id).unwrap(), @r#"[ | ||
300 | InlayHint { | ||
301 | range: [21; 30), | ||
302 | kind: LetBindingType, | ||
303 | label: "i32", | ||
304 | }, | ||
305 | InlayHint { | ||
306 | range: [57; 66), | ||
307 | kind: ClosureParameterType, | ||
308 | label: "i32", | ||
309 | }, | ||
310 | ]"# | ||
311 | ); | ||
312 | } | ||
313 | |||
314 | #[test] | ||
315 | fn for_expression() { | ||
316 | let (analysis, file_id) = single_file( | ||
317 | r#" | ||
318 | fn main() { | ||
319 | let mut start = 0; | ||
320 | for increment in 0..2 { | ||
321 | start += increment; | ||
322 | } | ||
323 | }"#, | ||
324 | ); | ||
325 | |||
326 | assert_debug_snapshot_matches!(analysis.inlay_hints(file_id).unwrap(), @r#"[ | ||
327 | InlayHint { | ||
328 | range: [21; 30), | ||
329 | kind: LetBindingType, | ||
330 | label: "i32", | ||
331 | }, | ||
332 | InlayHint { | ||
333 | range: [44; 53), | ||
334 | kind: ForExpressionBindingType, | ||
335 | label: "i32", | ||
336 | }, | ||
337 | ]"# | ||
338 | ); | ||
339 | } | ||
340 | |||
341 | #[test] | ||
342 | fn if_expr() { | ||
343 | let (analysis, file_id) = single_file( | ||
344 | r#" | ||
345 | #[derive(PartialEq)] | ||
346 | enum CustomOption<T> { | ||
347 | None, | ||
348 | Some(T), | ||
349 | } | ||
350 | |||
351 | #[derive(PartialEq)] | ||
352 | struct Test { | ||
353 | a: CustomOption<u32>, | ||
354 | b: u8, | ||
355 | } | ||
356 | |||
357 | fn main() { | ||
358 | let test = CustomOption::Some(Test { a: CustomOption::Some(3), b: 1 }); | ||
359 | if let CustomOption::None = &test {}; | ||
360 | if let test = &test {}; | ||
361 | if let CustomOption::Some(test) = &test {}; | ||
362 | if let CustomOption::Some(Test { a, b }) = &test {}; | ||
363 | if let CustomOption::Some(Test { a: x, b: y }) = &test {}; | ||
364 | if let CustomOption::Some(Test { a: CustomOption::Some(x), b: y }) = &test {}; | ||
365 | if let CustomOption::Some(Test { a: CustomOption::None, b: y }) = &test {}; | ||
366 | if let CustomOption::Some(Test { b: y, .. }) = &test {}; | ||
367 | |||
368 | if test == CustomOption::None {} | ||
369 | }"#, | ||
370 | ); | ||
371 | |||
372 | assert_debug_snapshot_matches!(analysis.inlay_hints(file_id).unwrap(), @r#"[ | ||
373 | InlayHint { | ||
374 | range: [166; 170), | ||
375 | kind: LetBindingType, | ||
376 | label: "CustomOption<Test>", | ||
377 | }, | ||
378 | InlayHint { | ||
379 | range: [334; 338), | ||
380 | kind: IfExpressionType, | ||
381 | label: "&Test", | ||
382 | }, | ||
383 | InlayHint { | ||
384 | range: [389; 390), | ||
385 | kind: IfExpressionType, | ||
386 | label: "&CustomOption<u32>", | ||
387 | }, | ||
388 | InlayHint { | ||
389 | range: [392; 393), | ||
390 | kind: IfExpressionType, | ||
391 | label: "&u8", | ||
392 | }, | ||
393 | InlayHint { | ||
394 | range: [531; 532), | ||
395 | kind: IfExpressionType, | ||
396 | label: "&u32", | ||
397 | }, | ||
398 | ]"# | ||
399 | ); | ||
400 | } | ||
401 | |||
402 | #[test] | ||
403 | fn while_expr() { | ||
404 | let (analysis, file_id) = single_file( | ||
405 | r#" | ||
406 | #[derive(PartialEq)] | ||
407 | enum CustomOption<T> { | ||
408 | None, | ||
409 | Some(T), | ||
410 | } | ||
411 | |||
412 | #[derive(PartialEq)] | ||
413 | struct Test { | ||
414 | a: CustomOption<u32>, | ||
415 | b: u8, | ||
416 | } | ||
417 | |||
418 | fn main() { | ||
419 | let test = CustomOption::Some(Test { a: CustomOption::Some(3), b: 1 }); | ||
420 | while let CustomOption::None = &test {}; | ||
421 | while let test = &test {}; | ||
422 | while let CustomOption::Some(test) = &test {}; | ||
423 | while let CustomOption::Some(Test { a, b }) = &test {}; | ||
424 | while let CustomOption::Some(Test { a: x, b: y }) = &test {}; | ||
425 | while let CustomOption::Some(Test { a: CustomOption::Some(x), b: y }) = &test {}; | ||
426 | while let CustomOption::Some(Test { a: CustomOption::None, b: y }) = &test {}; | ||
427 | while let CustomOption::Some(Test { b: y, .. }) = &test {}; | ||
428 | |||