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 | |||
429 | while test == CustomOption::None {} | ||
430 | }"#, | ||
431 | ); | ||
432 | |||
433 | assert_debug_snapshot_matches!(analysis.inlay_hints(file_id).unwrap(), @r#"[ | ||
434 | InlayHint { | ||
435 | range: [166; 170), | ||
436 | kind: LetBindingType, | ||
437 | label: "CustomOption<Test>", | ||
438 | }, | ||
439 | ]"# | ||
440 | ); | ||
441 | } | ||
442 | |||
443 | #[test] | ||
444 | fn match_arm_list() { | ||
445 | let (analysis, file_id) = single_file( | ||
446 | r#" | ||
447 | #[derive(PartialEq)] | ||
448 | enum CustomOption<T> { | ||
449 | None, | ||
450 | Some(T), | ||
451 | } | ||
452 | |||
453 | #[derive(PartialEq)] | ||
454 | struct Test { | ||
455 | a: CustomOption<u32>, | ||
456 | b: u8, | ||
457 | } | ||
458 | |||
459 | fn main() { | ||
460 | match CustomOption::Some(Test { a: CustomOption::Some(3), b: 1 }) { | ||
461 | CustomOption::None => (), | ||
462 | test => (), | ||
463 | CustomOption::Some(test) => (), | ||
464 | CustomOption::Some(Test { a, b }) => (), | ||
465 | CustomOption::Some(Test { a: x, b: y }) => (), | ||
466 | CustomOption::Some(Test { a: CustomOption::Some(x), b: y }) => (), | ||
467 | CustomOption::Some(Test { a: CustomOption::None, b: y }) => (), | ||
468 | CustomOption::Some(Test { b: y, .. }) => (), | ||
469 | _ => {} | ||
470 | } | ||
471 | }"#, | ||
472 | ); | ||
473 | |||
474 | assert_debug_snapshot_matches!(analysis.inlay_hints(file_id).unwrap(), @r#"[ | ||
475 | InlayHint { | ||
476 | range: [312; 316), | ||
477 | kind: MatchArmType, | ||
478 | label: "Test", | ||
479 | }, | ||
480 | InlayHint { | ||
481 | range: [359; 360), | ||
482 | kind: MatchArmType, | ||
483 | label: "CustomOption<u32>", | ||
484 | }, | ||
485 | InlayHint { | ||
486 | range: [362; 363), | ||
487 | kind: MatchArmType, | ||
488 | label: "u8", | ||
489 | }, | ||
490 | InlayHint { | ||
491 | range: [485; 486), | ||
492 | kind: MatchArmType, | ||
493 | label: "u32", | ||
176 | }, | 494 | }, |
177 | ]"# | 495 | ]"# |
178 | ); | 496 | ); |
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs index 16ffb03ce..edb646c11 100644 --- a/crates/ra_ide_api/src/lib.rs +++ b/crates/ra_ide_api/src/lib.rs | |||
@@ -317,24 +317,24 @@ impl Analysis { | |||
317 | } | 317 | } |
318 | 318 | ||
319 | /// Debug info about the current state of the analysis | 319 | /// Debug info about the current state of the analysis |
320 | pub fn status(&self) -> String { | 320 | pub fn status(&self) -> Cancelable<String> { |
321 | status::status(&*self.db) | 321 | self.with_db(|db| status::status(&*db)) |
322 | } | 322 | } |
323 | 323 | ||
324 | /// Gets the text of the source file. | 324 | /// Gets the text of the source file. |
325 | pub fn file_text(&self, file_id: FileId) -> Arc<String> { | 325 | pub fn file_text(&self, file_id: FileId) -> Cancelable<Arc<String>> { |
326 | self.db.file_text(file_id) | 326 | self.with_db(|db| db.file_text(file_id)) |
327 | } | 327 | } |
328 | 328 | ||
329 | /// Gets the syntax tree of the file. | 329 | /// Gets the syntax tree of the file. |
330 | pub fn parse(&self, file_id: FileId) -> SourceFile { | 330 | pub fn parse(&self, file_id: FileId) -> Cancelable<SourceFile> { |
331 | self.db.parse(file_id).tree() | 331 | self.with_db(|db| db.parse(file_id).tree()) |
332 | } | 332 | } |
333 | 333 | ||
334 | /// Gets the file's `LineIndex`: data structure to convert between absolute | 334 | /// Gets the file's `LineIndex`: data structure to convert between absolute |
335 | /// offsets and line/column representation. | 335 | /// offsets and line/column representation. |
336 | pub fn file_line_index(&self, file_id: FileId) -> Arc<LineIndex> { | 336 | pub fn file_line_index(&self, file_id: FileId) -> Cancelable<Arc<LineIndex>> { |
337 | self.db.line_index(file_id) | 337 | self.with_db(|db| db.line_index(file_id)) |
338 | } | 338 | } |
339 | 339 | ||
340 | /// Selects the next syntactic nodes encompassing the range. | 340 | /// Selects the next syntactic nodes encompassing the range. |
@@ -344,58 +344,67 @@ impl Analysis { | |||
344 | 344 | ||
345 | /// Returns position of the matching brace (all types of braces are | 345 | /// Returns position of the matching brace (all types of braces are |
346 | /// supported). | 346 | /// supported). |
347 | pub fn matching_brace(&self, position: FilePosition) -> Option<TextUnit> { | 347 | pub fn matching_brace(&self, position: FilePosition) -> Cancelable<Option<TextUnit>> { |
348 | let parse = self.db.parse(position.file_id); | 348 | self.with_db(|db| { |
349 | let file = parse.tree(); | 349 | let parse = db.parse(position.file_id); |
350 | matching_brace::matching_brace(&file, position.offset) | 350 | let file = parse.tree(); |
351 | matching_brace::matching_brace(&file, position.offset) | ||
352 | }) | ||
351 | } | 353 | } |
352 | 354 | ||
353 | /// Returns a syntax tree represented as `String`, for debug purposes. | 355 | /// Returns a syntax tree represented as `String`, for debug purposes. |
354 | // FIXME: use a better name here. | 356 | // FIXME: use a better name here. |
355 | pub fn syntax_tree(&self, file_id: FileId, text_range: Option<TextRange>) -> String { | 357 | pub fn syntax_tree( |
356 | syntax_tree::syntax_tree(&self.db, file_id, text_range) | 358 | &self, |
359 | file_id: FileId, | ||
360 | text_range: Option<TextRange>, | ||
361 | ) -> Cancelable<String> { | ||
362 | self.with_db(|db| syntax_tree::syntax_tree(&db, file_id, text_range)) | ||
357 | } | 363 | } |
358 | 364 | ||
359 | /// Returns an edit to remove all newlines in the range, cleaning up minor | 365 | /// Returns an edit to remove all newlines in the range, cleaning up minor |
360 | /// stuff like trailing commas. | 366 | /// stuff like trailing commas. |
361 | pub fn join_lines(&self, frange: FileRange) -> SourceChange { | 367 | pub fn join_lines(&self, frange: FileRange) -> Cancelable<SourceChange> { |
362 | let parse = self.db.parse(frange.file_id); | 368 | self.with_db(|db| { |
363 | let file_edit = SourceFileEdit { | 369 | let parse = db.parse(frange.file_id); |
364 | file_id: frange.file_id, | 370 | let file_edit = SourceFileEdit { |
365 | edit: join_lines::join_lines(&parse.tree(), frange.range), | 371 | file_id: frange.file_id, |
366 | }; | 372 | edit: join_lines::join_lines(&parse.tree(), frange.range), |
367 | SourceChange::source_file_edit("join lines", file_edit) | 373 | }; |
374 | SourceChange::source_file_edit("join lines", file_edit) | ||
375 | }) | ||
368 | } | 376 | } |
369 | 377 | ||
370 | /// Returns an edit which should be applied when opening a new line, fixing | 378 | /// Returns an edit which should be applied when opening a new line, fixing |
371 | /// up minor stuff like continuing the comment. | 379 | /// up minor stuff like continuing the comment. |
372 | pub fn on_enter(&self, position: FilePosition) -> Option<SourceChange> { | 380 | pub fn on_enter(&self, position: FilePosition) -> Cancelable<Option<SourceChange>> { |
373 | typing::on_enter(&self.db, position) | 381 | self.with_db(|db| typing::on_enter(&db, position)) |
374 | } | 382 | } |
375 | 383 | ||
376 | /// Returns an edit which should be applied after `=` was typed. Primarily, | 384 | /// Returns an edit which should be applied after `=` was typed. Primarily, |
377 | /// this works when adding `let =`. | 385 | /// this works when adding `let =`. |
378 | // FIXME: use a snippet completion instead of this hack here. | 386 | // FIXME: use a snippet completion instead of this hack here. |
379 | pub fn on_eq_typed(&self, position: FilePosition) -> Option<SourceChange> { | 387 | pub fn on_eq_typed(&self, position: FilePosition) -> Cancelable<Option<SourceChange>> { |
380 | let parse = self.db.parse(position.file_id); | 388 | self.with_db(|db| { |
381 | let file = parse.tree(); | 389 | let parse = db.parse(position.file_id); |
382 | let edit = typing::on_eq_typed(&file, position.offset)?; | 390 | let file = parse.tree(); |
383 | Some(SourceChange::source_file_edit( | 391 | let edit = typing::on_eq_typed(&file, position.offset)?; |
384 | "add semicolon", | 392 | Some(SourceChange::source_file_edit( |
385 | SourceFileEdit { edit, file_id: position.file_id }, | 393 | "add semicolon", |
386 | )) | 394 | SourceFileEdit { edit, file_id: position.file_id }, |
395 | )) | ||
396 | }) | ||
387 | } | 397 | } |
388 | 398 | ||
389 | /// Returns an edit which should be applied when a dot ('.') is typed on a blank line, indenting the line appropriately. | 399 | /// Returns an edit which should be applied when a dot ('.') is typed on a blank line, indenting the line appropriately. |
390 | pub fn on_dot_typed(&self, position: FilePosition) -> Option<SourceChange> { | 400 | pub fn on_dot_typed(&self, position: FilePosition) -> Cancelable<Option<SourceChange>> { |
391 | typing::on_dot_typed(&self.db, position) | 401 | self.with_db(|db| typing::on_dot_typed(&db, position)) |
392 | } | 402 | } |
393 | 403 | ||
394 | /// Returns a tree representation of symbols in the file. Useful to draw a | 404 | /// Returns a tree representation of symbols in the file. Useful to draw a |
395 | /// file outline. | 405 | /// file outline. |
396 | pub fn file_structure(&self, file_id: FileId) -> Vec<StructureNode> { | 406 | pub fn file_structure(&self, file_id: FileId) -> Cancelable<Vec<StructureNode>> { |
397 | let parse = self.db.parse(file_id); | 407 | self.with_db(|db| file_structure(&db.parse(file_id).tree())) |
398 | file_structure(&parse.tree()) | ||
399 | } | 408 | } |
400 | 409 | ||
401 | /// Returns a list of the places in the file where type hints can be displayed. | 410 | /// Returns a list of the places in the file where type hints can be displayed. |
@@ -404,9 +413,8 @@ impl Analysis { | |||
404 | } | 413 | } |
405 | 414 | ||
406 | /// Returns the set of folding ranges. | 415 | /// Returns the set of folding ranges. |
407 | pub fn folding_ranges(&self, file_id: FileId) -> Vec<Fold> { | 416 | pub fn folding_ranges(&self, file_id: FileId) -> Cancelable<Vec<Fold>> { |
408 | let parse = self.db.parse(file_id); | 417 | self.with_db(|db| folding_ranges::folding_ranges(&db.parse(file_id).tree())) |
409 | folding_ranges::folding_ranges(&parse.tree()) | ||
410 | } | 418 | } |
411 | 419 | ||
412 | /// Fuzzy searches for a symbol. | 420 | /// Fuzzy searches for a symbol. |
diff --git a/crates/ra_ide_api/src/references.rs b/crates/ra_ide_api/src/references.rs index 5c74d3e36..2118e7ad3 100644 --- a/crates/ra_ide_api/src/references.rs +++ b/crates/ra_ide_api/src/references.rs | |||
@@ -341,7 +341,39 @@ mod tests { | |||
341 | ); | 341 | ); |
342 | let new_name = "foo2"; | 342 | let new_name = "foo2"; |
343 | let source_change = analysis.rename(position, new_name).unwrap(); | 343 | let source_change = analysis.rename(position, new_name).unwrap(); |
344 | assert_debug_snapshot_matches!("rename_mod", &source_change); | 344 | assert_debug_snapshot_matches!(&source_change, |
345 | @r#"Some( | ||
346 | SourceChange { | ||
347 | label: "rename", | ||
348 | source_file_edits: [ | ||
349 | SourceFileEdit { | ||
350 | file_id: FileId( | ||
351 | 2, | ||
352 | ), | ||
353 | edit: TextEdit { | ||
354 | atoms: [ | ||
355 | AtomTextEdit { | ||
356 | delete: [4; 7), | ||
357 | insert: "foo2", | ||
358 | }, | ||
359 | ], | ||
360 | }, | ||
361 | }, | ||
362 | ], | ||
363 | file_system_edits: [ | ||
364 | MoveFile { | ||
365 | src: FileId( | ||
366 | 3, | ||
367 | ), | ||
368 | dst_source_root: SourceRootId( | ||
369 | 0, | ||
370 | ), | ||
371 | dst_path: "bar/foo2.rs", | ||
372 | }, | ||
373 | ], | ||
374 | cursor_position: None, | ||
375 | }, | ||
376 | )"#); | ||
345 | } | 377 | } |
346 | 378 | ||
347 | #[test] | 379 | #[test] |
@@ -356,7 +388,40 @@ mod tests { | |||
356 | ); | 388 | ); |
357 | let new_name = "foo2"; | 389 | let new_name = "foo2"; |
358 | let source_change = analysis.rename(position, new_name).unwrap(); | 390 | let source_change = analysis.rename(position, new_name).unwrap(); |
359 | assert_debug_snapshot_matches!("rename_mod_in_dir", &source_change); | 391 | assert_debug_snapshot_matches!(&source_change, |
392 | @r###"Some( | ||
393 | SourceChange { | ||
394 | label: "rename", | ||
395 | source_file_edits: [ | ||
396 | SourceFileEdit { | ||
397 | file_id: FileId( | ||
398 | 1, | ||
399 | ), | ||
400 | edit: TextEdit { | ||
401 | atoms: [ | ||
402 | AtomTextEdit { | ||
403 | delete: [4; 7), | ||
404 | insert: "foo2", | ||
405 | }, | ||
406 | ], | ||
407 | }, | ||
408 | }, | ||
409 | ], | ||
410 | file_system_edits: [ | ||
411 | MoveFile { | ||
412 | src: FileId( | ||
413 | 2, | ||
414 | ), | ||
415 | dst_source_root: SourceRootId( | ||
416 | 0, | ||
417 | ), | ||
418 | dst_path: "foo2/mod.rs", | ||
419 | }, | ||
420 | ], | ||
421 | cursor_position: None, | ||
422 | }, | ||
423 | )"### | ||
424 | ); | ||
360 | } | 425 | } |
361 | 426 | ||
362 | fn test_rename(text: &str, new_name: &str, expected: &str) { | 427 | fn test_rename(text: &str, new_name: &str, expected: &str) { |
@@ -372,7 +437,8 @@ mod tests { | |||
372 | } | 437 | } |
373 | } | 438 | } |
374 | } | 439 | } |
375 | let result = text_edit_builder.finish().apply(&*analysis.file_text(file_id.unwrap())); | 440 | let result = |
441 | text_edit_builder.finish().apply(&*analysis.file_text(file_id.unwrap()).unwrap()); | ||
376 | assert_eq_text!(expected, &*result); | 442 | assert_eq_text!(expected, &*result); |
377 | } | 443 | } |
378 | } | 444 | } |
diff --git a/crates/ra_ide_api/src/runnables.rs b/crates/ra_ide_api/src/runnables.rs index 07412a9ef..09c082de9 100644 --- a/crates/ra_ide_api/src/runnables.rs +++ b/crates/ra_ide_api/src/runnables.rs | |||
@@ -92,7 +92,26 @@ mod tests { | |||
92 | "#, | 92 | "#, |
93 | ); | 93 | ); |
94 | let runnables = analysis.runnables(pos.file_id).unwrap(); | 94 | let runnables = analysis.runnables(pos.file_id).unwrap(); |
95 | assert_debug_snapshot_matches!("runnables", &runnables) | 95 | assert_debug_snapshot_matches!(&runnables, |
96 | @r#"[ | ||
97 | Runnable { | ||
98 | range: [1; 21), | ||
99 | kind: Bin, | ||
100 | }, | ||
101 | Runnable { | ||
102 | range: [22; 46), | ||
103 | kind: Test { | ||
104 | name: "test_foo", | ||
105 | }, | ||
106 | }, | ||
107 | Runnable { | ||
108 | range: [47; 81), | ||
109 | kind: Test { | ||
110 | name: "test_foo", | ||
111 | }, | ||
112 | }, | ||
113 | ]"# | ||
114 | ); | ||
96 | } | 115 | } |
97 | 116 | ||
98 | #[test] | 117 | #[test] |
@@ -108,7 +127,22 @@ mod tests { | |||
108 | "#, | 127 | "#, |
109 | ); | 128 | ); |
110 | let runnables = analysis.runnables(pos.file_id).unwrap(); | 129 | let runnables = analysis.runnables(pos.file_id).unwrap(); |
111 | assert_debug_snapshot_matches!("runnables_module", &runnables) | 130 | assert_debug_snapshot_matches!(&runnables, |
131 | @r#"[ | ||
132 | Runnable { | ||
133 | range: [1; 59), | ||
134 | kind: TestMod { | ||
135 | path: "test_mod", | ||
136 | }, | ||
137 | }, | ||
138 | Runnable { | ||
139 | range: [28; 57), | ||
140 | kind: Test { | ||
141 | name: "test_foo1", | ||
142 | }, | ||
143 | }, | ||
144 | ]"# | ||
145 | ); | ||
112 | } | 146 | } |
113 | 147 | ||
114 | #[test] | 148 | #[test] |
@@ -126,7 +160,22 @@ mod tests { | |||
126 | "#, | 160 | "#, |
127 | ); | 161 | ); |
128 | let runnables = analysis.runnables(pos.file_id).unwrap(); | 162 | let runnables = analysis.runnables(pos.file_id).unwrap(); |
129 | assert_debug_snapshot_matches!("runnables_one_depth_layer_module", &runnables) | 163 | assert_debug_snapshot_matches!(&runnables, |
164 | @r#"[ | ||
165 | Runnable { | ||
166 | range: [23; 85), | ||
167 | kind: TestMod { | ||
168 | path: "foo::test_mod", | ||
169 | }, | ||
170 | }, | ||
171 | Runnable { | ||
172 | range: [46; 79), | ||
173 | kind: Test { | ||
174 | name: "test_foo1", | ||
175 | }, | ||
176 | }, | ||
177 | ]"# | ||
178 | ); | ||
130 | } | 179 | } |
131 | 180 | ||
132 | #[test] | 181 | #[test] |
@@ -146,7 +195,22 @@ mod tests { | |||
146 | "#, | 195 | "#, |
147 | ); | 196 | ); |
148 | let runnables = analysis.runnables(pos.file_id).unwrap(); | 197 | let runnables = analysis.runnables(pos.file_id).unwrap(); |
149 | assert_debug_snapshot_matches!("runnables_multiple_depth_module", &runnables) | 198 | assert_debug_snapshot_matches!(&runnables, |
199 | @r#"[ | ||
200 | Runnable { | ||
201 | range: [41; 115), | ||
202 | kind: TestMod { | ||
203 | path: "foo::bar::test_mod", | ||
204 | }, | ||
205 | }, | ||
206 | Runnable { | ||
207 | range: [68; 105), | ||
208 | kind: Test { | ||
209 | name: "test_foo1", | ||
210 | }, | ||
211 | }, | ||
212 | ]"# | ||
213 | ); | ||
150 | } | 214 | } |
151 | 215 | ||
152 | #[test] | 216 | #[test] |
diff --git a/crates/ra_ide_api/src/snapshots/tests__highlights_code_inside_macros.snap b/crates/ra_ide_api/src/snapshots/tests__highlights_code_inside_macros.snap deleted file mode 100644 index ae8923e75..000000000 --- a/crates/ra_ide_api/src/snapshots/tests__highlights_code_inside_macros.snap +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-02-01T07:46:59.130146403+00:00" | ||
3 | creator: [email protected] | ||
4 | expression: "&highlights" | ||
5 | source: crates/ra_ide_api/src/syntax_highlighting.rs | ||
6 | --- | ||
7 | [ | ||
8 | HighlightedRange { | ||
9 | range: [13; 15), | ||
10 | tag: "keyword" | ||
11 | }, | ||
12 | HighlightedRange { | ||
13 | range: [16; 20), | ||
14 | tag: "function" | ||
15 | }, | ||
16 | HighlightedRange { | ||
17 | range: [41; 45), | ||
18 | tag: "macro" | ||
19 | }, | ||
20 | HighlightedRange { | ||
21 | range: [48; 51), | ||
22 | tag: "keyword" | ||
23 | }, | ||
24 | HighlightedRange { | ||
25 | range: [56; 58), | ||
26 | tag: "literal" | ||
27 | }, | ||
28 | HighlightedRange { | ||
29 | range: [48; 51), | ||
30 | tag: "keyword" | ||
31 | }, | ||
32 | HighlightedRange { | ||
33 | range: [52; 53), | ||
34 | tag: "function" | ||
35 | }, | ||
36 | HighlightedRange { | ||
37 | range: [56; 58), | ||
38 | tag: "literal" | ||
39 | }, | ||
40 | HighlightedRange { | ||
41 | range: [60; 61), | ||
42 | tag: "text" | ||
43 | } | ||
44 | ] | ||
diff --git a/crates/ra_ide_api/src/snapshots/tests__rename_mod.snap b/crates/ra_ide_api/src/snapshots/tests__rename_mod.snap deleted file mode 100644 index 431de5c55..000000000 --- a/crates/ra_ide_api/src/snapshots/tests__rename_mod.snap +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.215905447Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/references.rs | ||
5 | expression: "&source_change" | ||
6 | --- | ||
7 | Some( | ||
8 | SourceChange { | ||
9 | label: "rename", | ||
10 | source_file_edits: [ | ||
11 | SourceFileEdit { | ||
12 | file_id: FileId( | ||
13 | 2, | ||
14 | ), | ||
15 | edit: TextEdit { | ||
16 | atoms: [ | ||
17 | AtomTextEdit { | ||
18 | delete: [4; 7), | ||
19 | insert: "foo2", | ||
20 | }, | ||
21 | ], | ||
22 | }, | ||
23 | }, | ||
24 | ], | ||
25 | file_system_edits: [ | ||
26 | MoveFile { | ||
27 | src: FileId( | ||
28 | 3, | ||
29 | ), | ||
30 | dst_source_root: SourceRootId( | ||
31 | 0, | ||
32 | ), | ||
33 | dst_path: "bar/foo2.rs", | ||
34 | }, | ||
35 | ], | ||
36 | cursor_position: None, | ||
37 | }, | ||
38 | ) | ||
diff --git a/crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap b/crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap deleted file mode 100644 index aaff9b4b5..000000000 --- a/crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.213830371Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/references.rs | ||
5 | expression: "&source_change" | ||
6 | --- | ||
7 | Some( | ||
8 | SourceChange { | ||
9 | label: "rename", | ||
10 | source_file_edits: [ | ||
11 | SourceFileEdit { | ||
12 | file_id: FileId( | ||
13 | 1, | ||
14 | ), | ||
15 | edit: TextEdit { | ||
16 | atoms: [ | ||
17 | AtomTextEdit { | ||
18 | delete: [4; 7), | ||
19 | insert: "foo2", | ||
20 | }, | ||
21 | ], | ||
22 | }, | ||
23 | }, | ||
24 | ], | ||
25 | file_system_edits: [ | ||
26 | MoveFile { | ||
27 | src: FileId( | ||
28 | 2, | ||
29 | ), | ||
30 | dst_source_root: SourceRootId( | ||
31 | 0, | ||
32 | ), | ||
33 | dst_path: "foo2/mod.rs", | ||
34 | }, | ||
35 | ], | ||
36 | cursor_position: None, | ||
37 | }, | ||
38 | ) | ||
diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables.snap b/crates/ra_ide_api/src/snapshots/tests__runnables.snap deleted file mode 100644 index de2fadd7f..000000000 --- a/crates/ra_ide_api/src/snapshots/tests__runnables.snap +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.217100106Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/runnables.rs | ||
5 | expression: "&runnables" | ||
6 | --- | ||
7 | [ | ||
8 | Runnable { | ||
9 | range: [1; 21), | ||
10 | kind: Bin, | ||
11 | }, | ||
12 | Runnable { | ||
13 | range: [22; 46), | ||
14 | kind: Test { | ||
15 | name: "test_foo", | ||
16 | }, | ||
17 | }, | ||
18 | Runnable { | ||
19 | range: [47; 81), | ||
20 | kind: Test { | ||
21 | name: "test_foo", | ||
22 | }, | ||
23 | }, | ||
24 | ] | ||
diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap b/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap deleted file mode 100644 index 23993a97f..000000000 --- a/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.219258850Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/runnables.rs | ||
5 | expression: "&runnables" | ||
6 | --- | ||
7 | [ | ||
8 | Runnable { | ||
9 | range: [1; 59), | ||
10 | kind: TestMod { | ||
11 | path: "test_mod", | ||
12 | }, | ||
13 | }, | ||
14 | Runnable { | ||
15 | range: [28; 57), | ||
16 | kind: Test { | ||
17 | name: "test_foo1", | ||
18 | }, | ||
19 | }, | ||
20 | ] | ||
diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap b/crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap deleted file mode 100644 index c516a61df..000000000 --- a/crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.219671663Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/runnables.rs | ||
5 | expression: "&runnables" | ||
6 | --- | ||
7 | [ | ||
8 | Runnable { | ||
9 | range: [41; 115), | ||
10 | kind: TestMod { | ||
11 | path: "foo::bar::test_mod", | ||
12 | }, | ||
13 | }, | ||
14 | Runnable { | ||
15 | range: [68; 105), | ||
16 | kind: Test { | ||
17 | name: "test_foo1", | ||
18 | }, | ||
19 | }, | ||
20 | ] | ||
diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap b/crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap deleted file mode 100644 index b02e6707e..000000000 --- a/crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.224315047Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/runnables.rs | ||
5 | expression: "&runnables" | ||
6 | --- | ||
7 | [ | ||
8 | Runnable { | ||
9 | range: [23; 85), | ||
10 | kind: TestMod { | ||
11 | path: "foo::test_mod", | ||
12 | }, | ||
13 | }, | ||
14 | Runnable { | ||
15 | range: [46; 79), | ||
16 | kind: Test { | ||
17 | name: "test_foo1", | ||
18 | }, | ||
19 | }, | ||
20 | ] | ||
diff --git a/crates/ra_ide_api/src/syntax_tree.rs b/crates/ra_ide_api/src/syntax_tree.rs index a07e670fa..dd31b9093 100644 --- a/crates/ra_ide_api/src/syntax_tree.rs +++ b/crates/ra_ide_api/src/syntax_tree.rs | |||
@@ -101,7 +101,7 @@ mod tests { | |||
101 | fn test_syntax_tree_without_range() { | 101 | fn test_syntax_tree_without_range() { |
102 | // Basic syntax | 102 | // Basic syntax |
103 | let (analysis, file_id) = single_file(r#"fn foo() {}"#); | 103 | let (analysis, file_id) = single_file(r#"fn foo() {}"#); |
104 | let syn = analysis.syntax_tree(file_id, None); | 104 | let syn = analysis.syntax_tree(file_id, None).unwrap(); |
105 | 105 | ||
106 | assert_eq_text!( | 106 | assert_eq_text!( |
107 | syn.trim(), | 107 | syn.trim(), |
@@ -133,7 +133,7 @@ fn test() { | |||
133 | }"# | 133 | }"# |
134 | .trim(), | 134 | .trim(), |
135 | ); | 135 | ); |
136 | let syn = analysis.syntax_tree(file_id, None); | 136 | let syn = analysis.syntax_tree(file_id, None).unwrap(); |
137 | 137 | ||
138 | assert_eq_text!( | 138 | assert_eq_text!( |
139 | syn.trim(), | 139 | syn.trim(), |
@@ -176,7 +176,7 @@ SOURCE_FILE@[0; 60) | |||
176 | #[test] | 176 | #[test] |
177 | fn test_syntax_tree_with_range() { | 177 | fn test_syntax_tree_with_range() { |
178 | let (analysis, range) = single_file_with_range(r#"<|>fn foo() {}<|>"#.trim()); | 178 | let (analysis, range) = single_file_with_range(r#"<|>fn foo() {}<|>"#.trim()); |
179 | let syn = analysis.syntax_tree(range.file_id, Some(range.range)); | 179 | let syn = analysis.syntax_tree(range.file_id, Some(range.range)).unwrap(); |
180 | 180 | ||
181 | assert_eq_text!( | 181 | assert_eq_text!( |
182 | syn.trim(), | 182 | syn.trim(), |
@@ -206,7 +206,7 @@ FN_DEF@[0; 11) | |||
206 | }"# | 206 | }"# |
207 | .trim(), | 207 | .trim(), |
208 | ); | 208 | ); |
209 | let syn = analysis.syntax_tree(range.file_id, Some(range.range)); | 209 | let syn = analysis.syntax_tree(range.file_id, Some(range.range)).unwrap(); |
210 | 210 | ||
211 | assert_eq_text!( | 211 | assert_eq_text!( |
212 | syn.trim(), | 212 | syn.trim(), |
@@ -244,7 +244,7 @@ fn bar() { | |||
244 | }"# | 244 | }"# |
245 | .trim(), | 245 | .trim(), |
246 | ); | 246 | ); |
247 | let syn = analysis.syntax_tree(range.file_id, Some(range.range)); | 247 | let syn = analysis.syntax_tree(range.file_id, Some(range.range)).unwrap(); |
248 | assert_eq_text!( | 248 | assert_eq_text!( |
249 | syn.trim(), | 249 | syn.trim(), |
250 | r#" | 250 | r#" |
@@ -278,7 +278,7 @@ fn bar() { | |||
278 | }"### | 278 | }"### |
279 | .trim(), | 279 | .trim(), |
280 | ); | 280 | ); |
281 | let syn = analysis.syntax_tree(range.file_id, Some(range.range)); | 281 | let syn = analysis.syntax_tree(range.file_id, Some(range.range)).unwrap(); |
282 | assert_eq_text!( | 282 | assert_eq_text!( |
283 | syn.trim(), | 283 | syn.trim(), |
284 | r#" | 284 | r#" |
@@ -311,7 +311,7 @@ fn bar() { | |||
311 | }"### | 311 | }"### |
312 | .trim(), | 312 | .trim(), |
313 | ); | 313 | ); |
314 | let syn = analysis.syntax_tree(range.file_id, Some(range.range)); | 314 | let syn = analysis.syntax_tree(range.file_id, Some(range.range)).unwrap(); |
315 | assert_eq_text!( | 315 | assert_eq_text!( |
316 | syn.trim(), | 316 | syn.trim(), |
317 | r#" | 317 | r#" |
diff --git a/crates/ra_ide_api/src/typing.rs b/crates/ra_ide_api/src/typing.rs index 6b3fd5904..2d4491442 100644 --- a/crates/ra_ide_api/src/typing.rs +++ b/crates/ra_ide_api/src/typing.rs | |||
@@ -195,7 +195,7 @@ fn foo() { | |||
195 | edit.insert(offset, ".".to_string()); | 195 | edit.insert(offset, ".".to_string()); |
196 | let before = edit.finish().apply(&before); | 196 | let before = edit.finish().apply(&before); |
197 | let (analysis, file_id) = single_file(&before); | 197 | let (analysis, file_id) = single_file(&before); |
198 | if let Some(result) = analysis.on_dot_typed(FilePosition { offset, file_id }) { | 198 | if let Some(result) = analysis.on_dot_typed(FilePosition { offset, file_id }).unwrap() { |
199 | assert_eq!(result.source_file_edits.len(), 1); | 199 | assert_eq!(result.source_file_edits.len(), 1); |
200 | let actual = result.source_file_edits[0].edit.apply(&before); | 200 | let actual = result.source_file_edits[0].edit.apply(&before); |
201 | assert_eq_text!(after, &actual); | 201 | assert_eq_text!(after, &actual); |
@@ -377,7 +377,7 @@ fn foo() { | |||
377 | fn apply_on_enter(before: &str) -> Option<String> { | 377 | fn apply_on_enter(before: &str) -> Option<String> { |
378 | let (offset, before) = extract_offset(before); | 378 | let (offset, before) = extract_offset(before); |
379 | let (analysis, file_id) = single_file(&before); | 379 | let (analysis, file_id) = single_file(&before); |
380 | let result = analysis.on_enter(FilePosition { offset, file_id })?; | 380 | let result = analysis.on_enter(FilePosition { offset, file_id }).unwrap()?; |
381 | 381 | ||
382 | assert_eq!(result.source_file_edits.len(), 1); | 382 | assert_eq!(result.source_file_edits.len(), 1); |
383 | let actual = result.source_file_edits[0].edit.apply(&before); | 383 | let actual = result.source_file_edits[0].edit.apply(&before); |
diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index 82c7e757f..6b3be444f 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs | |||
@@ -272,7 +272,7 @@ impl<'a> TryConvWith for &'a TextDocumentPositionParams { | |||
272 | type Output = FilePosition; | 272 | type Output = FilePosition; |
273 | fn try_conv_with(self, world: &WorldSnapshot) -> Result<FilePosition> { | 273 | fn try_conv_with(self, world: &WorldSnapshot) -> Result<FilePosition> { |
274 | let file_id = self.text_document.try_conv_with(world)?; | 274 | let file_id = self.text_document.try_conv_with(world)?; |
275 | let line_index = world.analysis().file_line_index(file_id); | 275 | let line_index = world.analysis().file_line_index(file_id)?; |
276 | let offset = self.position.conv_with(&line_index); | 276 | let offset = self.position.conv_with(&line_index); |
277 | Ok(FilePosition { file_id, offset }) | 277 | Ok(FilePosition { file_id, offset }) |
278 | } | 278 | } |
@@ -283,7 +283,7 @@ impl<'a> TryConvWith for (&'a TextDocumentIdentifier, Range) { | |||
283 | type Output = FileRange; | 283 | type Output = FileRange; |
284 | fn try_conv_with(self, world: &WorldSnapshot) -> Result<FileRange> { | 284 | fn try_conv_with(self, world: &WorldSnapshot) -> Result<FileRange> { |
285 | let file_id = self.0.try_conv_with(world)?; | 285 | let file_id = self.0.try_conv_with(world)?; |
286 | let line_index = world.analysis().file_line_index(file_id); | 286 | let line_index = world.analysis().file_line_index(file_id)?; |
287 | let range = self.1.conv_with(&line_index); | 287 | let range = self.1.conv_with(&line_index); |
288 | Ok(FileRange { file_id, range }) | 288 | Ok(FileRange { file_id, range }) |
289 | } | 289 | } |
@@ -308,7 +308,7 @@ impl TryConvWith for SourceChange { | |||
308 | let cursor_position = match self.cursor_position { | 308 | let cursor_position = match self.cursor_position { |
309 | None => None, | 309 | None => None, |
310 | Some(pos) => { | 310 | Some(pos) => { |
311 | let line_index = world.analysis().file_line_index(pos.file_id); | 311 | let line_index = world.analysis().file_line_index(pos.file_id)?; |
312 | let edit = self | 312 | let edit = self |
313 | .source_file_edits | 313 | .source_file_edits |
314 | .iter() | 314 | .iter() |
@@ -349,7 +349,7 @@ impl TryConvWith for SourceFileEdit { | |||
349 | uri: self.file_id.try_conv_with(world)?, | 349 | uri: self.file_id.try_conv_with(world)?, |
350 | version: None, | 350 | version: None, |
351 | }; | 351 | }; |
352 | let line_index = world.analysis().file_line_index(self.file_id); | 352 | let line_index = world.analysis().file_line_index(self.file_id)?; |
353 | let edits = self.edit.as_atoms().iter().map_conv_with(&line_index).collect(); | 353 | let edits = self.edit.as_atoms().iter().map_conv_with(&line_index).collect(); |
354 | Ok(TextDocumentEdit { text_document, edits }) | 354 | Ok(TextDocumentEdit { text_document, edits }) |
355 | } | 355 | } |
@@ -378,7 +378,7 @@ impl TryConvWith for &NavigationTarget { | |||
378 | type Ctx = WorldSnapshot; | 378 | type Ctx = WorldSnapshot; |
379 | type Output = Location; | 379 | type Output = Location; |
380 | fn try_conv_with(self, world: &WorldSnapshot) -> Result<Location> { | 380 | fn try_conv_with(self, world: &WorldSnapshot) -> Result<Location> { |
381 | let line_index = world.analysis().file_line_index(self.file_id()); | 381 | let line_index = world.analysis().file_line_index(self.file_id())?; |
382 | let range = self.range(); | 382 | let range = self.range(); |
383 | to_location(self.file_id(), range, &world, &line_index) | 383 | to_location(self.file_id(), range, &world, &line_index) |
384 | } | 384 | } |
@@ -391,8 +391,8 @@ impl TryConvWith for (FileId, RangeInfo<NavigationTarget>) { | |||
391 | let (src_file_id, target) = self; | 391 | let (src_file_id, target) = self; |
392 | 392 | ||
393 | let target_uri = target.info.file_id().try_conv_with(world)?; | 393 | let target_uri = target.info.file_id().try_conv_with(world)?; |
394 | let src_line_index = world.analysis().file_line_index(src_file_id); | 394 | let src_line_index = world.analysis().file_line_index(src_file_id)?; |
395 | let tgt_line_index = world.analysis().file_line_index(target.info.file_id()); | 395 | let tgt_line_index = world.analysis().file_line_index(target.info.file_id())?; |
396 | 396 | ||
397 | let target_range = target.info.full_range().conv_with(&tgt_line_index); | 397 | let target_range = target.info.full_range().conv_with(&tgt_line_index); |
398 | 398 | ||
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 5bf950a53..9006aa316 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -39,9 +39,9 @@ pub fn handle_analyzer_status(world: WorldSnapshot, _: ()) -> Result<String> { | |||
39 | 39 | ||
40 | pub fn handle_syntax_tree(world: WorldSnapshot, params: req::SyntaxTreeParams) -> Result<String> { | 40 | pub fn handle_syntax_tree(world: WorldSnapshot, params: req::SyntaxTreeParams) -> Result<String> { |
41 | let id = params.text_document.try_conv_with(&world)?; | 41 | let id = params.text_document.try_conv_with(&world)?; |
42 | let line_index = world.analysis().file_line_index(id); | 42 | let line_index = world.analysis().file_line_index(id)?; |
43 | let text_range = params.range.map(|p| p.conv_with(&line_index)); | 43 | let text_range = params.range.map(|p| p.conv_with(&line_index)); |
44 | let res = world.analysis().syntax_tree(id, text_range); | 44 | let res = world.analysis().syntax_tree(id, text_range)?; |
45 | Ok(res) | 45 | Ok(res) |
46 | } | 46 | } |
47 | 47 | ||
@@ -55,7 +55,7 @@ pub fn handle_extend_selection( | |||
55 | use the new selection range API in LSP", | 55 | use the new selection range API in LSP", |
56 | ); | 56 | ); |
57 | let file_id = params.text_document.try_conv_with(&world)?; | 57 | let file_id = params.text_document.try_conv_with(&world)?; |
58 | let line_index = world.analysis().file_line_index(file_id); | 58 | let line_index = world.analysis().file_line_index(file_id)?; |
59 | let selections = params | 59 | let selections = params |
60 | .selections | 60 | .selections |
61 | .into_iter() | 61 | .into_iter() |
@@ -72,7 +72,7 @@ pub fn handle_selection_range( | |||
72 | ) -> Result<Vec<req::SelectionRange>> { | 72 | ) -> Result<Vec<req::SelectionRange>> { |
73 | let _p = profile("handle_selection_range"); | 73 | let _p = profile("handle_selection_range"); |
74 | let file_id = params.text_document.try_conv_with(&world)?; | 74 | let file_id = params.text_document.try_conv_with(&world)?; |
75 | let line_index = world.analysis().file_line_index(file_id); | 75 | let line_index = world.analysis().file_line_index(file_id)?; |
76 | params | 76 | params |
77 | .positions | 77 | .positions |
78 | .into_iter() | 78 | .into_iter() |
@@ -113,13 +113,19 @@ pub fn handle_find_matching_brace( | |||
113 | ) -> Result<Vec<Position>> { | 113 | ) -> Result<Vec<Position>> { |
114 | let _p = profile("handle_find_matching_brace"); | 114 | let _p = profile("handle_find_matching_brace"); |
115 | let file_id = params.text_document.try_conv_with(&world)?; | 115 | let file_id = params.text_document.try_conv_with(&world)?; |
116 | let line_index = world.analysis().file_line_index(file_id); | 116 | let line_index = world.analysis().file_line_index(file_id)?; |
117 | let res = params | 117 | let res = params |
118 | .offsets | 118 | .offsets |
119 | .into_iter() | 119 | .into_iter() |
120 | .map_conv_with(&line_index) | 120 | .map_conv_with(&line_index) |
121 | .map(|offset| { | 121 | .map(|offset| { |
122 | world.analysis().matching_brace(FilePosition { file_id, offset }).unwrap_or(offset) | 122 | if let Ok(Some(matching_brace_offset)) = |
123 | world.analysis().matching_brace(FilePosition { file_id, offset }) | ||
124 | { | ||
125 | matching_brace_offset | ||
126 | } else { | ||
127 | offset | ||
128 | } | ||
123 | }) | 129 | }) |
124 | .map_conv_with(&line_index) | 130 | .map_conv_with(&line_index) |
125 | .collect(); | 131 | .collect(); |
@@ -132,7 +138,7 @@ pub fn handle_join_lines( | |||
132 | ) -> Result<req::SourceChange> { | 138 | ) -> Result<req::SourceChange> { |
133 | let _p = profile("handle_join_lines"); | 139 | let _p = profile("handle_join_lines"); |
134 | let frange = (¶ms.text_document, params.range).try_conv_with(&world)?; | 140 | let frange = (¶ms.text_document, params.range).try_conv_with(&world)?; |
135 | world.analysis().join_lines(frange).try_conv_with(&world) | 141 | world.analysis().join_lines(frange)?.try_conv_with(&world) |
136 | } | 142 | } |
137 | 143 | ||
138 | pub fn handle_on_enter( | 144 | pub fn handle_on_enter( |
@@ -141,7 +147,7 @@ pub fn handle_on_enter( | |||
141 | ) -> Result<Option<req::SourceChange>> { | 147 | ) -> Result<Option<req::SourceChange>> { |
142 | let _p = profile("handle_on_enter"); | 148 | let _p = profile("handle_on_enter"); |
143 | let position = params.try_conv_with(&world)?; | 149 | let position = params.try_conv_with(&world)?; |
144 | match world.analysis().on_enter(position) { | 150 | match world.analysis().on_enter(position)? { |
145 | None => Ok(None), | 151 | None => Ok(None), |
146 | Some(edit) => Ok(Some(edit.try_conv_with(&world)?)), | 152 | Some(edit) => Ok(Some(edit.try_conv_with(&world)?)), |
147 | } | 153 | } |
@@ -153,7 +159,7 @@ pub fn handle_on_type_formatting( | |||
153 | ) -> Result<Option<Vec<TextEdit>>> { | 159 | ) -> Result<Option<Vec<TextEdit>>> { |
154 | let _p = profile("handle_on_type_formatting"); | 160 | let _p = profile("handle_on_type_formatting"); |
155 | let mut position = params.text_document_position.try_conv_with(&world)?; | 161 | let mut position = params.text_document_position.try_conv_with(&world)?; |
156 | let line_index = world.analysis().file_line_index(position.file_id); | 162 | let line_index = world.analysis().file_line_index(position.file_id)?; |
157 | 163 | ||
158 | // in `ra_ide_api`, the `on_type` invariant is that | 164 | // in `ra_ide_api`, the `on_type` invariant is that |
159 | // `text.char_at(position) == typed_char`. | 165 | // `text.char_at(position) == typed_char`. |
@@ -163,7 +169,7 @@ pub fn handle_on_type_formatting( | |||
163 | "=" => world.analysis().on_eq_typed(position), | 169 | "=" => world.analysis().on_eq_typed(position), |
164 | "." => world.analysis().on_dot_typed(position), | 170 | "." => world.analysis().on_dot_typed(position), |
165 | _ => return Ok(None), | 171 | _ => return Ok(None), |
166 | }; | 172 | }?; |
167 | let mut edit = match edit { | 173 | let mut edit = match edit { |
168 | Some(it) => it, | 174 | Some(it) => it, |
169 | None => return Ok(None), | 175 | None => return Ok(None), |
@@ -181,11 +187,11 @@ pub fn handle_document_symbol( | |||
181 | params: req::DocumentSymbolParams, | 187 | params: req::DocumentSymbolParams, |
182 | ) -> Result<Option<req::DocumentSymbolResponse>> { | 188 | ) -> Result<Option<req::DocumentSymbolResponse>> { |
183 | let file_id = params.text_document.try_conv_with(&world)?; | 189 | let file_id = params.text_document.try_conv_with(&world)?; |
184 | let line_index = world.analysis().file_line_index(file_id); | 190 | let line_index = world.analysis().file_line_index(file_id)?; |
185 | 191 | ||
186 | let mut parents: Vec<(DocumentSymbol, Option<usize>)> = Vec::new(); | 192 | let mut parents: Vec<(DocumentSymbol, Option<usize>)> = Vec::new(); |
187 | 193 | ||
188 | for symbol in world.analysis().file_structure(file_id) { | 194 | for symbol in world.analysis().file_structure(file_id)? { |
189 | let doc_symbol = DocumentSymbol { | 195 | let doc_symbol = DocumentSymbol { |
190 | name: symbol.label, | 196 | name: symbol.label, |
191 | detail: symbol.detail, | 197 | detail: symbol.detail, |
@@ -309,7 +315,7 @@ pub fn handle_runnables( | |||
309 | params: req::RunnablesParams, | 315 | params: req::RunnablesParams, |
310 | ) -> Result<Vec<req::Runnable>> { | 316 | ) -> Result<Vec<req::Runnable>> { |
311 | let file_id = params.text_document.try_conv_with(&world)?; | 317 | let file_id = params.text_document.try_conv_with(&world)?; |
312 | let line_index = world.analysis().file_line_index(file_id); | 318 | let line_index = world.analysis().file_line_index(file_id)?; |
313 | let offset = params.position.map(|it| it.conv_with(&line_index)); | 319 | let offset = params.position.map(|it| it.conv_with(&line_index)); |
314 | let mut res = Vec::new(); | 320 | let mut res = Vec::new(); |
315 | let workspace_root = world.workspace_root_for(file_id); | 321 | let workspace_root = world.workspace_root_for(file_id); |
@@ -383,7 +389,7 @@ pub fn handle_completion( | |||
383 | let mut res = false; | 389 | let mut res = false; |
384 | if let Some(ctx) = params.context { | 390 | if let Some(ctx) = params.context { |
385 | if ctx.trigger_character.unwrap_or_default() == ":" { | 391 | if ctx.trigger_character.unwrap_or_default() == ":" { |
386 | let source_file = world.analysis().parse(position.file_id); | 392 | let source_file = world.analysis().parse(position.file_id)?; |
387 | let syntax = source_file.syntax(); | 393 | let syntax = source_file.syntax(); |
388 | let text = syntax.text(); | 394 | let text = syntax.text(); |
389 | if let Some(next_char) = text.char_at(position.offset) { | 395 | if let Some(next_char) = text.char_at(position.offset) { |
@@ -405,7 +411,7 @@ pub fn handle_completion( | |||
405 | None => return Ok(None), | 411 | None => return Ok(None), |
406 | Some(items) => items, | 412 | Some(items) => items, |
407 | }; | 413 | }; |
408 | let line_index = world.analysis().file_line_index(position.file_id); | 414 | let line_index = world.analysis().file_line_index(position.file_id)?; |
409 | let items: Vec<CompletionItem> = | 415 | let items: Vec<CompletionItem> = |
410 | items.into_iter().map(|item| item.conv_with(&line_index)).collect(); | 416 | items.into_iter().map(|item| item.conv_with(&line_index)).collect(); |
411 | 417 | ||
@@ -417,12 +423,12 @@ pub fn handle_folding_range( | |||
417 | params: FoldingRangeParams, | 423 | params: FoldingRangeParams, |
418 | ) -> Result<Option<Vec<FoldingRange>>> { | 424 | ) -> Result<Option<Vec<FoldingRange>>> { |
419 | let file_id = params.text_document.try_conv_with(&world)?; | 425 | let file_id = params.text_document.try_conv_with(&world)?; |
420 | let line_index = world.analysis().file_line_index(file_id); | 426 | let line_index = world.analysis().file_line_index(file_id)?; |
421 | 427 | ||
422 | let res = Some( | 428 | let res = Some( |
423 | world | 429 | world |
424 | .analysis() | 430 | .analysis() |
425 | .folding_ranges(file_id) | 431 | .folding_ranges(file_id)? |
426 | .into_iter() | 432 | .into_iter() |
427 | .map(|fold| { | 433 | .map(|fold| { |
428 | let kind = match fold.kind { | 434 | let kind = match fold.kind { |
@@ -474,7 +480,7 @@ pub fn handle_hover( | |||
474 | None => return Ok(None), | 480 | None => return Ok(None), |
475 | Some(info) => info, | 481 | Some(info) => info, |
476 | }; | 482 | }; |
477 | let line_index = world.analysis.file_line_index(position.file_id); | 483 | let line_index = world.analysis.file_line_index(position.file_id)?; |
478 | let range = info.range.conv_with(&line_index); | 484 | let range = info.range.conv_with(&line_index); |
479 | let res = Hover { | 485 | let res = Hover { |
480 | contents: HoverContents::Markup(MarkupContent { | 486 | contents: HoverContents::Markup(MarkupContent { |
@@ -503,7 +509,7 @@ pub fn handle_prepare_rename( | |||
503 | // Refs should always have a declaration | 509 | // Refs should always have a declaration |
504 | let r = refs.declaration(); | 510 | let r = refs.declaration(); |
505 | let file_id = params.text_document.try_conv_with(&world)?; | 511 | let file_id = params.text_document.try_conv_with(&world)?; |
506 | let line_index = world.analysis().file_line_index(file_id); | 512 | let line_index = world.analysis().file_line_index(file_id)?; |
507 | let loc = to_location(r.file_id(), r.range(), &world, &line_index)?; | 513 | let loc = to_location(r.file_id(), r.range(), &world, &line_index)?; |
508 | 514 | ||
509 | Ok(Some(PrepareRenameResponse::Range(loc.range))) | 515 | Ok(Some(PrepareRenameResponse::Range(loc.range))) |
@@ -536,7 +542,7 @@ pub fn handle_references( | |||
536 | params: req::ReferenceParams, | 542 | params: req::ReferenceParams, |
537 | ) -> Result<Option<Vec<Location>>> { | 543 | ) -> Result<Option<Vec<Location>>> { |
538 | let position = params.text_document_position.try_conv_with(&world)?; | 544 | let position = params.text_document_position.try_conv_with(&world)?; |
539 | let line_index = world.analysis().file_line_index(position.file_id); | 545 | let line_index = world.analysis().file_line_index(position.file_id)?; |
540 | 546 | ||
541 | let refs = match world.analysis().find_all_refs(position)? { | 547 | let refs = match world.analysis().find_all_refs(position)? { |
542 | None => return Ok(None), | 548 | None => return Ok(None), |
@@ -563,9 +569,9 @@ pub fn handle_formatting( | |||
563 | params: DocumentFormattingParams, | 569 | params: DocumentFormattingParams, |
564 | ) -> Result<Option<Vec<TextEdit>>> { | 570 | ) -> Result<Option<Vec<TextEdit>>> { |
565 | let file_id = params.text_document.try_conv_with(&world)?; | 571 | let file_id = params.text_document.try_conv_with(&world)?; |
566 | let file = world.analysis().file_text(file_id); | 572 | let file = world.analysis().file_text(file_id)?; |
567 | 573 | ||
568 | let file_line_index = world.analysis().file_line_index(file_id); | 574 | let file_line_index = world.analysis().file_line_index(file_id)?; |
569 | let end_position = TextUnit::of_str(&file).conv_with(&file_line_index); | 575 | let end_position = TextUnit::of_str(&file).conv_with(&file_line_index); |
570 | 576 | ||
571 | use std::process; | 577 | use std::process; |
@@ -623,7 +629,7 @@ pub fn handle_code_action( | |||
623 | ) -> Result<Option<CodeActionResponse>> { | 629 | ) -> Result<Option<CodeActionResponse>> { |
624 | let _p = profile("handle_code_action"); | 630 | let _p = profile("handle_code_action"); |
625 | let file_id = params.text_document.try_conv_with(&world)?; | 631 | let file_id = params.text_document.try_conv_with(&world)?; |
626 | let line_index = world.analysis().file_line_index(file_id); | 632 | let line_index = world.analysis().file_line_index(file_id)?; |
627 | let range = params.range.conv_with(&line_index); | 633 | let range = params.range.conv_with(&line_index); |
628 | 634 | ||
629 | let assists = world.analysis().assists(FileRange { file_id, range })?.into_iter(); | 635 | let assists = world.analysis().assists(FileRange { file_id, range })?.into_iter(); |
@@ -685,7 +691,7 @@ pub fn handle_code_lens( | |||
685 | params: req::CodeLensParams, | 691 | params: req::CodeLensParams, |
686 | ) -> Result<Option<Vec<CodeLens>>> { | 692 | ) -> Result<Option<Vec<CodeLens>>> { |
687 | let file_id = params.text_document.try_conv_with(&world)?; | 693 | let file_id = params.text_document.try_conv_with(&world)?; |
688 | let line_index = world.analysis().file_line_index(file_id); | 694 | let line_index = world.analysis().file_line_index(file_id)?; |
689 | 695 | ||
690 | let mut lenses: Vec<CodeLens> = Default::default(); | 696 | let mut lenses: Vec<CodeLens> = Default::default(); |
691 | let workspace_root = world.workspace_root_for(file_id); | 697 | let workspace_root = world.workspace_root_for(file_id); |
@@ -730,7 +736,7 @@ pub fn handle_code_lens( | |||
730 | lenses.extend( | 736 | lenses.extend( |
731 | world | 737 | world |
732 | .analysis() | 738 | .analysis() |
733 | .file_structure(file_id) | 739 | .file_structure(file_id)? |
734 | .into_iter() | 740 | .into_iter() |
735 | .filter(|it| match it.kind { | 741 | .filter(|it| match it.kind { |
736 | SyntaxKind::TRAIT_DEF | SyntaxKind::STRUCT_DEF | SyntaxKind::ENUM_DEF => true, | 742 | SyntaxKind::TRAIT_DEF | SyntaxKind::STRUCT_DEF | SyntaxKind::ENUM_DEF => true, |
@@ -807,7 +813,7 @@ pub fn handle_document_highlight( | |||
807 | params: req::TextDocumentPositionParams, | 813 | params: req::TextDocumentPositionParams, |
808 | ) -> Result<Option<Vec<DocumentHighlight>>> { | 814 | ) -> Result<Option<Vec<DocumentHighlight>>> { |
809 | let file_id = params.text_document.try_conv_with(&world)?; | 815 | let file_id = params.text_document.try_conv_with(&world)?; |
810 | let line_index = world.analysis().file_line_index(file_id); | 816 | let line_index = world.analysis().file_line_index(file_id)?; |
811 | 817 | ||
812 | let refs = match world.analysis().find_all_refs(params.try_conv_with(&world)?)? { | 818 | let refs = match world.analysis().find_all_refs(params.try_conv_with(&world)?)? { |
813 | None => return Ok(None), | 819 | None => return Ok(None), |
@@ -826,7 +832,7 @@ pub fn publish_diagnostics( | |||
826 | file_id: FileId, | 832 | file_id: FileId, |
827 | ) -> Result<req::PublishDiagnosticsParams> { | 833 | ) -> Result<req::PublishDiagnosticsParams> { |
828 | let uri = world.file_id_to_uri(file_id)?; | 834 | let uri = world.file_id_to_uri(file_id)?; |
829 | let line_index = world.analysis().file_line_index(file_id); | 835 | let line_index = world.analysis().file_line_index(file_id)?; |
830 | let diagnostics = world | 836 | let diagnostics = world |
831 | .analysis() | 837 | .analysis() |
832 | .diagnostics(file_id)? | 838 | .diagnostics(file_id)? |
@@ -852,7 +858,7 @@ pub fn publish_decorations( | |||
852 | } | 858 | } |
853 | 859 | ||
854 | fn highlight(world: &WorldSnapshot, file_id: FileId) -> Result<Vec<Decoration>> { | 860 | fn highlight(world: &WorldSnapshot, file_id: FileId) -> Result<Vec<Decoration>> { |
855 | let line_index = world.analysis().file_line_index(file_id); | 861 | let line_index = world.analysis().file_line_index(file_id)?; |
856 | let res = world | 862 | let res = world |
857 | .analysis() | 863 | .analysis() |
858 | .highlight(file_id)? | 864 | .highlight(file_id)? |
@@ -881,7 +887,7 @@ pub fn handle_inlay_hints( | |||
881 | ) -> Result<Vec<InlayHint>> { | 887 | ) -> Result<Vec<InlayHint>> { |
882 | let file_id = params.text_document.try_conv_with(&world)?; | 888 | let file_id = params.text_document.try_conv_with(&world)?; |
883 | let analysis = world.analysis(); | 889 | let analysis = world.analysis(); |
884 | let line_index = analysis.file_line_index(file_id); | 890 | let line_index = analysis.file_line_index(file_id)?; |
885 | Ok(analysis | 891 | Ok(analysis |
886 | .inlay_hints(file_id)? | 892 | .inlay_hints(file_id)? |
887 | .into_iter() | 893 | .into_iter() |
@@ -891,6 +897,12 @@ pub fn handle_inlay_hints( | |||
891 | kind: match api_type.kind { | 897 | kind: match api_type.kind { |
892 | ra_ide_api::InlayKind::LetBindingType => InlayKind::LetBindingType, | 898 | ra_ide_api::InlayKind::LetBindingType => InlayKind::LetBindingType, |
893 | ra_ide_api::InlayKind::ClosureParameterType => InlayKind::ClosureParameterType, | 899 | ra_ide_api::InlayKind::ClosureParameterType => InlayKind::ClosureParameterType, |
900 | ra_ide_api::InlayKind::ForExpressionBindingType => { | ||
901 | InlayKind::ForExpressionBindingType | ||
902 | } | ||
903 | ra_ide_api::InlayKind::IfExpressionType => InlayKind::IfExpressionType, | ||
904 | ra_ide_api::InlayKind::WhileLetExpressionType => InlayKind::WhileLetExpressionType, | ||
905 | ra_ide_api::InlayKind::MatchArmType => InlayKind::MatchArmType, | ||
894 | }, | 906 | }, |
895 | }) | 907 | }) |
896 | .collect()) | 908 | .collect()) |
diff --git a/crates/ra_lsp_server/src/req.rs b/crates/ra_lsp_server/src/req.rs index 916185f99..570438643 100644 --- a/crates/ra_lsp_server/src/req.rs +++ b/crates/ra_lsp_server/src/req.rs | |||
@@ -215,6 +215,10 @@ pub struct InlayHintsParams { | |||
215 | pub enum InlayKind { | 215 | pub enum InlayKind { |
216 | LetBindingType, | 216 | LetBindingType, |
217 | ClosureParameterType, | 217 | ClosureParameterType, |
218 | ForExpressionBindingType, | ||
219 | IfExpressionType, | ||
220 | WhileLetExpressionType, | ||
221 | MatchArmType, | ||
218 | } | 222 | } |
219 | 223 | ||
220 | #[derive(Debug, Deserialize, Serialize)] | 224 | #[derive(Debug, Deserialize, Serialize)] |
diff --git a/crates/ra_lsp_server/src/world.rs b/crates/ra_lsp_server/src/world.rs index 9fd654305..1d7755910 100644 --- a/crates/ra_lsp_server/src/world.rs +++ b/crates/ra_lsp_server/src/world.rs | |||
@@ -215,7 +215,12 @@ impl WorldSnapshot { | |||
215 | } | 215 | } |
216 | } | 216 | } |
217 | res.push_str("\nanalysis:\n"); | 217 | res.push_str("\nanalysis:\n"); |
218 | res.push_str(&self.analysis.status()); | 218 | res.push_str( |
219 | &self | ||
220 | .analysis | ||
221 | .status() | ||
222 | .unwrap_or_else(|_| "Analysis retrieval was cancelled".to_owned()), | ||
223 | ); | ||
219 | res | 224 | res |
220 | } | 225 | } |
221 | 226 | ||
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs index 6bda04141..d98953a7e 100644 --- a/crates/ra_parser/src/grammar/expressions/atom.rs +++ b/crates/ra_parser/src/grammar/expressions/atom.rs | |||
@@ -43,6 +43,7 @@ pub(super) const ATOM_EXPR_FIRST: TokenSet = | |||
43 | L_BRACK, | 43 | L_BRACK, |
44 | PIPE, | 44 | PIPE, |
45 | MOVE_KW, | 45 | MOVE_KW, |
46 | BOX_KW, | ||
46 | IF_KW, | 47 | IF_KW, |
47 | WHILE_KW, | 48 | WHILE_KW, |
48 | MATCH_KW, | 49 | MATCH_KW, |
@@ -529,6 +530,8 @@ fn try_block_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker { | |||
529 | // test box_expr | 530 | // test box_expr |
530 | // fn foo() { | 531 | // fn foo() { |
531 | // let x = box 1i32; | 532 | // let x = box 1i32; |
533 | // let y = (box 1i32, box 2i32); | ||
534 | // let z = Foo(box 1i32, box 2i32); | ||
532 | // } | 535 | // } |
533 | fn box_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker { | 536 | fn box_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker { |
534 | assert!(p.at(T![box])); | 537 | assert!(p.at(T![box])); |
diff --git a/crates/ra_syntax/Cargo.toml b/crates/ra_syntax/Cargo.toml index 9ef8dee5d..40d63ef7a 100644 --- a/crates/ra_syntax/Cargo.toml +++ b/crates/ra_syntax/Cargo.toml | |||
@@ -10,8 +10,8 @@ repository = "https://github.com/rust-analyzer/rust-analyzer" | |||
10 | [dependencies] | 10 | [dependencies] |
11 | unicode-xid = "0.1.0" | 11 | unicode-xid = "0.1.0" |
12 | itertools = "0.8.0" | 12 | itertools = "0.8.0" |
13 | rowan = "0.6.0-pre.1" | 13 | rowan = "0.6.0" |
14 | ra_rustc_lexer = { version = "0.1.0-pre.1", features = [ "unicode-xid" ] } | 14 | ra_rustc_lexer = { version = "0.1.0-pre.2" } |
15 | 15 | ||
16 | # ideally, `serde` should be enabled by `ra_lsp_server`, but we enable it here | 16 | # ideally, `serde` should be enabled by `ra_lsp_server`, but we enable it here |
17 | # to reduce number of compilations | 17 | # to reduce number of compilations |
diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs index 7f69b86e1..4c4e0580a 100644 --- a/crates/ra_syntax/src/lib.rs +++ b/crates/ra_syntax/src/lib.rs | |||
@@ -24,6 +24,8 @@ mod syntax_error; | |||
24 | mod parsing; | 24 | mod parsing; |
25 | mod validation; | 25 | mod validation; |
26 | mod ptr; | 26 | mod ptr; |
27 | #[cfg(test)] | ||
28 | mod tests; | ||
27 | 29 | ||
28 | pub mod algo; | 30 | pub mod algo; |
29 | pub mod ast; | 31 | pub mod ast; |
diff --git a/crates/ra_syntax/tests/test.rs b/crates/ra_syntax/src/tests.rs index cabd3e9bd..fa5d2d5d8 100644 --- a/crates/ra_syntax/tests/test.rs +++ b/crates/ra_syntax/src/tests.rs | |||
@@ -1,19 +1,16 @@ | |||
1 | extern crate ra_syntax; | ||
2 | extern crate test_utils; | ||
3 | extern crate walkdir; | ||
4 | |||
5 | use std::{ | 1 | use std::{ |
6 | fmt::Write, | 2 | fmt::Write, |
7 | path::{Component, PathBuf}, | 3 | path::{Component, PathBuf}, |
8 | }; | 4 | }; |
9 | 5 | ||
10 | use ra_syntax::{fuzz, SourceFile}; | ||
11 | use test_utils::{collect_tests, dir_tests, project_dir, read_text}; | 6 | use test_utils::{collect_tests, dir_tests, project_dir, read_text}; |
12 | 7 | ||
8 | use crate::{fuzz, SourceFile}; | ||
9 | |||
13 | #[test] | 10 | #[test] |
14 | fn lexer_tests() { | 11 | fn lexer_tests() { |
15 | dir_tests(&test_data_dir(), &["lexer"], |text, _| { | 12 | dir_tests(&test_data_dir(), &["lexer"], |text, _| { |
16 | let tokens = ra_syntax::tokenize(text); | 13 | let tokens = crate::tokenize(text); |
17 | dump_tokens(&tokens, text) | 14 | dump_tokens(&tokens, text) |
18 | }) | 15 | }) |
19 | } | 16 | } |
@@ -25,7 +22,7 @@ fn parser_tests() { | |||
25 | let errors = parse.errors(); | 22 | let errors = parse.errors(); |
26 | assert_eq!( | 23 | assert_eq!( |
27 | errors, | 24 | errors, |
28 | &[] as &[ra_syntax::SyntaxError], | 25 | &[] as &[crate::SyntaxError], |
29 | "There should be no errors in the file {:?}", | 26 | "There should be no errors in the file {:?}", |
30 | path.display(), | 27 | path.display(), |
31 | ); | 28 | ); |
@@ -67,7 +64,7 @@ fn self_hosting_parsing() { | |||
67 | .filter_entry(|entry| { | 64 | .filter_entry(|entry| { |
68 | !entry.path().components().any(|component| { | 65 | !entry.path().components().any(|component| { |
69 | // Get all files which are not in the crates/ra_syntax/tests/data folder | 66 | // Get all files which are not in the crates/ra_syntax/tests/data folder |
70 | component == Component::Normal(OsStr::new("data")) | 67 | component == Component::Normal(OsStr::new("test_data")) |
71 | }) | 68 | }) |
72 | }) | 69 | }) |
73 | .map(|e| e.unwrap()) | 70 | .map(|e| e.unwrap()) |
@@ -87,10 +84,10 @@ fn self_hosting_parsing() { | |||
87 | } | 84 | } |
88 | 85 | ||
89 | fn test_data_dir() -> PathBuf { | 86 | fn test_data_dir() -> PathBuf { |
90 | project_dir().join("crates/ra_syntax/tests/data") | 87 | project_dir().join("crates/ra_syntax/test_data") |
91 | } | 88 | } |
92 | 89 | ||
93 | fn dump_tokens(tokens: &[ra_syntax::Token], text: &str) -> String { | 90 | fn dump_tokens(tokens: &[crate::Token], text: &str) -> String { |
94 | let mut acc = String::new(); | 91 | let mut acc = String::new(); |
95 | let mut offset = 0; | 92 | let mut offset = 0; |
96 | for token in tokens { | 93 | for token in tokens { |
diff --git a/crates/ra_syntax/src/validation.rs b/crates/ra_syntax/src/validation.rs index e03c02d1b..1f904434e 100644 --- a/crates/ra_syntax/src/validation.rs +++ b/crates/ra_syntax/src/validation.rs | |||
@@ -1,16 +1,99 @@ | |||
1 | mod unescape; | ||
2 | |||
3 | mod block; | 1 | mod block; |
4 | mod field_expr; | 2 | mod field_expr; |
5 | 3 | ||
4 | use ra_rustc_lexer::unescape; | ||
5 | |||
6 | use crate::{ | 6 | use crate::{ |
7 | algo::visit::{visitor_ctx, VisitorCtx}, | 7 | algo::visit::{visitor_ctx, VisitorCtx}, |
8 | ast, SyntaxError, | 8 | ast, SyntaxError, SyntaxErrorKind, |
9 | SyntaxKind::{BYTE, BYTE_STRING, CHAR, STRING}, | 9 | SyntaxKind::{BYTE, BYTE_STRING, CHAR, STRING}, |
10 | SyntaxNode, TextUnit, T, | 10 | SyntaxNode, TextUnit, T, |
11 | }; | 11 | }; |
12 | 12 | ||
13 | pub(crate) use unescape::EscapeError; | 13 | #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] |
14 | pub enum EscapeError { | ||
15 | ZeroChars, | ||
16 | MoreThanOneChar, | ||
17 | LoneSlash, | ||
18 | InvalidEscape, | ||
19 | BareCarriageReturn, | ||
20 | EscapeOnlyChar, | ||
21 | TooShortHexEscape, | ||
22 | InvalidCharInHexEscape, | ||
23 | OutOfRangeHexEscape, | ||
24 | NoBraceInUnicodeEscape, | ||
25 | InvalidCharInUnicodeEscape, | ||
26 | EmptyUnicodeEscape, | ||
27 | UnclosedUnicodeEscape, | ||
28 | LeadingUnderscoreUnicodeEscape, | ||
29 | OverlongUnicodeEscape, | ||
30 | LoneSurrogateUnicodeEscape, | ||
31 | OutOfRangeUnicodeEscape, | ||
32 | UnicodeEscapeInByte, | ||
33 | NonAsciiCharInByte, | ||
34 | } | ||
35 | |||
36 | impl From<ra_rustc_lexer::unescape::EscapeError> for EscapeError { | ||
37 | fn from(err: ra_rustc_lexer::unescape::EscapeError) -> Self { | ||
38 | match err { | ||
39 | ra_rustc_lexer::unescape::EscapeError::ZeroChars => EscapeError::ZeroChars, | ||
40 | ra_rustc_lexer::unescape::EscapeError::MoreThanOneChar => EscapeError::MoreThanOneChar, | ||
41 | ra_rustc_lexer::unescape::EscapeError::LoneSlash => EscapeError::LoneSlash, | ||
42 | ra_rustc_lexer::unescape::EscapeError::InvalidEscape => EscapeError::InvalidEscape, | ||
43 | ra_rustc_lexer::unescape::EscapeError::BareCarriageReturn | ||
44 | | ra_rustc_lexer::unescape::EscapeError::BareCarriageReturnInRawString => { | ||
45 | EscapeError::BareCarriageReturn | ||
46 | } | ||
47 | ra_rustc_lexer::unescape::EscapeError::EscapeOnlyChar => EscapeError::EscapeOnlyChar, | ||
48 | ra_rustc_lexer::unescape::EscapeError::TooShortHexEscape => { | ||
49 | EscapeError::TooShortHexEscape | ||
50 | } | ||
51 | ra_rustc_lexer::unescape::EscapeError::InvalidCharInHexEscape => { | ||
52 | EscapeError::InvalidCharInHexEscape | ||
53 | } | ||
54 | ra_rustc_lexer::unescape::EscapeError::OutOfRangeHexEscape => { | ||
55 | EscapeError::OutOfRangeHexEscape | ||
56 | } | ||
57 | ra_rustc_lexer::unescape::EscapeError::NoBraceInUnicodeEscape => { | ||
58 | EscapeError::NoBraceInUnicodeEscape | ||
59 | } | ||
60 | ra_rustc_lexer::unescape::EscapeError::InvalidCharInUnicodeEscape => { | ||
61 | EscapeError::InvalidCharInUnicodeEscape | ||
62 | } | ||
63 | ra_rustc_lexer::unescape::EscapeError::EmptyUnicodeEscape => { | ||
64 | EscapeError::EmptyUnicodeEscape | ||
65 | } | ||
66 | ra_rustc_lexer::unescape::EscapeError::UnclosedUnicodeEscape => { | ||
67 | EscapeError::UnclosedUnicodeEscape | ||
68 | } | ||
69 | ra_rustc_lexer::unescape::EscapeError::LeadingUnderscoreUnicodeEscape => { | ||
70 | EscapeError::LeadingUnderscoreUnicodeEscape | ||
71 | } | ||
72 | ra_rustc_lexer::unescape::EscapeError::OverlongUnicodeEscape => { | ||
73 | EscapeError::OverlongUnicodeEscape | ||
74 | } | ||
75 | ra_rustc_lexer::unescape::EscapeError::LoneSurrogateUnicodeEscape => { | ||
76 | EscapeError::LoneSurrogateUnicodeEscape | ||
77 | } | ||
78 | ra_rustc_lexer::unescape::EscapeError::OutOfRangeUnicodeEscape => { | ||
79 | EscapeError::OutOfRangeUnicodeEscape | ||
80 | } | ||
81 | ra_rustc_lexer::unescape::EscapeError::UnicodeEscapeInByte => { | ||
82 | EscapeError::UnicodeEscapeInByte | ||
83 | } | ||
84 | ra_rustc_lexer::unescape::EscapeError::NonAsciiCharInByte | ||
85 | | ra_rustc_lexer::unescape::EscapeError::NonAsciiCharInByteString => { | ||
86 | EscapeError::NonAsciiCharInByte | ||
87 | } | ||
88 | } | ||
89 | } | ||
90 | } | ||
91 | |||
92 | impl From<ra_rustc_lexer::unescape::EscapeError> for SyntaxErrorKind { | ||
93 | fn from(err: ra_rustc_lexer::unescape::EscapeError) -> Self { | ||
94 | SyntaxErrorKind::EscapeError(err.into()) | ||
95 | } | ||
96 | } | ||
14 | 97 | ||
15 | pub(crate) fn validate(root: &SyntaxNode) -> Vec<SyntaxError> { | 98 | pub(crate) fn validate(root: &SyntaxNode) -> Vec<SyntaxError> { |
16 | let mut errors = Vec::new(); | 99 | let mut errors = Vec::new(); |
diff --git a/crates/ra_syntax/src/validation/unescape.rs b/crates/ra_syntax/src/validation/unescape.rs deleted file mode 100644 index 7eed6c663..000000000 --- a/crates/ra_syntax/src/validation/unescape.rs +++ /dev/null | |||
@@ -1,521 +0,0 @@ | |||
1 | //! Utilities for validating string and char literals and turning them into | ||
2 | //! values they represent. | ||
3 | //! | ||
4 | //! This file is copy-pasted from the compiler | ||
5 | //! | ||
6 | //! https://github.com/rust-lang/rust/blob/c6ac57564852cb6e2d0db60f7b46d9eb98d4b449/src/libsyntax/parse/unescape.rs | ||
7 | //! | ||
8 | //! Hopefully, we'll share this code in a proper way some day | ||
9 | |||
10 | use std::ops::Range; | ||
11 | use std::str::Chars; | ||
12 | |||
13 | #[derive(Debug, PartialEq, Eq, Clone, Hash)] | ||
14 | pub enum EscapeError { | ||
15 | ZeroChars, | ||
16 | MoreThanOneChar, | ||
17 | |||
18 | LoneSlash, | ||
19 | InvalidEscape, | ||
20 | BareCarriageReturn, | ||
21 | EscapeOnlyChar, | ||
22 | |||
23 | TooShortHexEscape, | ||
24 | InvalidCharInHexEscape, | ||
25 | OutOfRangeHexEscape, | ||
26 | |||
27 | NoBraceInUnicodeEscape, | ||
28 | InvalidCharInUnicodeEscape, | ||
29 | EmptyUnicodeEscape, | ||
30 | UnclosedUnicodeEscape, | ||
31 | LeadingUnderscoreUnicodeEscape, | ||
32 | OverlongUnicodeEscape, | ||
33 | LoneSurrogateUnicodeEscape, | ||
34 | OutOfRangeUnicodeEscape, | ||
35 | |||
36 | UnicodeEscapeInByte, | ||
37 | NonAsciiCharInByte, | ||
38 | } | ||
39 | |||
40 | /// Takes a contents of a char literal (without quotes), and returns an | ||
41 | /// unescaped char or an error | ||
42 | pub(crate) fn unescape_char(literal_text: &str) -> Result<char, (usize, EscapeError)> { | ||
43 | let mut chars = literal_text.chars(); | ||
44 | unescape_char_or_byte(&mut chars, Mode::Char) | ||
45 | .map_err(|err| (literal_text.len() - chars.as_str().len(), err)) | ||
46 | } | ||
47 | |||
48 | /// Takes a contents of a string literal (without quotes) and produces a | ||
49 | /// sequence of escaped characters or errors. | ||
50 | pub(crate) fn unescape_str<F>(literal_text: &str, callback: &mut F) | ||
51 | where | ||
52 | F: FnMut(Range<usize>, Result<char, EscapeError>), | ||
53 | { | ||
54 | unescape_str_or_byte_str(literal_text, Mode::Str, callback) | ||
55 | } | ||
56 | |||
57 | pub(crate) fn unescape_byte(literal_text: &str) -> Result<u8, (usize, EscapeError)> { | ||
58 | let mut chars = literal_text.chars(); | ||
59 | unescape_char_or_byte(&mut chars, Mode::Byte) | ||
60 | .map(byte_from_char) | ||
61 | .map_err(|err| (literal_text.len() - chars.as_str().len(), err)) | ||
62 | } | ||
63 | |||
64 | /// Takes a contents of a string literal (without quotes) and produces a | ||
65 | /// sequence of escaped characters or errors. | ||
66 | pub(crate) fn unescape_byte_str<F>(literal_text: &str, callback: &mut F) | ||
67 | where | ||
68 | F: FnMut(Range<usize>, Result<u8, EscapeError>), | ||
69 | { | ||
70 | unescape_str_or_byte_str(literal_text, Mode::ByteStr, &mut |range, char| { | ||
71 | callback(range, char.map(byte_from_char)) | ||
72 | }) | ||
73 | } | ||
74 | |||
75 | #[derive(Debug, Clone, Copy)] | ||
76 | pub(crate) enum Mode { | ||
77 | Char, | ||
78 | Str, | ||
79 | Byte, | ||
80 | ByteStr, | ||
81 | } | ||
82 | |||
83 | impl Mode { | ||
84 | fn in_single_quotes(self) -> bool { | ||
85 | match self { | ||
86 | Mode::Char | Mode::Byte => true, | ||
87 | Mode::Str | Mode::ByteStr => false, | ||
88 | } | ||
89 | } | ||
90 | |||
91 | pub(crate) fn in_double_quotes(self) -> bool { | ||
92 | !self.in_single_quotes() | ||
93 | } | ||
94 | |||
95 | pub(crate) fn is_bytes(self) -> bool { | ||
96 | match self { | ||
97 | Mode::Byte | Mode::ByteStr => true, | ||
98 | Mode::Char | Mode::Str => false, | ||
99 | } | ||
100 | } | ||
101 | } | ||
102 | |||
103 | fn scan_escape(first_char: char, chars: &mut Chars<'_>, mode: Mode) -> Result<char, EscapeError> { | ||
104 | if first_char != '\\' { | ||
105 | return match first_char { | ||
106 | '\t' | '\n' => Err(EscapeError::EscapeOnlyChar), | ||
107 | '\r' => Err(if chars.clone().next() == Some('\n') { | ||
108 | EscapeError::EscapeOnlyChar | ||
109 | } else { | ||
110 | EscapeError::BareCarriageReturn | ||
111 | }), | ||
112 | '\'' if mode.in_single_quotes() => Err(EscapeError::EscapeOnlyChar), | ||
113 | '"' if mode.in_double_quotes() => Err(EscapeError::EscapeOnlyChar), | ||
114 | _ => { | ||
115 | if mode.is_bytes() && !first_char.is_ascii() { | ||
116 | return Err(EscapeError::NonAsciiCharInByte); | ||
117 | } | ||
118 | Ok(first_char) | ||
119 | } | ||
120 | }; | ||
121 | } | ||
122 | |||
123 | let second_char = chars.next().ok_or(EscapeError::LoneSlash)?; | ||
124 | |||
125 | let res = match second_char { | ||
126 | '"' => '"', | ||
127 | 'n' => '\n', | ||
128 | 'r' => '\r', | ||
129 | 't' => '\t', | ||
130 | '\\' => '\\', | ||
131 | '\'' => '\'', | ||
132 | '0' => '\0', | ||
133 | |||
134 | 'x' => { | ||
135 | let hi = chars.next().ok_or(EscapeError::TooShortHexEscape)?; | ||
136 | let hi = hi.to_digit(16).ok_or(EscapeError::InvalidCharInHexEscape)?; | ||
137 | |||
138 | let lo = chars.next().ok_or(EscapeError::TooShortHexEscape)?; | ||
139 | let lo = lo.to_digit(16).ok_or(EscapeError::InvalidCharInHexEscape)?; | ||
140 | |||
141 | let value = hi * 16 + lo; | ||
142 | |||
143 | if !mode.is_bytes() && !is_ascii(value) { | ||
144 | return Err(EscapeError::OutOfRangeHexEscape); | ||
145 | } | ||
146 | let value = value as u8; | ||
147 | |||
148 | value as char | ||
149 | } | ||
150 | |||
151 | 'u' => { | ||
152 | if chars.next() != Some('{') { | ||
153 | return Err(EscapeError::NoBraceInUnicodeEscape); | ||
154 | } | ||
155 | |||
156 | let mut n_digits = 1; | ||
157 | let mut value: u32 = match chars.next().ok_or(EscapeError::UnclosedUnicodeEscape)? { | ||
158 | '_' => return Err(EscapeError::LeadingUnderscoreUnicodeEscape), | ||
159 | '}' => return Err(EscapeError::EmptyUnicodeEscape), | ||
160 | c => c.to_digit(16).ok_or(EscapeError::InvalidCharInUnicodeEscape)?, | ||
161 | }; | ||
162 | |||
163 | loop { | ||
164 | match chars.next() { | ||
165 | None => return Err(EscapeError::UnclosedUnicodeEscape), | ||
166 | Some('_') => continue, | ||
167 | Some('}') => { | ||
168 | if n_digits > 6 { | ||
169 | return Err(EscapeError::OverlongUnicodeEscape); | ||
170 | } | ||
171 | if mode.is_bytes() { | ||
172 | return Err(EscapeError::UnicodeEscapeInByte); | ||
173 | } | ||
174 | |||
175 | break std::char::from_u32(value).ok_or_else(|| { | ||
176 | if value > 0x0010_FFFF { | ||
177 | EscapeError::OutOfRangeUnicodeEscape | ||
178 | } else { | ||
179 | EscapeError::LoneSurrogateUnicodeEscape | ||
180 | } | ||
181 | })?; | ||
182 | } | ||
183 | Some(c) => { | ||
184 | let digit = | ||
185 | c.to_digit(16).ok_or(EscapeError::InvalidCharInUnicodeEscape)?; | ||
186 | n_digits += 1; | ||
187 | if n_digits > 6 { | ||
188 | continue; | ||
189 | } | ||
190 | let digit = digit as u32; | ||
191 | value = value * 16 + digit; | ||
192 | } | ||
193 | }; | ||
194 | } | ||
195 | } | ||
196 | _ => return Err(EscapeError::InvalidEscape), | ||
197 | }; | ||
198 | Ok(res) | ||
199 | } | ||
200 | |||
201 | fn unescape_char_or_byte(chars: &mut Chars<'_>, mode: Mode) -> Result<char, EscapeError> { | ||
202 | let first_char = chars.next().ok_or(EscapeError::ZeroChars)?; | ||
203 | let res = scan_escape(first_char, chars, mode)?; | ||
204 | if chars.next().is_some() { | ||
205 | return Err(EscapeError::MoreThanOneChar); | ||
206 | } | ||
207 | Ok(res) | ||
208 | } | ||
209 | |||
210 | /// Takes a contents of a string literal (without quotes) and produces a | ||
211 | /// sequence of escaped characters or errors. | ||
212 | fn unescape_str_or_byte_str<F>(src: &str, mode: Mode, callback: &mut F) | ||
213 | where | ||
214 | F: FnMut(Range<usize>, Result<char, EscapeError>), | ||
215 | { | ||
216 | assert!(mode.in_double_quotes()); | ||
217 | let initial_len = src.len(); | ||
218 | let mut chars = src.chars(); | ||
219 | while let Some(first_char) = chars.next() { | ||
220 | let start = initial_len - chars.as_str().len() - first_char.len_utf8(); | ||
221 | |||
222 | let unescaped_char = match first_char { | ||
223 | '\\' => { | ||
224 | let (second_char, third_char) = { | ||
225 | let mut chars = chars.clone(); | ||
226 | (chars.next(), chars.next()) | ||
227 | }; | ||
228 | match (second_char, third_char) { | ||
229 | (Some('\n'), _) | (Some('\r'), Some('\n')) => { | ||
230 | skip_ascii_whitespace(&mut chars); | ||
231 | continue; | ||
232 | } | ||
233 | _ => scan_escape(first_char, &mut chars, mode), | ||
234 | } | ||
235 | } | ||
236 | '\r' => { | ||
237 | let second_char = chars.clone().next(); | ||
238 | if second_char == Some('\n') { | ||
239 | chars.next(); | ||
240 | Ok('\n') | ||
241 | } else { | ||
242 | scan_escape(first_char, &mut chars, mode) | ||
243 | } | ||
244 | } | ||
245 | '\n' => Ok('\n'), | ||
246 | '\t' => Ok('\t'), | ||
247 | _ => scan_escape(first_char, &mut chars, mode), | ||
248 | }; | ||
249 | let end = initial_len - chars.as_str().len(); | ||
250 | callback(start..end, unescaped_char); | ||
251 | } | ||
252 | |||
253 | fn skip_ascii_whitespace(chars: &mut Chars<'_>) { | ||
254 | let str = chars.as_str(); | ||
255 | let first_non_space = str | ||
256 | .bytes() | ||
257 | .position(|b| b != b' ' && b != b'\t' && b != b'\n' && b != b'\r') | ||
258 | .unwrap_or_else(|| str.len()); | ||
259 | *chars = str[first_non_space..].chars() | ||
260 | } | ||
261 | } | ||
262 | |||
263 | fn byte_from_char(c: char) -> u8 { | ||
264 | let res = c as u32; | ||
265 | assert!(res <= u32::from(u8::max_value()), "guaranteed because of Mode::Byte"); | ||
266 | res as u8 | ||
267 | } | ||
268 | |||
269 | fn is_ascii(x: u32) -> bool { | ||
270 | x <= 0x7F | ||
271 | } | ||
272 | |||
273 | #[cfg(test)] | ||
274 | mod tests { | ||
275 | use super::*; | ||
276 | |||
277 | #[test] | ||
278 | fn test_unescape_char_bad() { | ||
279 | fn check(literal_text: &str, expected_error: EscapeError) { | ||
280 | let actual_result = unescape_char(literal_text).map_err(|(_offset, err)| err); | ||
281 | assert_eq!(actual_result, Err(expected_error)); | ||
282 | } | ||
283 | |||
284 | check("", EscapeError::ZeroChars); | ||
285 | check(r"\", EscapeError::LoneSlash); | ||
286 | |||
287 | check("\n", EscapeError::EscapeOnlyChar); | ||
288 | check("\r\n", EscapeError::EscapeOnlyChar); | ||
289 | check("\t", EscapeError::EscapeOnlyChar); | ||
290 | check("'", EscapeError::EscapeOnlyChar); | ||
291 | check("\r", EscapeError::BareCarriageReturn); | ||
292 | |||
293 | check("spam", EscapeError::MoreThanOneChar); | ||
294 | check(r"\x0ff", EscapeError::MoreThanOneChar); | ||
295 | check(r#"\"a"#, EscapeError::MoreThanOneChar); | ||
296 | check(r"\na", EscapeError::MoreThanOneChar); | ||
297 | check(r"\ra", EscapeError::MoreThanOneChar); | ||
298 | check(r"\ta", EscapeError::MoreThanOneChar); | ||
299 | check(r"\\a", EscapeError::MoreThanOneChar); | ||
300 | check(r"\'a", EscapeError::MoreThanOneChar); | ||
301 | check(r"\0a", EscapeError::MoreThanOneChar); | ||
302 | check(r"\u{0}x", EscapeError::MoreThanOneChar); | ||
303 | check(r"\u{1F63b}}", EscapeError::MoreThanOneChar); | ||
304 | |||
305 | check(r"\v", EscapeError::InvalidEscape); | ||
306 | check(r"\💩", EscapeError::InvalidEscape); | ||
307 | check(r"\●", EscapeError::InvalidEscape); | ||
308 | |||
309 | check(r"\x", EscapeError::TooShortHexEscape); | ||
310 | check(r"\x0", EscapeError::TooShortHexEscape); | ||
311 | check(r"\xf", EscapeError::TooShortHexEscape); | ||
312 | check(r"\xa", EscapeError::TooShortHexEscape); | ||
313 | check(r"\xx", EscapeError::InvalidCharInHexEscape); | ||
314 | check(r"\xы", EscapeError::InvalidCharInHexEscape); | ||
315 | check(r"\x🦀", EscapeError::InvalidCharInHexEscape); | ||
316 | check(r"\xtt", EscapeError::InvalidCharInHexEscape); | ||
317 | check(r"\xff", EscapeError::OutOfRangeHexEscape); | ||
318 | check(r"\xFF", EscapeError::OutOfRangeHexEscape); | ||
319 | check(r"\x80", EscapeError::OutOfRangeHexEscape); | ||
320 | |||
321 | check(r"\u", EscapeError::NoBraceInUnicodeEscape); | ||
322 | check(r"\u[0123]", EscapeError::NoBraceInUnicodeEscape); | ||
323 | check(r"\u{0x}", EscapeError::InvalidCharInUnicodeEscape); | ||
324 | check(r"\u{", EscapeError::UnclosedUnicodeEscape); | ||
325 | check(r"\u{0000", EscapeError::UnclosedUnicodeEscape); | ||
326 | check(r"\u{}", EscapeError::EmptyUnicodeEscape); | ||
327 | check(r"\u{_0000}", EscapeError::LeadingUnderscoreUnicodeEscape); | ||
328 | check(r"\u{0000000}", EscapeError::OverlongUnicodeEscape); | ||
329 | check(r"\u{FFFFFF}", EscapeError::OutOfRangeUnicodeEscape); | ||
330 | check(r"\u{ffffff}", EscapeError::OutOfRangeUnicodeEscape); | ||
331 | check(r"\u{ffffff}", EscapeError::OutOfRangeUnicodeEscape); | ||
332 | |||
333 | check(r"\u{DC00}", EscapeError::LoneSurrogateUnicodeEscape); | ||
334 | check(r"\u{DDDD}", EscapeError::LoneSurrogateUnicodeEscape); | ||
335 | check(r"\u{DFFF}", EscapeError::LoneSurrogateUnicodeEscape); | ||
336 | |||
337 | check(r"\u{D800}", EscapeError::LoneSurrogateUnicodeEscape); | ||
338 | check(r"\u{DAAA}", EscapeError::LoneSurrogateUnicodeEscape); | ||
339 | check(r"\u{DBFF}", EscapeError::LoneSurrogateUnicodeEscape); | ||
340 | } | ||
341 | |||
342 | #[test] | ||
343 | fn test_unescape_char_good() { | ||
344 | fn check(literal_text: &str, expected_char: char) { | ||
345 | let actual_result = unescape_char(literal_text); | ||
346 | assert_eq!(actual_result, Ok(expected_char)); | ||
347 | } | ||
348 | |||
349 | check("a", 'a'); | ||
350 | check("ы", 'ы'); | ||
351 | check("🦀", '🦀'); | ||
352 | |||
353 | check(r#"\""#, '"'); | ||
354 | check(r"\n", '\n'); | ||
355 | check(r"\r", '\r'); | ||
356 | check(r"\t", '\t'); | ||
357 | check(r"\\", '\\'); | ||
358 | check(r"\'", '\''); | ||
359 | check(r"\0", '\0'); | ||
360 | |||
361 | check(r"\x00", '\0'); | ||
362 | check(r"\x5a", 'Z'); | ||
363 | check(r"\x5A", 'Z'); | ||
364 | check(r"\x7f", 127 as char); | ||
365 | |||
366 | check(r"\u{0}", '\0'); | ||
367 | check(r"\u{000000}", '\0'); | ||
368 | check(r"\u{41}", 'A'); | ||
369 | check(r"\u{0041}", 'A'); | ||
370 | check(r"\u{00_41}", 'A'); | ||
371 | check(r"\u{4__1__}", 'A'); | ||
372 | check(r"\u{1F63b}", '😻'); | ||
373 | } | ||
374 | |||
375 | #[test] | ||
376 | fn test_unescape_str_good() { | ||
377 | fn check(literal_text: &str, expected: &str) { | ||
378 | let mut buf = Ok(String::with_capacity(literal_text.len())); | ||
379 | unescape_str(literal_text, &mut |range, c| { | ||
380 | if let Ok(b) = &mut buf { | ||
381 | match c { | ||
382 | Ok(c) => b.push(c), | ||
383 | Err(e) => buf = Err((range, e)), | ||
384 | } | ||
385 | } | ||
386 | }); | ||
387 | let buf = buf.as_ref().map(|it| it.as_ref()); | ||
388 | assert_eq!(buf, Ok(expected)) | ||
389 | } | ||
390 | |||
391 | check("foo", "foo"); | ||
392 | check("", ""); | ||
393 | check(" \t\n\r\n", " \t\n\n"); | ||
394 | |||
395 | check("hello \\\n world", "hello world"); | ||
396 | check("hello \\\r\n world", "hello world"); | ||
397 | check("thread's", "thread's") | ||
398 | } | ||
399 | |||
400 | #[test] | ||
401 | fn test_unescape_byte_bad() { | ||
402 | fn check(literal_text: &str, expected_error: EscapeError) { | ||
403 | let actual_result = unescape_byte(literal_text).map_err(|(_offset, err)| err); | ||
404 | assert_eq!(actual_result, Err(expected_error)); | ||
405 | } | ||
406 | |||
407 | check("", EscapeError::ZeroChars); | ||
408 | check(r"\", EscapeError::LoneSlash); | ||
409 | |||
410 | check("\n", EscapeError::EscapeOnlyChar); | ||
411 | check("\r\n", EscapeError::EscapeOnlyChar); | ||
412 | check("\t", EscapeError::EscapeOnlyChar); | ||
413 | check("'", EscapeError::EscapeOnlyChar); | ||
414 | check("\r", EscapeError::BareCarriageReturn); | ||
415 | |||
416 | check("spam", EscapeError::MoreThanOneChar); | ||
417 | check(r"\x0ff", EscapeError::MoreThanOneChar); | ||
418 | check(r#"\"a"#, EscapeError::MoreThanOneChar); | ||
419 | check(r"\na", EscapeError::MoreThanOneChar); | ||
420 | check(r"\ra", EscapeError::MoreThanOneChar); | ||
421 | check(r"\ta", EscapeError::MoreThanOneChar); | ||
422 | check(r"\\a", EscapeError::MoreThanOneChar); | ||
423 | check(r"\'a", EscapeError::MoreThanOneChar); | ||
424 | check(r"\0a", EscapeError::MoreThanOneChar); | ||
425 | |||
426 | check(r"\v", EscapeError::InvalidEscape); | ||
427 | check(r"\💩", EscapeError::InvalidEscape); | ||
428 | check(r"\●", EscapeError::InvalidEscape); | ||
429 | |||
430 | check(r"\x", EscapeError::TooShortHexEscape); | ||
431 | check(r"\x0", EscapeError::TooShortHexEscape); | ||
432 | check(r"\xa", EscapeError::TooShortHexEscape); | ||
433 | check(r"\xf", EscapeError::TooShortHexEscape); | ||
434 | check(r"\xx", EscapeError::InvalidCharInHexEscape); | ||
435 | check(r"\xы", EscapeError::InvalidCharInHexEscape); | ||
436 | check(r"\x🦀", EscapeError::InvalidCharInHexEscape); | ||
437 | check(r"\xtt", EscapeError::InvalidCharInHexEscape); | ||
438 | |||
439 | check(r"\u", EscapeError::NoBraceInUnicodeEscape); | ||
440 | check(r"\u[0123]", EscapeError::NoBraceInUnicodeEscape); | ||
441 | check(r"\u{0x}", EscapeError::InvalidCharInUnicodeEscape); | ||
442 | check(r"\u{", EscapeError::UnclosedUnicodeEscape); | ||
443 | check(r"\u{0000", EscapeError::UnclosedUnicodeEscape); | ||
444 | check(r"\u{}", EscapeError::EmptyUnicodeEscape); | ||
445 | check(r"\u{_0000}", EscapeError::LeadingUnderscoreUnicodeEscape); | ||
446 | check(r"\u{0000000}", EscapeError::OverlongUnicodeEscape); | ||
447 | |||
448 | check("ы", EscapeError::NonAsciiCharInByte); | ||
449 | check("🦀", EscapeError::NonAsciiCharInByte); | ||
450 | |||
451 | check(r"\u{0}", EscapeError::UnicodeEscapeInByte); | ||
452 | check(r"\u{000000}", EscapeError::UnicodeEscapeInByte); | ||
453 | check(r"\u{41}", EscapeError::UnicodeEscapeInByte); | ||
454 | check(r"\u{0041}", EscapeError::UnicodeEscapeInByte); | ||
455 | check(r"\u{00_41}", EscapeError::UnicodeEscapeInByte); | ||
456 | check(r"\u{4__1__}", EscapeError::UnicodeEscapeInByte); | ||
457 | check(r"\u{1F63b}", EscapeError::UnicodeEscapeInByte); | ||
458 | check(r"\u{0}x", EscapeError::UnicodeEscapeInByte); | ||
459 | check(r"\u{1F63b}}", EscapeError::UnicodeEscapeInByte); | ||
460 | check(r"\u{FFFFFF}", EscapeError::UnicodeEscapeInByte); | ||
461 | check(r"\u{ffffff}", EscapeError::UnicodeEscapeInByte); | ||
462 | check(r"\u{ffffff}", EscapeError::UnicodeEscapeInByte); | ||
463 | check(r"\u{DC00}", EscapeError::UnicodeEscapeInByte); | ||
464 | check(r"\u{DDDD}", EscapeError::UnicodeEscapeInByte); | ||
465 | check(r"\u{DFFF}", EscapeError::UnicodeEscapeInByte); | ||
466 | check(r"\u{D800}", EscapeError::UnicodeEscapeInByte); | ||
467 | check(r"\u{DAAA}", EscapeError::UnicodeEscapeInByte); | ||
468 | check(r"\u{DBFF}", EscapeError::UnicodeEscapeInByte); | ||
469 | } | ||
470 | |||
471 | #[test] | ||
472 | fn test_unescape_byte_good() { | ||
473 | fn check(literal_text: &str, expected_byte: u8) { | ||
474 | let actual_result = unescape_byte(literal_text); | ||
475 | assert_eq!(actual_result, Ok(expected_byte)); | ||
476 | } | ||
477 | |||
478 | check("a", b'a'); | ||
479 | |||
480 | check(r#"\""#, b'"'); | ||
481 | check(r"\n", b'\n'); | ||
482 | check(r"\r", b'\r'); | ||
483 | check(r"\t", b'\t'); | ||
484 | check(r"\\", b'\\'); | ||
485 | check(r"\'", b'\''); | ||
486 | check(r"\0", b'\0'); | ||
487 | |||
488 | check(r"\x00", b'\0'); | ||
489 | check(r"\x5a", b'Z'); | ||
490 | check(r"\x5A", b'Z'); | ||
491 | check(r"\x7f", 127); | ||
492 | check(r"\x80", 128); | ||
493 | check(r"\xff", 255); | ||
494 | check(r"\xFF", 255); | ||
495 | } | ||
496 | |||
497 | #[test] | ||
498 | fn test_unescape_byte_str_good() { | ||
499 | fn check(literal_text: &str, expected: &[u8]) { | ||
500 | let mut buf = Ok(Vec::with_capacity(literal_text.len())); | ||
501 | unescape_byte_str(literal_text, &mut |range, c| { | ||
502 | if let Ok(b) = &mut buf { | ||
503 | match c { | ||
504 | Ok(c) => b.push(c), | ||
505 | Err(e) => buf = Err((range, e)), | ||
506 | } | ||
507 | } | ||
508 | }); | ||
509 | let buf = buf.as_ref().map(|it| it.as_ref()); | ||
510 | assert_eq!(buf, Ok(expected)) | ||
511 | } | ||
512 | |||
513 | check("foo", b"foo"); | ||
514 | check("", b""); | ||
515 | check(" \t\n\r\n", b" \t\n\n"); | ||
516 | |||
517 | check("hello \\\n world", b"hello world"); | ||
518 | check("hello \\\r\n world", b"hello world"); | ||
519 | check("thread's", b"thread's") | ||
520 | } | ||
521 | } | ||
diff --git a/crates/ra_syntax/tests/data/lexer/00012_block_comment.rs b/crates/ra_syntax/test_data/lexer/00012_block_comment.rs index 708aac197..708aac197 100644 --- a/crates/ra_syntax/tests/data/lexer/00012_block_comment.rs +++ b/crates/ra_syntax/test_data/lexer/00012_block_comment.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/00012_block_comment.txt b/crates/ra_syntax/test_data/lexer/00012_block_comment.txt index 9958b2518..9958b2518 100644 --- a/crates/ra_syntax/tests/data/lexer/00012_block_comment.txt +++ b/crates/ra_syntax/test_data/lexer/00012_block_comment.txt | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0001_hello.rs b/crates/ra_syntax/test_data/lexer/0001_hello.rs index 95d09f2b1..95d09f2b1 100644 --- a/crates/ra_syntax/tests/data/lexer/0001_hello.rs +++ b/crates/ra_syntax/test_data/lexer/0001_hello.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0001_hello.txt b/crates/ra_syntax/test_data/lexer/0001_hello.txt index 27a5940a9..27a5940a9 100644 --- a/crates/ra_syntax/tests/data/lexer/0001_hello.txt +++ b/crates/ra_syntax/test_data/lexer/0001_hello.txt | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0002_whitespace.rs b/crates/ra_syntax/test_data/lexer/0002_whitespace.rs index 08fce1418..08fce1418 100644 --- a/crates/ra_syntax/tests/data/lexer/0002_whitespace.rs +++ b/crates/ra_syntax/test_data/lexer/0002_whitespace.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0002_whitespace.txt b/crates/ra_syntax/test_data/lexer/0002_whitespace.txt index 01d260918..01d260918 100644 --- a/crates/ra_syntax/tests/data/lexer/0002_whitespace.txt +++ b/crates/ra_syntax/test_data/lexer/0002_whitespace.txt | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0003_ident.rs b/crates/ra_syntax/test_data/lexer/0003_ident.rs index c05c9c009..c05c9c009 100644 --- a/crates/ra_syntax/tests/data/lexer/0003_ident.rs +++ b/crates/ra_syntax/test_data/lexer/0003_ident.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0003_ident.txt b/crates/ra_syntax/test_data/lexer/0003_ident.txt index 4a0d5c053..4a0d5c053 100644 --- a/crates/ra_syntax/tests/data/lexer/0003_ident.txt +++ b/crates/ra_syntax/test_data/lexer/0003_ident.txt | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0004_numbers.rs b/crates/ra_syntax/test_data/lexer/0004_numbers.rs index dc974b553..dc974b553 100644 --- a/crates/ra_syntax/tests/data/lexer/0004_numbers.rs +++ b/crates/ra_syntax/test_data/lexer/0004_numbers.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0004_numbers.txt b/crates/ra_syntax/test_data/lexer/0004_numbers.txt index 7bb89b8ae..7bb89b8ae 100644 --- a/crates/ra_syntax/tests/data/lexer/0004_numbers.txt +++ b/crates/ra_syntax/test_data/lexer/0004_numbers.txt | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0005_symbols.rs b/crates/ra_syntax/test_data/lexer/0005_symbols.rs index 487569b5a..487569b5a 100644 --- a/crates/ra_syntax/tests/data/lexer/0005_symbols.rs +++ b/crates/ra_syntax/test_data/lexer/0005_symbols.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0005_symbols.txt b/crates/ra_syntax/test_data/lexer/0005_symbols.txt index 469a90e42..469a90e42 100644 --- a/crates/ra_syntax/tests/data/lexer/0005_symbols.txt +++ b/crates/ra_syntax/test_data/lexer/0005_symbols.txt | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0006_chars.rs b/crates/ra_syntax/test_data/lexer/0006_chars.rs index 454ee0a5f..454ee0a5f 100644 --- a/crates/ra_syntax/tests/data/lexer/0006_chars.rs +++ b/crates/ra_syntax/test_data/lexer/0006_chars.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0006_chars.txt b/crates/ra_syntax/test_data/lexer/0006_chars.txt index 950954fbc..950954fbc 100644 --- a/crates/ra_syntax/tests/data/lexer/0006_chars.txt +++ b/crates/ra_syntax/test_data/lexer/0006_chars.txt | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0007_lifetimes.rs b/crates/ra_syntax/test_data/lexer/0007_lifetimes.rs index b764f1dce..b764f1dce 100644 --- a/crates/ra_syntax/tests/data/lexer/0007_lifetimes.rs +++ b/crates/ra_syntax/test_data/lexer/0007_lifetimes.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0007_lifetimes.txt b/crates/ra_syntax/test_data/lexer/0007_lifetimes.txt index 005c29100..005c29100 100644 --- a/crates/ra_syntax/tests/data/lexer/0007_lifetimes.txt +++ b/crates/ra_syntax/test_data/lexer/0007_lifetimes.txt | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0008_byte_strings.rs b/crates/ra_syntax/test_data/lexer/0008_byte_strings.rs index b54930f5e..b54930f5e 100644 --- a/crates/ra_syntax/tests/data/lexer/0008_byte_strings.rs +++ b/crates/ra_syntax/test_data/lexer/0008_byte_strings.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0008_byte_strings.txt b/crates/ra_syntax/test_data/lexer/0008_byte_strings.txt index bc03b51a8..bc03b51a8 100644 --- a/crates/ra_syntax/tests/data/lexer/0008_byte_strings.txt +++ b/crates/ra_syntax/test_data/lexer/0008_byte_strings.txt | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0009_strings.rs b/crates/ra_syntax/test_data/lexer/0009_strings.rs index 4ddb5bffc..4ddb5bffc 100644 --- a/crates/ra_syntax/tests/data/lexer/0009_strings.rs +++ b/crates/ra_syntax/test_data/lexer/0009_strings.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0009_strings.txt b/crates/ra_syntax/test_data/lexer/0009_strings.txt index 4cb4d711d..4cb4d711d 100644 --- a/crates/ra_syntax/tests/data/lexer/0009_strings.txt +++ b/crates/ra_syntax/test_data/lexer/0009_strings.txt | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0010_comments.rs b/crates/ra_syntax/test_data/lexer/0010_comments.rs index 71bdd1f9c..71bdd1f9c 100644 --- a/crates/ra_syntax/tests/data/lexer/0010_comments.rs +++ b/crates/ra_syntax/test_data/lexer/0010_comments.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0010_comments.txt b/crates/ra_syntax/test_data/lexer/0010_comments.txt index 3c997de3f..3c997de3f 100644 --- a/crates/ra_syntax/tests/data/lexer/0010_comments.txt +++ b/crates/ra_syntax/test_data/lexer/0010_comments.txt | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0011_keywords.rs b/crates/ra_syntax/test_data/lexer/0011_keywords.rs index 1e91bff4e..1e91bff4e 100644 --- a/crates/ra_syntax/tests/data/lexer/0011_keywords.rs +++ b/crates/ra_syntax/test_data/lexer/0011_keywords.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0011_keywords.txt b/crates/ra_syntax/test_data/lexer/0011_keywords.txt index 22c00eefb..22c00eefb 100644 --- a/crates/ra_syntax/tests/data/lexer/0011_keywords.txt +++ b/crates/ra_syntax/test_data/lexer/0011_keywords.txt | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0013_raw_strings.rs b/crates/ra_syntax/test_data/lexer/0013_raw_strings.rs index e5ed0b693..e5ed0b693 100644 --- a/crates/ra_syntax/tests/data/lexer/0013_raw_strings.rs +++ b/crates/ra_syntax/test_data/lexer/0013_raw_strings.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0013_raw_strings.txt b/crates/ra_syntax/test_data/lexer/0013_raw_strings.txt index 9cf0957d1..9cf0957d1 100644 --- a/crates/ra_syntax/tests/data/lexer/0013_raw_strings.txt +++ b/crates/ra_syntax/test_data/lexer/0013_raw_strings.txt | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0014_unclosed_char.rs b/crates/ra_syntax/test_data/lexer/0014_unclosed_char.rs index 9c0007077..9c0007077 100644 --- a/crates/ra_syntax/tests/data/lexer/0014_unclosed_char.rs +++ b/crates/ra_syntax/test_data/lexer/0014_unclosed_char.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0014_unclosed_char.txt b/crates/ra_syntax/test_data/lexer/0014_unclosed_char.txt index 737a300ee..737a300ee 100644 --- a/crates/ra_syntax/tests/data/lexer/0014_unclosed_char.txt +++ b/crates/ra_syntax/test_data/lexer/0014_unclosed_char.txt | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0015_unclosed_string.rs b/crates/ra_syntax/test_data/lexer/0015_unclosed_string.rs index d771a26d4..d771a26d4 100644 --- a/crates/ra_syntax/tests/data/lexer/0015_unclosed_string.rs +++ b/crates/ra_syntax/test_data/lexer/0015_unclosed_string.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0015_unclosed_string.txt b/crates/ra_syntax/test_data/lexer/0015_unclosed_string.txt index 728c40b66..728c40b66 100644 --- a/crates/ra_syntax/tests/data/lexer/0015_unclosed_string.txt +++ b/crates/ra_syntax/test_data/lexer/0015_unclosed_string.txt | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0016_raw_ident.rs b/crates/ra_syntax/test_data/lexer/0016_raw_ident.rs index b40a1b6a2..b40a1b6a2 100644 --- a/crates/ra_syntax/tests/data/lexer/0016_raw_ident.rs +++ b/crates/ra_syntax/test_data/lexer/0016_raw_ident.rs | |||
diff --git a/crates/ra_syntax/tests/data/lexer/0016_raw_ident.txt b/crates/ra_syntax/test_data/lexer/0016_raw_ident.txt index 484689693..484689693 100644 --- a/crates/ra_syntax/tests/data/lexer/0016_raw_ident.txt +++ b/crates/ra_syntax/test_data/lexer/0016_raw_ident.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0000_struct_field_missing_comma.rs b/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rs index fe5030d89..fe5030d89 100644 --- a/crates/ra_syntax/tests/data/parser/err/0000_struct_field_missing_comma.rs +++ b/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0000_struct_field_missing_comma.txt b/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.txt index 0dbbfe853..0dbbfe853 100644 --- a/crates/ra_syntax/tests/data/parser/err/0000_struct_field_missing_comma.txt +++ b/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0001_item_recovery_in_file.rs b/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rs index 98f23de1f..98f23de1f 100644 --- a/crates/ra_syntax/tests/data/parser/err/0001_item_recovery_in_file.rs +++ b/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0001_item_recovery_in_file.txt b/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.txt index 7cfb54ef8..7cfb54ef8 100644 --- a/crates/ra_syntax/tests/data/parser/err/0001_item_recovery_in_file.txt +++ b/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0002_duplicate_shebang.rs b/crates/ra_syntax/test_data/parser/err/0002_duplicate_shebang.rs index 48a3a3980..48a3a3980 100644 --- a/crates/ra_syntax/tests/data/parser/err/0002_duplicate_shebang.rs +++ b/crates/ra_syntax/test_data/parser/err/0002_duplicate_shebang.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0002_duplicate_shebang.txt b/crates/ra_syntax/test_data/parser/err/0002_duplicate_shebang.txt index 84867026f..84867026f 100644 --- a/crates/ra_syntax/tests/data/parser/err/0002_duplicate_shebang.txt +++ b/crates/ra_syntax/test_data/parser/err/0002_duplicate_shebang.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0003_C++_semicolon.rs b/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rs index 009312270..009312270 100644 --- a/crates/ra_syntax/tests/data/parser/err/0003_C++_semicolon.rs +++ b/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0003_C++_semicolon.txt b/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.txt index 857826037..857826037 100644 --- a/crates/ra_syntax/tests/data/parser/err/0003_C++_semicolon.txt +++ b/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0004_use_path_bad_segment.rs b/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.rs index 060e65d06..060e65d06 100644 --- a/crates/ra_syntax/tests/data/parser/err/0004_use_path_bad_segment.rs +++ b/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0004_use_path_bad_segment.txt b/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.txt index 5210a884d..5210a884d 100644 --- a/crates/ra_syntax/tests/data/parser/err/0004_use_path_bad_segment.txt +++ b/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0005_attribute_recover.rs b/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.rs index de7f81628..de7f81628 100644 --- a/crates/ra_syntax/tests/data/parser/err/0005_attribute_recover.rs +++ b/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0005_attribute_recover.txt b/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.txt index 6d5199a56..6d5199a56 100644 --- a/crates/ra_syntax/tests/data/parser/err/0005_attribute_recover.txt +++ b/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0006_named_field_recovery.rs b/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rs index 8069c111b..8069c111b 100644 --- a/crates/ra_syntax/tests/data/parser/err/0006_named_field_recovery.rs +++ b/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0006_named_field_recovery.txt b/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.txt index 6143e68f1..6143e68f1 100644 --- a/crates/ra_syntax/tests/data/parser/err/0006_named_field_recovery.txt +++ b/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0007_stray_curly_in_file.rs b/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rs index dc869fb78..dc869fb78 100644 --- a/crates/ra_syntax/tests/data/parser/err/0007_stray_curly_in_file.rs +++ b/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0007_stray_curly_in_file.txt b/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.txt index b79e01238..b79e01238 100644 --- a/crates/ra_syntax/tests/data/parser/err/0007_stray_curly_in_file.txt +++ b/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0008_item_block_recovery.rs b/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rs index 9fcac19b5..9fcac19b5 100644 --- a/crates/ra_syntax/tests/data/parser/err/0008_item_block_recovery.rs +++ b/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0008_item_block_recovery.txt b/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.txt index 9a8871579..9a8871579 100644 --- a/crates/ra_syntax/tests/data/parser/err/0008_item_block_recovery.txt +++ b/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0009_broken_struct_type_parameter.rs b/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rs index 0dd30d0bd..0dd30d0bd 100644 --- a/crates/ra_syntax/tests/data/parser/err/0009_broken_struct_type_parameter.rs +++ b/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0009_broken_struct_type_parameter.txt b/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.txt index e147d6424..e147d6424 100644 --- a/crates/ra_syntax/tests/data/parser/err/0009_broken_struct_type_parameter.txt +++ b/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0010_unsafe_lambda_block.rs b/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rs index 985775282..985775282 100644 --- a/crates/ra_syntax/tests/data/parser/err/0010_unsafe_lambda_block.rs +++ b/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0010_unsafe_lambda_block.txt b/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.txt index c46809f81..c46809f81 100644 --- a/crates/ra_syntax/tests/data/parser/err/0010_unsafe_lambda_block.txt +++ b/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0011_extern_struct.rs b/crates/ra_syntax/test_data/parser/err/0011_extern_struct.rs index c1bd0a2d1..c1bd0a2d1 100644 --- a/crates/ra_syntax/tests/data/parser/err/0011_extern_struct.rs +++ b/crates/ra_syntax/test_data/parser/err/0011_extern_struct.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0011_extern_struct.txt b/crates/ra_syntax/test_data/parser/err/0011_extern_struct.txt index 381147dc0..381147dc0 100644 --- a/crates/ra_syntax/tests/data/parser/err/0011_extern_struct.txt +++ b/crates/ra_syntax/test_data/parser/err/0011_extern_struct.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0012_broken_lambda.txt b/crates/ra_syntax/test_data/parser/err/0012_broken_lambda.txt index 12ebc2a3a..12ebc2a3a 100644 --- a/crates/ra_syntax/tests/data/parser/err/0012_broken_lambda.txt +++ b/crates/ra_syntax/test_data/parser/err/0012_broken_lambda.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0013_invalid_type.rs b/crates/ra_syntax/test_data/parser/err/0013_invalid_type.rs index 20dde3bc3..20dde3bc3 100644 --- a/crates/ra_syntax/tests/data/parser/err/0013_invalid_type.rs +++ b/crates/ra_syntax/test_data/parser/err/0013_invalid_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0013_invalid_type.txt b/crates/ra_syntax/test_data/parser/err/0013_invalid_type.txt index bef286b37..bef286b37 100644 --- a/crates/ra_syntax/tests/data/parser/err/0013_invalid_type.txt +++ b/crates/ra_syntax/test_data/parser/err/0013_invalid_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0014_where_no_bounds.rs b/crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.rs index 75c1d2f98..75c1d2f98 100644 --- a/crates/ra_syntax/tests/data/parser/err/0014_where_no_bounds.rs +++ b/crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0014_where_no_bounds.txt b/crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.txt index 2f0878572..2f0878572 100644 --- a/crates/ra_syntax/tests/data/parser/err/0014_where_no_bounds.txt +++ b/crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0015_curly_in_params.rs b/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rs index 156e70251..156e70251 100644 --- a/crates/ra_syntax/tests/data/parser/err/0015_curly_in_params.rs +++ b/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0015_curly_in_params.txt b/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.txt index 23ca0c446..23ca0c446 100644 --- a/crates/ra_syntax/tests/data/parser/err/0015_curly_in_params.txt +++ b/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0016_missing_semi.rs b/crates/ra_syntax/test_data/parser/err/0016_missing_semi.rs index 9ae857686..9ae857686 100644 --- a/crates/ra_syntax/tests/data/parser/err/0016_missing_semi.rs +++ b/crates/ra_syntax/test_data/parser/err/0016_missing_semi.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0016_missing_semi.txt b/crates/ra_syntax/test_data/parser/err/0016_missing_semi.txt index 97e64dea9..97e64dea9 100644 --- a/crates/ra_syntax/tests/data/parser/err/0016_missing_semi.txt +++ b/crates/ra_syntax/test_data/parser/err/0016_missing_semi.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0017_incomplete_binexpr.rs b/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rs index 17bd49777..17bd49777 100644 --- a/crates/ra_syntax/tests/data/parser/err/0017_incomplete_binexpr.rs +++ b/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0017_incomplete_binexpr.txt b/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.txt index c18e20900..c18e20900 100644 --- a/crates/ra_syntax/tests/data/parser/err/0017_incomplete_binexpr.txt +++ b/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0018_incomplete_fn.rs b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rs index fe604006c..fe604006c 100644 --- a/crates/ra_syntax/tests/data/parser/err/0018_incomplete_fn.rs +++ b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0018_incomplete_fn.txt b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt index 51def2d8f..51def2d8f 100644 --- a/crates/ra_syntax/tests/data/parser/err/0018_incomplete_fn.txt +++ b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0019_let_recover.rs b/crates/ra_syntax/test_data/parser/err/0019_let_recover.rs index 48bf3d68b..48bf3d68b 100644 --- a/crates/ra_syntax/tests/data/parser/err/0019_let_recover.rs +++ b/crates/ra_syntax/test_data/parser/err/0019_let_recover.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0019_let_recover.txt b/crates/ra_syntax/test_data/parser/err/0019_let_recover.txt index b6710241e..b6710241e 100644 --- a/crates/ra_syntax/tests/data/parser/err/0019_let_recover.txt +++ b/crates/ra_syntax/test_data/parser/err/0019_let_recover.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0020_fn_recover.rs b/crates/ra_syntax/test_data/parser/err/0020_fn_recover.rs index 3393b668b..3393b668b 100644 --- a/crates/ra_syntax/tests/data/parser/err/0020_fn_recover.rs +++ b/crates/ra_syntax/test_data/parser/err/0020_fn_recover.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0020_fn_recover.txt b/crates/ra_syntax/test_data/parser/err/0020_fn_recover.txt index 71c014028..71c014028 100644 --- a/crates/ra_syntax/tests/data/parser/err/0020_fn_recover.txt +++ b/crates/ra_syntax/test_data/parser/err/0020_fn_recover.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0021_incomplete_param.rs b/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rs index 7a6c264f6..7a6c264f6 100644 --- a/crates/ra_syntax/tests/data/parser/err/0021_incomplete_param.rs +++ b/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0021_incomplete_param.txt b/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.txt index c125a0bc9..c125a0bc9 100644 --- a/crates/ra_syntax/tests/data/parser/err/0021_incomplete_param.txt +++ b/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0022_bad_exprs.rs b/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rs index cd2d493a1..cd2d493a1 100644 --- a/crates/ra_syntax/tests/data/parser/err/0022_bad_exprs.rs +++ b/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0022_bad_exprs.txt b/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.txt index 32b53bba7..32b53bba7 100644 --- a/crates/ra_syntax/tests/data/parser/err/0022_bad_exprs.txt +++ b/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0023_mismatched_paren.rs b/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rs index 0206d563e..0206d563e 100644 --- a/crates/ra_syntax/tests/data/parser/err/0023_mismatched_paren.rs +++ b/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0023_mismatched_paren.txt b/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.txt index f2515faa7..f2515faa7 100644 --- a/crates/ra_syntax/tests/data/parser/err/0023_mismatched_paren.txt +++ b/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0024_many_type_parens.rs b/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rs index 6c2e95c02..6c2e95c02 100644 --- a/crates/ra_syntax/tests/data/parser/err/0024_many_type_parens.rs +++ b/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0024_many_type_parens.txt b/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.txt index faf0fe462..faf0fe462 100644 --- a/crates/ra_syntax/tests/data/parser/err/0024_many_type_parens.txt +++ b/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0025_nope.rs b/crates/ra_syntax/test_data/parser/err/0025_nope.rs index 28726ed51..28726ed51 100644 --- a/crates/ra_syntax/tests/data/parser/err/0025_nope.rs +++ b/crates/ra_syntax/test_data/parser/err/0025_nope.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0025_nope.txt b/crates/ra_syntax/test_data/parser/err/0025_nope.txt index 0a3952dc9..0a3952dc9 100644 --- a/crates/ra_syntax/tests/data/parser/err/0025_nope.txt +++ b/crates/ra_syntax/test_data/parser/err/0025_nope.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.rs b/crates/ra_syntax/test_data/parser/err/0026_imp_recovery.rs index 829ca1c4b..829ca1c4b 100644 --- a/crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.rs +++ b/crates/ra_syntax/test_data/parser/err/0026_imp_recovery.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.txt b/crates/ra_syntax/test_data/parser/err/0026_imp_recovery.txt index d3da2f54f..d3da2f54f 100644 --- a/crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.txt +++ b/crates/ra_syntax/test_data/parser/err/0026_imp_recovery.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0027_incomplere_where_for.rs b/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rs index 2792c2084..2792c2084 100644 --- a/crates/ra_syntax/tests/data/parser/err/0027_incomplere_where_for.rs +++ b/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0027_incomplere_where_for.txt b/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.txt index 061e6fb31..061e6fb31 100644 --- a/crates/ra_syntax/tests/data/parser/err/0027_incomplere_where_for.txt +++ b/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0028_macro_2.0.rs b/crates/ra_syntax/test_data/parser/err/0028_macro_2.0.rs index 781047ba1..781047ba1 100644 --- a/crates/ra_syntax/tests/data/parser/err/0028_macro_2.0.rs +++ b/crates/ra_syntax/test_data/parser/err/0028_macro_2.0.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0028_macro_2.0.txt b/crates/ra_syntax/test_data/parser/err/0028_macro_2.0.txt index 98bc562a3..98bc562a3 100644 --- a/crates/ra_syntax/tests/data/parser/err/0028_macro_2.0.txt +++ b/crates/ra_syntax/test_data/parser/err/0028_macro_2.0.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0029_field_completion.rs b/crates/ra_syntax/test_data/parser/err/0029_field_completion.rs index a7cdc17bb..a7cdc17bb 100644 --- a/crates/ra_syntax/tests/data/parser/err/0029_field_completion.rs +++ b/crates/ra_syntax/test_data/parser/err/0029_field_completion.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0029_field_completion.txt b/crates/ra_syntax/test_data/parser/err/0029_field_completion.txt index fb50a12fc..fb50a12fc 100644 --- a/crates/ra_syntax/tests/data/parser/err/0029_field_completion.txt +++ b/crates/ra_syntax/test_data/parser/err/0029_field_completion.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0031_block_inner_attrs.rs b/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rs index 6a04f2d0a..6a04f2d0a 100644 --- a/crates/ra_syntax/tests/data/parser/err/0031_block_inner_attrs.rs +++ b/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0031_block_inner_attrs.txt b/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.txt index c205cf147..c205cf147 100644 --- a/crates/ra_syntax/tests/data/parser/err/0031_block_inner_attrs.txt +++ b/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0032_match_arms_inner_attrs.rs b/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rs index 06aa47770..06aa47770 100644 --- a/crates/ra_syntax/tests/data/parser/err/0032_match_arms_inner_attrs.rs +++ b/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0032_match_arms_inner_attrs.txt b/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.txt index 4e8c4143b..4e8c4143b 100644 --- a/crates/ra_syntax/tests/data/parser/err/0032_match_arms_inner_attrs.txt +++ b/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0033_match_arms_outer_attrs.rs b/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rs index 4635222da..4635222da 100644 --- a/crates/ra_syntax/tests/data/parser/err/0033_match_arms_outer_attrs.rs +++ b/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/err/0033_match_arms_outer_attrs.txt b/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.txt index e4f1f6337..e4f1f6337 100644 --- a/crates/ra_syntax/tests/data/parser/err/0033_match_arms_outer_attrs.txt +++ b/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/fuzz-failures/0000.rs b/crates/ra_syntax/test_data/parser/fuzz-failures/0000.rs index e0437d163..e0437d163 100644 --- a/crates/ra_syntax/tests/data/parser/fuzz-failures/0000.rs +++ b/crates/ra_syntax/test_data/parser/fuzz-failures/0000.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/fuzz-failures/0001.rs b/crates/ra_syntax/test_data/parser/fuzz-failures/0001.rs index 099cc5f84..099cc5f84 100644 --- a/crates/ra_syntax/tests/data/parser/fuzz-failures/0001.rs +++ b/crates/ra_syntax/test_data/parser/fuzz-failures/0001.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/fuzz-failures/0002.rs b/crates/ra_syntax/test_data/parser/fuzz-failures/0002.rs index f35dc7289..f35dc7289 100644 --- a/crates/ra_syntax/tests/data/parser/fuzz-failures/0002.rs +++ b/crates/ra_syntax/test_data/parser/fuzz-failures/0002.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/fuzz-failures/0003.rs b/crates/ra_syntax/test_data/parser/fuzz-failures/0003.rs index 0f59c4722..0f59c4722 100644 --- a/crates/ra_syntax/tests/data/parser/fuzz-failures/0003.rs +++ b/crates/ra_syntax/test_data/parser/fuzz-failures/0003.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/fuzz-failures/0004.rs b/crates/ra_syntax/test_data/parser/fuzz-failures/0004.rs index 003290f52..003290f52 100644 --- a/crates/ra_syntax/tests/data/parser/fuzz-failures/0004.rs +++ b/crates/ra_syntax/test_data/parser/fuzz-failures/0004.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.rs b/crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rs index a94851443..a94851443 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.rs +++ b/crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt b/crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.txt index 3f0f1b480..3f0f1b480 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt +++ b/crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.rs b/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rs index a2164c510..a2164c510 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.rs +++ b/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt b/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.txt index 7abc49d5e..7abc49d5e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt +++ b/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.rs b/crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rs index fae705131..fae705131 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.rs +++ b/crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt b/crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.txt index b97e339bb..b97e339bb 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt +++ b/crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.rs b/crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.rs index b8c7b65e3..b8c7b65e3 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt b/crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.txt index 43321b1ed..43321b1ed 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.rs b/crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rs index f014914ff..f014914ff 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.rs +++ b/crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt b/crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt index 451f29d39..451f29d39 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt +++ b/crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.rs b/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rs index 26141e904..26141e904 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.rs +++ b/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt b/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.txt index a1871ec08..a1871ec08 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt +++ b/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.rs b/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rs index 9a423248c..9a423248c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.rs +++ b/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt b/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.txt index f70adc25d..f70adc25d 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt +++ b/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.rs b/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rs index 2976f6862..2976f6862 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt b/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.txt index 1dbfca698..1dbfca698 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.rs b/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rs index d725a07ce..d725a07ce 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.rs +++ b/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt b/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.txt index 338776a72..338776a72 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt +++ b/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.rs b/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rs index 30cc49138..30cc49138 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.txt b/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.txt index a21b29c80..a21b29c80 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0010_wrong_order_fns.rs b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rs index 16edee95d..16edee95d 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0010_wrong_order_fns.rs +++ b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0010_wrong_order_fns.txt b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.txt index b1ef210d3..b1ef210d3 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0010_wrong_order_fns.txt +++ b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0014_default_fn_type.rs b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rs index 15ba8f4a8..15ba8f4a8 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0014_default_fn_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0014_default_fn_type.txt b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.txt index 7da4e243f..7da4e243f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0014_default_fn_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.rs b/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rs index a5ec3239f..a5ec3239f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt b/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.txt index 18f02bb22..18f02bb22 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0002_use_tree_list.rs b/crates/ra_syntax/test_data/parser/inline/ok/0002_use_tree_list.rs index 06c387cee..06c387cee 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0002_use_tree_list.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0002_use_tree_list.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0002_use_tree_list.txt b/crates/ra_syntax/test_data/parser/inline/ok/0002_use_tree_list.txt index 1b318dfb9..1b318dfb9 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0002_use_tree_list.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0002_use_tree_list.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.rs b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rs index b448c6178..b448c6178 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.txt b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.txt index 8a21ee968..8a21ee968 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0004_value_parameters_no_patterns.rs b/crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rs index d8c23c76a..d8c23c76a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0004_value_parameters_no_patterns.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0004_value_parameters_no_patterns.txt b/crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.txt index 8cfba8420..8cfba8420 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0004_value_parameters_no_patterns.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.rs b/crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rs index 9df40ed39..9df40ed39 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.txt b/crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.txt index c1a70d566..c1a70d566 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0006_self_param.rs b/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rs index 80c0a43f5..80c0a43f5 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0006_self_param.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0006_self_param.txt b/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.txt index 8e210a6ca..8e210a6ca 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0006_self_param.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.rs b/crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rs index 919bde0ee..919bde0ee 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.txt b/crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.txt index a7186c7a8..a7186c7a8 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0008_path_part.rs b/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rs index f6e32c7c1..f6e32c7c1 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0008_path_part.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0008_path_part.txt b/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.txt index 0c6be485e..0c6be485e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0008_path_part.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0009_loop_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rs index 9f078fa48..9f078fa48 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0009_loop_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0009_loop_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.txt index 8240aba15..8240aba15 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0009_loop_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0010_extern_block.rs b/crates/ra_syntax/test_data/parser/inline/ok/0010_extern_block.rs index 26a9ccd1e..26a9ccd1e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0010_extern_block.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0010_extern_block.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0010_extern_block.txt b/crates/ra_syntax/test_data/parser/inline/ok/0010_extern_block.txt index 506f56fff..506f56fff 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0010_extern_block.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0010_extern_block.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0011_field_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rs index b8da2ddc3..b8da2ddc3 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0011_field_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0011_field_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.txt index 78054ec5a..78054ec5a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0011_field_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.rs b/crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rs index a602d07f0..a602d07f0 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt b/crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.txt index da04dac5c..da04dac5c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0013_pointer_type_mut.rs b/crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rs index 04b2bb9ba..04b2bb9ba 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0013_pointer_type_mut.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0013_pointer_type_mut.txt b/crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.txt index c05f873d6..c05f873d6 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0013_pointer_type_mut.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0014_never_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rs index de399fcf4..de399fcf4 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0014_never_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0014_never_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.txt index ac53e4fd3..ac53e4fd3 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0014_never_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0015_continue_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rs index 474cc3f0e..474cc3f0e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0015_continue_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0015_continue_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.txt index e8cc32f2c..e8cc32f2c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0015_continue_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0016_unsafe_trait.rs b/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rs index 04e021550..04e021550 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0016_unsafe_trait.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0016_unsafe_trait.txt b/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.txt index 7b43f1294..7b43f1294 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0016_unsafe_trait.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0017_array_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rs index 27eb22f22..27eb22f22 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0017_array_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0017_array_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.txt index b4055c9f0..b4055c9f0 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0017_array_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0018_arb_self_types.rs b/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rs index 6a170d5ac..6a170d5ac 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0018_arb_self_types.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0018_arb_self_types.txt b/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.txt index 67d0de0f0..67d0de0f0 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0018_arb_self_types.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0019_unary_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rs index f1c3f7118..f1c3f7118 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0019_unary_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0019_unary_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.txt index 42032f56c..42032f56c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0019_unary_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0020_use_star.rs b/crates/ra_syntax/test_data/parser/inline/ok/0020_use_star.rs index 6f15769a8..6f15769a8 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0020_use_star.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0020_use_star.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0020_use_star.txt b/crates/ra_syntax/test_data/parser/inline/ok/0020_use_star.txt index dd2095d90..dd2095d90 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0020_use_star.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0020_use_star.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0021_impl_item_list.rs b/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rs index f10851487..f10851487 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0021_impl_item_list.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0021_impl_item_list.txt b/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.txt index a893833e1..a893833e1 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0021_impl_item_list.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0022_crate_visibility.rs b/crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rs index faeefde94..faeefde94 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0022_crate_visibility.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0022_crate_visibility.txt b/crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.txt index 891943f6e..891943f6e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0022_crate_visibility.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0023_placeholder_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rs index 7952dbd57..7952dbd57 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0023_placeholder_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0023_placeholder_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.txt index 0f32aec9e..0f32aec9e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0023_placeholder_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0024_slice_pat.rs b/crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rs index 7955973b9..7955973b9 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0024_slice_pat.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0024_slice_pat.txt b/crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.txt index 40ddbfbf6..40ddbfbf6 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0024_slice_pat.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0025_slice_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rs index 4da1af827..4da1af827 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0025_slice_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0025_slice_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.txt index b3a24281e..b3a24281e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0025_slice_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0026_tuple_pat_fields.rs b/crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rs index 0dfe63629..0dfe63629 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0026_tuple_pat_fields.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0026_tuple_pat_fields.txt b/crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.txt index 0ff936471..0ff936471 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0026_tuple_pat_fields.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0027_ref_pat.rs b/crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rs index de41f5cae..de41f5cae 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0027_ref_pat.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0027_ref_pat.txt b/crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.txt index a833b1b96..a833b1b96 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0027_ref_pat.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rs index 54c5a7c46..54c5a7c46 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.txt index f07027fa7..f07027fa7 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0029_cast_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rs index bfe8e4b36..bfe8e4b36 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0029_cast_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0029_cast_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.txt index 11c14e3b4..11c14e3b4 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0029_cast_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0030_cond.rs b/crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rs index 2552a2621..2552a2621 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0030_cond.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0030_cond.txt b/crates/ra_syntax/test_data/parser/inline/ok/0030_cond.txt index 1c9414b21..1c9414b21 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0030_cond.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0030_cond.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0031_while_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rs index 293046a04..293046a04 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0031_while_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0031_while_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.txt index a772117a1..a772117a1 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0031_while_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0032_fn_pointer_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rs index 9493da83d..9493da83d 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0032_fn_pointer_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0032_fn_pointer_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.txt index a0a8aea76..a0a8aea76 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0032_fn_pointer_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0033_reference_type;.rs b/crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rs index 3ac0badab..3ac0badab 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0033_reference_type;.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0033_reference_type;.txt b/crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.txt index 7642ea659..7642ea659 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0033_reference_type;.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0034_break_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rs index 1b4094636..1b4094636 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0034_break_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0034_break_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.txt index 4ece7cd7e..4ece7cd7e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0034_break_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0036_unsafe_extern_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rs index 1295c2cd2..1295c2cd2 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0036_unsafe_extern_fn.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0036_unsafe_extern_fn.txt b/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.txt index b5b09b2e5..b5b09b2e5 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0036_unsafe_extern_fn.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0037_qual_paths.rs b/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rs index d140692e2..d140692e2 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0037_qual_paths.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0037_qual_paths.txt b/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.txt index 9bfddf5d2..9bfddf5d2 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0037_qual_paths.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0038_full_range_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rs index ae21ad94c..ae21ad94c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0038_full_range_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0038_full_range_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.txt index 477c645d1..477c645d1 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0038_full_range_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0039_type_arg.rs b/crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rs index 385c43131..385c43131 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0039_type_arg.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0039_type_arg.txt b/crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.txt index 4786bf77a..4786bf77a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0039_type_arg.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0040_crate_keyword_vis.rs b/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rs index e2b5f2161..e2b5f2161 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0040_crate_keyword_vis.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0040_crate_keyword_vis.txt b/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.txt index fb8246174..fb8246174 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0040_crate_keyword_vis.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.rs b/crates/ra_syntax/test_data/parser/inline/ok/0041_trait_item.rs index 32761dd03..32761dd03 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0041_trait_item.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.txt b/crates/ra_syntax/test_data/parser/inline/ok/0041_trait_item.txt index 578361715..578361715 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0041_trait_item.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0042_call_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rs index ffbf46d6d..ffbf46d6d 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0042_call_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0042_call_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.txt index dd8946ad2..dd8946ad2 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0042_call_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0043_use_alias.rs b/crates/ra_syntax/test_data/parser/inline/ok/0043_use_alias.rs index 9be50f877..9be50f877 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0043_use_alias.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0043_use_alias.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0043_use_alias.txt b/crates/ra_syntax/test_data/parser/inline/ok/0043_use_alias.txt index 18d8a151f..18d8a151f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0043_use_alias.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0043_use_alias.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0044_block_items.rs b/crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rs index d9868718c..d9868718c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0044_block_items.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0044_block_items.txt b/crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.txt index d1a8c560a..d1a8c560a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0044_block_items.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.rs b/crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rs index 9b93442c0..9b93442c0 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.txt b/crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.txt index f85d6a4bc..f85d6a4bc 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0046_singleton_tuple_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rs index cb66bad24..cb66bad24 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0046_singleton_tuple_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0046_singleton_tuple_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.txt index c7b4e614d..c7b4e614d 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0046_singleton_tuple_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0047_unsafe_default_impl.rs b/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rs index 9cd6c57bd..9cd6c57bd 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0047_unsafe_default_impl.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0047_unsafe_default_impl.txt b/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.txt index 8f3dcaf88..8f3dcaf88 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0047_unsafe_default_impl.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.rs b/crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rs index 4bb0f63b7..4bb0f63b7 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.txt b/crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.txt index bb948c8d8..bb948c8d8 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0050_fn_decl.rs b/crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rs index c9f74f7f5..c9f74f7f5 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0050_fn_decl.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0050_fn_decl.txt b/crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.txt index 19f961e29..19f961e29 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0050_fn_decl.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0051_unit_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rs index c039cf7d3..c039cf7d3 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0051_unit_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0051_unit_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.txt index 6a469f8aa..6a469f8aa 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0051_unit_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0052_path_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rs index bf94f32e1..bf94f32e1 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0052_path_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0052_path_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.txt index ee55ee219..ee55ee219 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0052_path_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0053_path_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rs index 333ebabef..333ebabef 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0053_path_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0053_path_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.txt index bc4b97c9f..bc4b97c9f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0053_path_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0054_field_attrs.rs b/crates/ra_syntax/test_data/parser/inline/ok/0054_field_attrs.rs index 4744d8ac0..4744d8ac0 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0054_field_attrs.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0054_field_attrs.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0054_field_attrs.txt b/crates/ra_syntax/test_data/parser/inline/ok/0054_field_attrs.txt index f214d1d47..f214d1d47 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0054_field_attrs.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0054_field_attrs.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0055_literal_pattern.rs b/crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.rs index 6dfd67b4c..6dfd67b4c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0055_literal_pattern.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0055_literal_pattern.txt b/crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.txt index ab5dad438..ab5dad438 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0055_literal_pattern.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.rs b/crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rs index 19d7e571b..19d7e571b 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.txt b/crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.txt index c86a0db3f..c86a0db3f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0057_const_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rs index 8c84d9cd7..8c84d9cd7 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0057_const_fn.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0057_const_fn.txt b/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.txt index 7a8b81983..7a8b81983 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0057_const_fn.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0058_range_pat.rs b/crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rs index c12ab6fce..c12ab6fce 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0058_range_pat.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0058_range_pat.txt b/crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.txt index 1b7e9b905..1b7e9b905 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0058_range_pat.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0059_match_arms_commas.rs b/crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rs index 1f25d577a..1f25d577a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0059_match_arms_commas.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0059_match_arms_commas.txt b/crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.txt index 949117134..949117134 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0059_match_arms_commas.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0060_extern_crate.rs b/crates/ra_syntax/test_data/parser/inline/ok/0060_extern_crate.rs index 49af74e1b..49af74e1b 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0060_extern_crate.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0060_extern_crate.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0060_extern_crate.txt b/crates/ra_syntax/test_data/parser/inline/ok/0060_extern_crate.txt index 7667201ba..7667201ba 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0060_extern_crate.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0060_extern_crate.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0061_struct_lit.rs b/crates/ra_syntax/test_data/parser/inline/ok/0061_struct_lit.rs index eb711f68a..eb711f68a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0061_struct_lit.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0061_struct_lit.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0061_struct_lit.txt b/crates/ra_syntax/test_data/parser/inline/ok/0061_struct_lit.txt index 94d1bfe2e..94d1bfe2e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0061_struct_lit.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0061_struct_lit.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0062_mod_contents.rs b/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rs index 24a15c5c5..24a15c5c5 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0062_mod_contents.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0062_mod_contents.txt b/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.txt index db2b9a582..db2b9a582 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0062_mod_contents.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0063_impl_block_neg.rs b/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_block_neg.rs index b7527c870..b7527c870 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0063_impl_block_neg.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_block_neg.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0063_impl_block_neg.txt b/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_block_neg.txt index dfff947fe..dfff947fe 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0063_impl_block_neg.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_block_neg.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0064_if_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rs index 4b0d9af89..4b0d9af89 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0064_if_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0064_if_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.txt index 554bda6fb..554bda6fb 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0064_if_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rs index c3ecabb99..c3ecabb99 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.txt index 2ee0dc199..2ee0dc199 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0066_match_arm.rs b/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rs index 9e009e24f..9e009e24f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0066_match_arm.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0066_match_arm.txt b/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.txt index 041e7179e..041e7179e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0066_match_arm.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0067_crate_path.rs b/crates/ra_syntax/test_data/parser/inline/ok/0067_crate_path.rs index 1bbb5930b..1bbb5930b 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0067_crate_path.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0067_crate_path.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0067_crate_path.txt b/crates/ra_syntax/test_data/parser/inline/ok/0067_crate_path.txt index f2ba4e909..f2ba4e909 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0067_crate_path.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0067_crate_path.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0068_union_items.rs b/crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.rs index b7dd610d8..b7dd610d8 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0068_union_items.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0068_union_items.txt b/crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.txt index 4b653317b..4b653317b 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0068_union_items.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0069_use_tree_list_after_path.rs b/crates/ra_syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.rs index c0a3d634e..c0a3d634e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0069_use_tree_list_after_path.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0069_use_tree_list_after_path.txt b/crates/ra_syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.txt index 86afc9362..86afc9362 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0069_use_tree_list_after_path.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0069_use_tree_list_after_path.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rs b/crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rs index 37b843742..37b843742 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.txt b/crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.txt index 40333d565..40333d565 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0071_match_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rs index c9205dfa3..c9205dfa3 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0071_match_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0071_match_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.txt index 658948c66..658948c66 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0071_match_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0072_return_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rs index 5733666b6..5733666b6 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0072_return_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0072_return_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.txt index cd9e10bed..cd9e10bed 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0072_return_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0073_type_item_type_params.rs b/crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rs index defd110c4..defd110c4 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0073_type_item_type_params.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0073_type_item_type_params.txt b/crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.txt index 2dd6db28f..2dd6db28f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0073_type_item_type_params.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rs b/crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rs index 2edd578f9..2edd578f9 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.txt b/crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.txt index 48af2f350..48af2f350 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0075_block.rs b/crates/ra_syntax/test_data/parser/inline/ok/0075_block.rs index 81f44c533..81f44c533 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0075_block.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0075_block.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0075_block.txt b/crates/ra_syntax/test_data/parser/inline/ok/0075_block.txt index 36983590f..36983590f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0075_block.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0075_block.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.rs b/crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rs index f0920b2a8..f0920b2a8 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.txt b/crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.txt index 32979c523..32979c523 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0077_try_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rs index 8b74f7bc8..8b74f7bc8 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0077_try_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0077_try_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.txt index 72de14b98..72de14b98 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0077_try_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0078_type_item.rs b/crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rs index 04c0344fa..04c0344fa 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0078_type_item.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0078_type_item.txt b/crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.txt index 4bc0b1858..4bc0b1858 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0078_type_item.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0079_impl_block.rs b/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.rs index d6337f6b3..d6337f6b3 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0079_impl_block.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0079_impl_block.txt b/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.txt index bda3435e8..bda3435e8 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0079_impl_block.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0080_postfix_range.rs b/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rs index c39fe8e68..c39fe8e68 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0080_postfix_range.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0080_postfix_range.txt b/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.txt index 541add812..541add812 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0080_postfix_range.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rs index 7cde5c532..7cde5c532 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.txt index 599cf9452..599cf9452 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0082_ref_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rs index 2dac6be95..2dac6be95 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0082_ref_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0082_ref_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.txt index 87a56d8ce..87a56d8ce 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0082_ref_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0083_struct_items.rs b/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rs index 693e3f3ee..693e3f3ee 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0083_struct_items.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0083_struct_items.txt b/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.txt index 62d93512b..62d93512b 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0083_struct_items.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0084_paren_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.rs index 6e1b25101..6e1b25101 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0084_paren_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0084_paren_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.txt index c0cf48af5..c0cf48af5 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0084_paren_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0085_expr_literals.rs b/crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rs index 2e11a5a6e..2e11a5a6e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0085_expr_literals.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0085_expr_literals.txt b/crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.txt index 2f2be32b9..2f2be32b9 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0085_expr_literals.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0086_function_ret_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rs index d22d8cada..d22d8cada 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0086_function_ret_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0086_function_ret_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.txt index ac793c95c..ac793c95c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0086_function_ret_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0087_unsafe_impl.rs b/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rs index 41055f41d..41055f41d 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0087_unsafe_impl.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0087_unsafe_impl.txt b/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.txt index 590e2a88f..590e2a88f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0087_unsafe_impl.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0088_break_ambiguity.rs b/crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rs index 560eb05b9..560eb05b9 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0088_break_ambiguity.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0088_break_ambiguity.txt b/crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.txt index b93a10c5b..b93a10c5b 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0088_break_ambiguity.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0089_extern_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rs index 394a049f0..394a049f0 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0089_extern_fn.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0089_extern_fn.txt b/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.txt index ed5339e64..ed5339e64 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0089_extern_fn.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0090_type_param_default.rs b/crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rs index 540eacb02..540eacb02 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0090_type_param_default.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0090_type_param_default.txt b/crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.txt index 8d2579cd6..8d2579cd6 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0090_type_param_default.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0091_auto_trait.rs b/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rs index 72adf6035..72adf6035 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0091_auto_trait.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0091_auto_trait.txt b/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.txt index 7093c2b1f..7093c2b1f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0091_auto_trait.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0092_fn_pointer_type_with_ret.rs b/crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rs index e3ba5e87f..e3ba5e87f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0092_fn_pointer_type_with_ret.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0092_fn_pointer_type_with_ret.txt b/crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.txt index fae822367..fae822367 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0092_fn_pointer_type_with_ret.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0093_index_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rs index b9ba78a6c..b9ba78a6c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0093_index_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0093_index_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.txt index b4a71f925..b4a71f925 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0093_index_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0094_unsafe_auto_trait.rs b/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rs index 03d29f324..03d29f324 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0094_unsafe_auto_trait.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0094_unsafe_auto_trait.txt b/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.txt index 3da3beaf4..3da3beaf4 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0094_unsafe_auto_trait.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0095_placeholder_pat.rs b/crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rs index 4d719c433..4d719c433 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0095_placeholder_pat.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0095_placeholder_pat.txt b/crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.txt index f11bc1fc8..f11bc1fc8 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0095_placeholder_pat.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0096_no_semi_after_block.rs b/crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rs index 4919665cb..4919665cb 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0096_no_semi_after_block.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0096_no_semi_after_block.txt b/crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.txt index 6d24f214e..6d24f214e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0096_no_semi_after_block.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0097_default_impl.rs b/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rs index ef6aa84a2..ef6aa84a2 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0097_default_impl.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0097_default_impl.txt b/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.txt index ada94a824..ada94a824 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0097_default_impl.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0098_const_unsafe_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rs index 31a1e435f..31a1e435f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0098_const_unsafe_fn.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0098_const_unsafe_fn.txt b/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.txt index 0dd42ab8e..0dd42ab8e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0098_const_unsafe_fn.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0099_param_list.rs b/crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rs index 9d55bedbb..9d55bedbb 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0099_param_list.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0099_param_list.txt b/crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.txt index 80d636819..80d636819 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0099_param_list.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0100_for_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rs index 972197d2a..972197d2a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0100_for_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0100_for_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.txt index 09e108570..09e108570 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0100_for_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0101_unsafe_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rs index 33cfc4cd7..33cfc4cd7 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0101_unsafe_fn.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0101_unsafe_fn.txt b/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.txt index 1a60f6ffe..1a60f6ffe 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0101_unsafe_fn.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0102_field_pat_list.rs b/crates/ra_syntax/test_data/parser/inline/ok/0102_field_pat_list.rs index da3412fa8..da3412fa8 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0102_field_pat_list.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0102_field_pat_list.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0102_field_pat_list.txt b/crates/ra_syntax/test_data/parser/inline/ok/0102_field_pat_list.txt index a2af4fc60..a2af4fc60 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0102_field_pat_list.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0102_field_pat_list.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0103_array_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rs index 4dc1999d1..4dc1999d1 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0103_array_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0103_array_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.txt index e74e231b3..e74e231b3 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0103_array_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0104_path_fn_trait_args.rs b/crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rs index aef45e561..aef45e561 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0104_path_fn_trait_args.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0104_path_fn_trait_args.txt b/crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.txt index d6f196811..d6f196811 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0104_path_fn_trait_args.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0105_block_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0105_block_expr.rs index 2fed74c5e..2fed74c5e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0105_block_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0105_block_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0105_block_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0105_block_expr.txt index 4bc446a55..4bc446a55 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0105_block_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0105_block_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rs index 075717823..075717823 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.txt index a05218118..a05218118 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0106_lambda_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0107_method_call_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rs index 1a3aa35ae..1a3aa35ae 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0107_method_call_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0107_method_call_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.txt index bc28b293e..bc28b293e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0107_method_call_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0108_tuple_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rs index e4f774280..e4f774280 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0108_tuple_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0108_tuple_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.txt index 32be7a849..32be7a849 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0108_tuple_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0109_label.rs b/crates/ra_syntax/test_data/parser/inline/ok/0109_label.rs index 48e83f263..48e83f263 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0109_label.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0109_label.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0109_label.txt b/crates/ra_syntax/test_data/parser/inline/ok/0109_label.txt index 39e4f4b3e..39e4f4b3e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0109_label.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0109_label.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0110_use_path.rs b/crates/ra_syntax/test_data/parser/inline/ok/0110_use_path.rs index 328e94736..328e94736 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0110_use_path.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0110_use_path.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0110_use_path.txt b/crates/ra_syntax/test_data/parser/inline/ok/0110_use_path.txt index 7dbcd3927..7dbcd3927 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0110_use_path.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0110_use_path.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0111_tuple_pat.rs b/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rs index f785acd36..f785acd36 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0111_tuple_pat.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0111_tuple_pat.txt b/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.txt index aef3f7e0f..aef3f7e0f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0111_tuple_pat.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0112_bind_pat.rs b/crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rs index 5a93469af..5a93469af 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0112_bind_pat.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0112_bind_pat.txt b/crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.txt index 189254a19..189254a19 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0112_bind_pat.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0113_nocontentexpr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rs index bbf09e367..bbf09e367 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0113_nocontentexpr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0113_nocontentexpr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.txt index 601a5bae9..601a5bae9 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0113_nocontentexpr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.rs b/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rs index ddd59016d..ddd59016d 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt b/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.txt index 8534592b9..8534592b9 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0115_pos_field_attrs.rs b/crates/ra_syntax/test_data/parser/inline/ok/0115_pos_field_attrs.rs index 635b9ac21..635b9ac21 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0115_pos_field_attrs.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0115_pos_field_attrs.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0115_pos_field_attrs.txt b/crates/ra_syntax/test_data/parser/inline/ok/0115_pos_field_attrs.txt index 6dd3a9b93..6dd3a9b93 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0115_pos_field_attrs.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0115_pos_field_attrs.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs b/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs index 472cb8803..472cb8803 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt b/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt index 158236c5a..158236c5a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.rs index edb470c89..edb470c89 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.txt index 892dc813a..892dc813a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0118_impl_inner_attributes.rs b/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.rs index 4d68cceb7..4d68cceb7 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0118_impl_inner_attributes.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0118_impl_inner_attributes.txt b/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.txt index 0ef3eeb75..0ef3eeb75 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0118_impl_inner_attributes.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0118_match_guard.rs b/crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rs index f1bd72fc4..f1bd72fc4 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0118_match_guard.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0118_match_guard.txt b/crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.txt index d53e10e86..d53e10e86 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0118_match_guard.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0120_match_arms_inner_attribute.rs b/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rs index 54a67c9d7..54a67c9d7 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0120_match_arms_inner_attribute.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0120_match_arms_inner_attribute.txt b/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.txt index 17c296327..17c296327 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0120_match_arms_inner_attribute.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0121_match_arms_outer_attributes.rs b/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rs index 676db42d1..676db42d1 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0121_match_arms_outer_attributes.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0121_match_arms_outer_attributes.txt b/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.txt index 9c238e869..9c238e869 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0121_match_arms_outer_attributes.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0122_generic_lifetime_type_attribute.rs b/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rs index e8fdf741f..e8fdf741f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0122_generic_lifetime_type_attribute.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0122_generic_lifetime_type_attribute.txt b/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.txt index a45995236..a45995236 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0122_generic_lifetime_type_attribute.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0123_param_list_vararg.rs b/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rs index c59addaf4..c59addaf4 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0123_param_list_vararg.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0123_param_list_vararg.txt b/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.txt index 836e8e55b..836e8e55b 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0123_param_list_vararg.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0124_async_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rs index f4adcb62b..f4adcb62b 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0124_async_fn.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0124_async_fn.txt b/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.txt index f0610e781..f0610e781 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0124_async_fn.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0125_crate_keyword_path.rs b/crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rs index 0f454d121..0f454d121 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0125_crate_keyword_path.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0125_crate_keyword_path.txt b/crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.txt index 4afe9c555..4afe9c555 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0125_crate_keyword_path.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0125_struct_literal_field_with_attr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0125_struct_literal_field_with_attr.rs index a6c7760c7..a6c7760c7 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0125_struct_literal_field_with_attr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0125_struct_literal_field_with_attr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0125_struct_literal_field_with_attr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0125_struct_literal_field_with_attr.txt index f9c5ec124..f9c5ec124 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0125_struct_literal_field_with_attr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0125_struct_literal_field_with_attr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0126_attr_on_expr_stmt.rs b/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rs index b28c078f9..b28c078f9 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0126_attr_on_expr_stmt.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0126_attr_on_expr_stmt.txt b/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.txt index c15c7573a..c15c7573a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0126_attr_on_expr_stmt.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0127_attr_on_last_expr_in_block.rs b/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rs index 9c5c8eb36..9c5c8eb36 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0127_attr_on_last_expr_in_block.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0127_attr_on_last_expr_in_block.txt b/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.txt index 62a6a7bc0..62a6a7bc0 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0127_attr_on_last_expr_in_block.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0128_combined_fns.rs b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs index 46af91b82..46af91b82 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0128_combined_fns.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0128_combined_fns.txt b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.txt index 2a16aeb61..2a16aeb61 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0128_combined_fns.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0129_marco_pat.rs b/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rs index 811181d9b..811181d9b 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0129_marco_pat.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0129_marco_pat.txt b/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.txt index 50b4ab2e7..50b4ab2e7 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0129_marco_pat.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0130_let_stmt.rs b/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rs index 86803fe08..86803fe08 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0130_let_stmt.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0130_let_stmt.txt b/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.txt index 82c1eb009..82c1eb009 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0130_let_stmt.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rs index 0f1b41eb6..0f1b41eb6 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.txt index 53f49b9b5..53f49b9b5 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0130_try_block_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0131_existential_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rs index 23baf7145..23baf7145 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0131_existential_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0131_existential_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.txt index 6bfac985a..6bfac985a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0131_existential_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.txt | |||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rs new file mode 100644 index 000000000..fc9923b71 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rs | |||
@@ -0,0 +1,5 @@ | |||
1 | fn foo() { | ||
2 | let x = box 1i32; | ||
3 | let y = (box 1i32, box 2i32); | ||
4 | let z = Foo(box 1i32, box 2i32); | ||
5 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.txt new file mode 100644 index 000000000..3d22002a1 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.txt | |||
@@ -0,0 +1,89 @@ | |||
1 | SOURCE_FILE@[0; 106) | ||
2 | FN_DEF@[0; 105) | ||
3 | FN_KW@[0; 2) "fn" | ||
4 | WHITESPACE@[2; 3) " " | ||
5 | NAME@[3; 6) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 8) | ||
8 | L_PAREN@[6; 7) "(" | ||
9 | R_PAREN@[7; 8) ")" | ||
10 | WHITESPACE@[8; 9) " " | ||
11 | BLOCK@[9; 105) | ||
12 | L_CURLY@[9; 10) "{" | ||
13 | WHITESPACE@[10; 15) "\n " | ||
14 | LET_STMT@[15; 32) | ||
15 | LET_KW@[15; 18) "let" | ||
16 | WHITESPACE@[18; 19) " " | ||
17 | BIND_PAT@[19; 20) | ||
18 | NAME@[19; 20) | ||
19 | IDENT@[19; 20) "x" | ||
20 | WHITESPACE@[20; 21) " " | ||
21 | EQ@[21; 22) "=" | ||
22 | WHITESPACE@[22; 23) " " | ||
23 | BOX_EXPR@[23; 31) | ||
24 | BOX_KW@[23; 26) "box" | ||
25 | WHITESPACE@[26; 27) " " | ||
26 | LITERAL@[27; 31) | ||
27 | INT_NUMBER@[27; 31) "1i32" | ||
28 | SEMI@[31; 32) ";" | ||
29 | WHITESPACE@[32; 37) "\n " | ||
30 | LET_STMT@[37; 66) | ||
31 | LET_KW@[37; 40) "let" | ||
32 | WHITESPACE@[40; 41) " " | ||
33 | BIND_PAT@[41; 42) | ||
34 | NAME@[41; 42) | ||
35 | IDENT@[41; 42) "y" | ||
36 | WHITESPACE@[42; 43) " " | ||
37 | EQ@[43; 44) "=" | ||
38 | WHITESPACE@[44; 45) " " | ||
39 | TUPLE_EXPR@[45; 65) | ||
40 | L_PAREN@[45; 46) "(" | ||
41 | BOX_EXPR@[46; 54) | ||
42 | BOX_KW@[46; 49) "box" | ||
43 | WHITESPACE@[49; 50) " " | ||
44 | LITERAL@[50; 54) | ||
45 | INT_NUMBER@[50; 54) "1i32" | ||
46 | COMMA@[54; 55) "," | ||
47 | WHITESPACE@[55; 56) " " | ||
48 | BOX_EXPR@[56; 64) | ||
49 | BOX_KW@[56; 59) "box" | ||
50 | WHITESPACE@[59; 60) " " | ||
51 | LITERAL@[60; 64) | ||
52 | INT_NUMBER@[60; 64) "2i32" | ||
53 | R_PAREN@[64; 65) ")" | ||
54 | SEMI@[65; 66) ";" | ||
55 | WHITESPACE@[66; 71) "\n " | ||
56 | LET_STMT@[71; 103) | ||
57 | LET_KW@[71; 74) "let" | ||
58 | WHITESPACE@[74; 75) " " | ||
59 | BIND_PAT@[75; 76) | ||
60 | NAME@[75; 76) | ||
61 | IDENT@[75; 76) "z" | ||
62 | WHITESPACE@[76; 77) " " | ||
63 | EQ@[77; 78) "=" | ||
64 | WHITESPACE@[78; 79) " " | ||
65 | CALL_EXPR@[79; 102) | ||
66 | PATH_EXPR@[79; 82) | ||
67 | PATH@[79; 82) | ||
68 | PATH_SEGMENT@[79; 82) | ||
69 | NAME_REF@[79; 82) | ||
70 | IDENT@[79; 82) "Foo" | ||
71 | ARG_LIST@[82; 102) | ||
72 | L_PAREN@[82; 83) "(" | ||
73 | BOX_EXPR@[83; 91) | ||
74 | BOX_KW@[83; 86) "box" | ||
75 | WHITESPACE@[86; 87) " " | ||
76 | LITERAL@[87; 91) | ||
77 | INT_NUMBER@[87; 91) "1i32" | ||
78 | COMMA@[91; 92) "," | ||
79 | WHITESPACE@[92; 93) " " | ||
80 | BOX_EXPR@[93; 101) | ||
81 | BOX_KW@[93; 96) "box" | ||
82 | WHITESPACE@[96; 97) " " | ||
83 | LITERAL@[97; 101) | ||
84 | INT_NUMBER@[97; 101) "2i32" | ||
85 | R_PAREN@[101; 102) ")" | ||
86 | SEMI@[102; 103) ";" | ||
87 | WHITESPACE@[103; 104) "\n" | ||
88 | R_CURLY@[104; 105) "}" | ||
89 | WHITESPACE@[105; 106) "\n" | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0132_default_fn_type.rs b/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rs index 8f5d61113..8f5d61113 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0132_default_fn_type.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0132_default_fn_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.txt index 384b203d3..384b203d3 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0132_default_fn_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0134_nocontentexpr_after_item.rs b/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rs index eadc7fffb..eadc7fffb 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0134_nocontentexpr_after_item.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0134_nocontentexpr_after_item.txt b/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.txt index 50d3b5def..50d3b5def 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0134_nocontentexpr_after_item.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0135_first_array_member_attributes.rs b/crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.rs index f59e13771..f59e13771 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0135_first_array_member_attributes.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0135_first_array_member_attributes.txt b/crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.txt index eac4f6f30..eac4f6f30 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0135_first_array_member_attributes.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0136_subsequent_array_member_attributes.rs b/crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.rs index 1324acb3f..1324acb3f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0136_subsequent_array_member_attributes.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0136_subsequent_array_member_attributes.txt b/crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.txt index 6fa1b42d9..6fa1b42d9 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0136_subsequent_array_member_attributes.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0137_await_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.rs index d2ba89ca6..d2ba89ca6 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0137_await_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0137_await_expr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.txt index 99bd76ace..99bd76ace 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0137_await_expr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0000_empty.rs b/crates/ra_syntax/test_data/parser/ok/0000_empty.rs index e69de29bb..e69de29bb 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0000_empty.rs +++ b/crates/ra_syntax/test_data/parser/ok/0000_empty.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0000_empty.txt b/crates/ra_syntax/test_data/parser/ok/0000_empty.txt index 08f5a942f..08f5a942f 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0000_empty.txt +++ b/crates/ra_syntax/test_data/parser/ok/0000_empty.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0001_struct_item.rs b/crates/ra_syntax/test_data/parser/ok/0001_struct_item.rs index 512aeb3e7..512aeb3e7 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0001_struct_item.rs +++ b/crates/ra_syntax/test_data/parser/ok/0001_struct_item.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0001_struct_item.txt b/crates/ra_syntax/test_data/parser/ok/0001_struct_item.txt index c6653cf25..c6653cf25 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0001_struct_item.txt +++ b/crates/ra_syntax/test_data/parser/ok/0001_struct_item.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0002_struct_item_field.rs b/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rs index cc3866d25..cc3866d25 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0002_struct_item_field.rs +++ b/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0002_struct_item_field.txt b/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.txt index d0565ea83..d0565ea83 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0002_struct_item_field.txt +++ b/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0004_file_shebang.rs b/crates/ra_syntax/test_data/parser/ok/0004_file_shebang.rs index 53dc9e617..53dc9e617 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0004_file_shebang.rs +++ b/crates/ra_syntax/test_data/parser/ok/0004_file_shebang.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0004_file_shebang.txt b/crates/ra_syntax/test_data/parser/ok/0004_file_shebang.txt index e3915c2df..e3915c2df 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0004_file_shebang.txt +++ b/crates/ra_syntax/test_data/parser/ok/0004_file_shebang.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0005_fn_item.rs b/crates/ra_syntax/test_data/parser/ok/0005_fn_item.rs index 03210551c..03210551c 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0005_fn_item.rs +++ b/crates/ra_syntax/test_data/parser/ok/0005_fn_item.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0005_fn_item.txt b/crates/ra_syntax/test_data/parser/ok/0005_fn_item.txt index 9b63a24e4..9b63a24e4 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0005_fn_item.txt +++ b/crates/ra_syntax/test_data/parser/ok/0005_fn_item.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0006_inner_attributes.rs b/crates/ra_syntax/test_data/parser/ok/0006_inner_attributes.rs index e81f8b1e8..e81f8b1e8 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0006_inner_attributes.rs +++ b/crates/ra_syntax/test_data/parser/ok/0006_inner_attributes.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0006_inner_attributes.txt b/crates/ra_syntax/test_data/parser/ok/0006_inner_attributes.txt index d8cabc9af..d8cabc9af 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0006_inner_attributes.txt +++ b/crates/ra_syntax/test_data/parser/ok/0006_inner_attributes.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0007_extern_crate.rs b/crates/ra_syntax/test_data/parser/ok/0007_extern_crate.rs index ab81a608c..ab81a608c 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0007_extern_crate.rs +++ b/crates/ra_syntax/test_data/parser/ok/0007_extern_crate.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0007_extern_crate.txt b/crates/ra_syntax/test_data/parser/ok/0007_extern_crate.txt index 1ffa36c7e..1ffa36c7e 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0007_extern_crate.txt +++ b/crates/ra_syntax/test_data/parser/ok/0007_extern_crate.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0008_mod_item.rs b/crates/ra_syntax/test_data/parser/ok/0008_mod_item.rs index d22993bc1..d22993bc1 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0008_mod_item.rs +++ b/crates/ra_syntax/test_data/parser/ok/0008_mod_item.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0008_mod_item.txt b/crates/ra_syntax/test_data/parser/ok/0008_mod_item.txt index 9152d6eb6..9152d6eb6 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0008_mod_item.txt +++ b/crates/ra_syntax/test_data/parser/ok/0008_mod_item.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0009_use_item.rs b/crates/ra_syntax/test_data/parser/ok/0009_use_item.rs index 05a6aff83..05a6aff83 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0009_use_item.rs +++ b/crates/ra_syntax/test_data/parser/ok/0009_use_item.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0009_use_item.txt b/crates/ra_syntax/test_data/parser/ok/0009_use_item.txt index 41db9dbb7..41db9dbb7 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0009_use_item.txt +++ b/crates/ra_syntax/test_data/parser/ok/0009_use_item.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0010_use_path_segments.rs b/crates/ra_syntax/test_data/parser/ok/0010_use_path_segments.rs index 1e71b7a6c..1e71b7a6c 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0010_use_path_segments.rs +++ b/crates/ra_syntax/test_data/parser/ok/0010_use_path_segments.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0010_use_path_segments.txt b/crates/ra_syntax/test_data/parser/ok/0010_use_path_segments.txt index 09871b84d..09871b84d 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0010_use_path_segments.txt +++ b/crates/ra_syntax/test_data/parser/ok/0010_use_path_segments.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0011_outer_attribute.rs b/crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.rs index 8b80c0d90..8b80c0d90 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0011_outer_attribute.rs +++ b/crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0011_outer_attribute.txt b/crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.txt index 2a0dc7bad..2a0dc7bad 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0011_outer_attribute.txt +++ b/crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0012_visibility.rs b/crates/ra_syntax/test_data/parser/ok/0012_visibility.rs index 75b1db121..75b1db121 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0012_visibility.rs +++ b/crates/ra_syntax/test_data/parser/ok/0012_visibility.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0012_visibility.txt b/crates/ra_syntax/test_data/parser/ok/0012_visibility.txt index c9d038c19..c9d038c19 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0012_visibility.txt +++ b/crates/ra_syntax/test_data/parser/ok/0012_visibility.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0013_use_path_self_super.rs b/crates/ra_syntax/test_data/parser/ok/0013_use_path_self_super.rs index faf6a42c7..faf6a42c7 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0013_use_path_self_super.rs +++ b/crates/ra_syntax/test_data/parser/ok/0013_use_path_self_super.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0013_use_path_self_super.txt b/crates/ra_syntax/test_data/parser/ok/0013_use_path_self_super.txt index 50730e958..50730e958 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0013_use_path_self_super.txt +++ b/crates/ra_syntax/test_data/parser/ok/0013_use_path_self_super.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0014_use_tree.rs b/crates/ra_syntax/test_data/parser/ok/0014_use_tree.rs index 5e4aa3a33..5e4aa3a33 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0014_use_tree.rs +++ b/crates/ra_syntax/test_data/parser/ok/0014_use_tree.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0014_use_tree.txt b/crates/ra_syntax/test_data/parser/ok/0014_use_tree.txt index 3fe34d001..3fe34d001 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0014_use_tree.txt +++ b/crates/ra_syntax/test_data/parser/ok/0014_use_tree.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0015_use_tree.rs b/crates/ra_syntax/test_data/parser/ok/0015_use_tree.rs index 46a0783a2..46a0783a2 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0015_use_tree.rs +++ b/crates/ra_syntax/test_data/parser/ok/0015_use_tree.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0015_use_tree.txt b/crates/ra_syntax/test_data/parser/ok/0015_use_tree.txt index e63f14253..e63f14253 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0015_use_tree.txt +++ b/crates/ra_syntax/test_data/parser/ok/0015_use_tree.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0016_struct_flavors.rs b/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rs index 69638350c..69638350c 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0016_struct_flavors.rs +++ b/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0016_struct_flavors.txt b/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.txt index ac44093e8..ac44093e8 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0016_struct_flavors.txt +++ b/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0017_attr_trailing_comma.rs b/crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.rs index fe0a7bb97..fe0a7bb97 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0017_attr_trailing_comma.rs +++ b/crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0017_attr_trailing_comma.txt b/crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.txt index cd8f038de..cd8f038de 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0017_attr_trailing_comma.txt +++ b/crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0018_struct_type_params.rs b/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rs index 88c544923..88c544923 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0018_struct_type_params.rs +++ b/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0018_struct_type_params.txt b/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.txt index 3f06f20f9..3f06f20f9 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0018_struct_type_params.txt +++ b/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0019_enums.rs b/crates/ra_syntax/test_data/parser/ok/0019_enums.rs index 7a1afa0e6..7a1afa0e6 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0019_enums.rs +++ b/crates/ra_syntax/test_data/parser/ok/0019_enums.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0019_enums.txt b/crates/ra_syntax/test_data/parser/ok/0019_enums.txt index 37753a7d0..37753a7d0 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0019_enums.txt +++ b/crates/ra_syntax/test_data/parser/ok/0019_enums.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0020_type_param_bounds.rs b/crates/ra_syntax/test_data/parser/ok/0020_type_param_bounds.rs index 712898978..712898978 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0020_type_param_bounds.rs +++ b/crates/ra_syntax/test_data/parser/ok/0020_type_param_bounds.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0020_type_param_bounds.txt b/crates/ra_syntax/test_data/parser/ok/0020_type_param_bounds.txt index 18a5fd784..18a5fd784 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0020_type_param_bounds.txt +++ b/crates/ra_syntax/test_data/parser/ok/0020_type_param_bounds.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0021_extern_fn.rs b/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rs index e929eef74..e929eef74 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0021_extern_fn.rs +++ b/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0021_extern_fn.txt b/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.txt index a4e75ec75..a4e75ec75 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0021_extern_fn.txt +++ b/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0022_empty_extern_block.rs b/crates/ra_syntax/test_data/parser/ok/0022_empty_extern_block.rs index f5fe0e6ef..f5fe0e6ef 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0022_empty_extern_block.rs +++ b/crates/ra_syntax/test_data/parser/ok/0022_empty_extern_block.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0022_empty_extern_block.txt b/crates/ra_syntax/test_data/parser/ok/0022_empty_extern_block.txt index bbbd95fd9..bbbd95fd9 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0022_empty_extern_block.txt +++ b/crates/ra_syntax/test_data/parser/ok/0022_empty_extern_block.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0023_static_items.rs b/crates/ra_syntax/test_data/parser/ok/0023_static_items.rs index 5fb92ce33..5fb92ce33 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0023_static_items.rs +++ b/crates/ra_syntax/test_data/parser/ok/0023_static_items.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0023_static_items.txt b/crates/ra_syntax/test_data/parser/ok/0023_static_items.txt index 5591f95eb..5591f95eb 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0023_static_items.txt +++ b/crates/ra_syntax/test_data/parser/ok/0023_static_items.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0024_const_item.rs b/crates/ra_syntax/test_data/parser/ok/0024_const_item.rs index 7446859b5..7446859b5 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0024_const_item.rs +++ b/crates/ra_syntax/test_data/parser/ok/0024_const_item.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0024_const_item.txt b/crates/ra_syntax/test_data/parser/ok/0024_const_item.txt index dea8a3a97..dea8a3a97 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0024_const_item.txt +++ b/crates/ra_syntax/test_data/parser/ok/0024_const_item.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0025_extern_fn_in_block.rs b/crates/ra_syntax/test_data/parser/ok/0025_extern_fn_in_block.rs index 289809809..289809809 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0025_extern_fn_in_block.rs +++ b/crates/ra_syntax/test_data/parser/ok/0025_extern_fn_in_block.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0025_extern_fn_in_block.txt b/crates/ra_syntax/test_data/parser/ok/0025_extern_fn_in_block.txt index a345f4bc2..a345f4bc2 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0025_extern_fn_in_block.txt +++ b/crates/ra_syntax/test_data/parser/ok/0025_extern_fn_in_block.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0026_const_fn_in_block.rs b/crates/ra_syntax/test_data/parser/ok/0026_const_fn_in_block.rs index 7641a3d28..7641a3d28 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0026_const_fn_in_block.rs +++ b/crates/ra_syntax/test_data/parser/ok/0026_const_fn_in_block.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0026_const_fn_in_block.txt b/crates/ra_syntax/test_data/parser/ok/0026_const_fn_in_block.txt index cbcd15a00..cbcd15a00 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0026_const_fn_in_block.txt +++ b/crates/ra_syntax/test_data/parser/ok/0026_const_fn_in_block.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0027_unsafe_fn_in_block.rs b/crates/ra_syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rs index f3c5ff938..f3c5ff938 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0027_unsafe_fn_in_block.rs +++ b/crates/ra_syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0027_unsafe_fn_in_block.txt b/crates/ra_syntax/test_data/parser/ok/0027_unsafe_fn_in_block.txt index f86375983..f86375983 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0027_unsafe_fn_in_block.txt +++ b/crates/ra_syntax/test_data/parser/ok/0027_unsafe_fn_in_block.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0028_operator_binding_power.rs b/crates/ra_syntax/test_data/parser/ok/0028_operator_binding_power.rs index cc9598470..cc9598470 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0028_operator_binding_power.rs +++ b/crates/ra_syntax/test_data/parser/ok/0028_operator_binding_power.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0028_operator_binding_power.txt b/crates/ra_syntax/test_data/parser/ok/0028_operator_binding_power.txt index b0667643b..b0667643b 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0028_operator_binding_power.txt +++ b/crates/ra_syntax/test_data/parser/ok/0028_operator_binding_power.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0029_range_forms.rs b/crates/ra_syntax/test_data/parser/ok/0029_range_forms.rs index f9ff444d4..f9ff444d4 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0029_range_forms.rs +++ b/crates/ra_syntax/test_data/parser/ok/0029_range_forms.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0029_range_forms.txt b/crates/ra_syntax/test_data/parser/ok/0029_range_forms.txt index e4db98c88..e4db98c88 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0029_range_forms.txt +++ b/crates/ra_syntax/test_data/parser/ok/0029_range_forms.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0030_string_suffixes.rs b/crates/ra_syntax/test_data/parser/ok/0030_string_suffixes.rs index 261aad1fb..261aad1fb 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0030_string_suffixes.rs +++ b/crates/ra_syntax/test_data/parser/ok/0030_string_suffixes.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0030_string_suffixes.txt b/crates/ra_syntax/test_data/parser/ok/0030_string_suffixes.txt index 4f7e809c5..4f7e809c5 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0030_string_suffixes.txt +++ b/crates/ra_syntax/test_data/parser/ok/0030_string_suffixes.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0030_traits.rs b/crates/ra_syntax/test_data/parser/ok/0030_traits.rs index 23c4be0e1..23c4be0e1 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0030_traits.rs +++ b/crates/ra_syntax/test_data/parser/ok/0030_traits.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0030_traits.txt b/crates/ra_syntax/test_data/parser/ok/0030_traits.txt index b656c1a81..b656c1a81 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0030_traits.txt +++ b/crates/ra_syntax/test_data/parser/ok/0030_traits.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0031_extern.rs b/crates/ra_syntax/test_data/parser/ok/0031_extern.rs index b33ac273c..b33ac273c 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0031_extern.rs +++ b/crates/ra_syntax/test_data/parser/ok/0031_extern.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0031_extern.txt b/crates/ra_syntax/test_data/parser/ok/0031_extern.txt index badbf76c5..badbf76c5 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0031_extern.txt +++ b/crates/ra_syntax/test_data/parser/ok/0031_extern.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0032_where_for.rs b/crates/ra_syntax/test_data/parser/ok/0032_where_for.rs index 588170fbe..588170fbe 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0032_where_for.rs +++ b/crates/ra_syntax/test_data/parser/ok/0032_where_for.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0032_where_for.txt b/crates/ra_syntax/test_data/parser/ok/0032_where_for.txt index 9b1d0e84a..9b1d0e84a 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0032_where_for.txt +++ b/crates/ra_syntax/test_data/parser/ok/0032_where_for.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0033_label_break.rs b/crates/ra_syntax/test_data/parser/ok/0033_label_break.rs index 728d78137..728d78137 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0033_label_break.rs +++ b/crates/ra_syntax/test_data/parser/ok/0033_label_break.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0033_label_break.txt b/crates/ra_syntax/test_data/parser/ok/0033_label_break.txt index 845a8d7af..845a8d7af 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0033_label_break.txt +++ b/crates/ra_syntax/test_data/parser/ok/0033_label_break.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0034_crate_path_in_call.rs b/crates/ra_syntax/test_data/parser/ok/0034_crate_path_in_call.rs index f1ed30220..f1ed30220 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0034_crate_path_in_call.rs +++ b/crates/ra_syntax/test_data/parser/ok/0034_crate_path_in_call.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0034_crate_path_in_call.txt b/crates/ra_syntax/test_data/parser/ok/0034_crate_path_in_call.txt index a77d4aabe..a77d4aabe 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0034_crate_path_in_call.txt +++ b/crates/ra_syntax/test_data/parser/ok/0034_crate_path_in_call.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0035_weird_exprs.rs b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rs index 8c1323163..8c1323163 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0035_weird_exprs.rs +++ b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0035_weird_exprs.txt b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.txt index c89b591e9..c89b591e9 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0035_weird_exprs.txt +++ b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.rs b/crates/ra_syntax/test_data/parser/ok/0036_fully_qualified.rs index 6da27933e..6da27933e 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.rs +++ b/crates/ra_syntax/test_data/parser/ok/0036_fully_qualified.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.txt b/crates/ra_syntax/test_data/parser/ok/0036_fully_qualified.txt index 86263c0bb..86263c0bb 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.txt +++ b/crates/ra_syntax/test_data/parser/ok/0036_fully_qualified.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0037_mod.rs b/crates/ra_syntax/test_data/parser/ok/0037_mod.rs index 7e5a1b835..7e5a1b835 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0037_mod.rs +++ b/crates/ra_syntax/test_data/parser/ok/0037_mod.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0037_mod.txt b/crates/ra_syntax/test_data/parser/ok/0037_mod.txt index 3af40a104..3af40a104 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0037_mod.txt +++ b/crates/ra_syntax/test_data/parser/ok/0037_mod.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0038_where_pred_type.rs b/crates/ra_syntax/test_data/parser/ok/0038_where_pred_type.rs index 8bfc341a5..8bfc341a5 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0038_where_pred_type.rs +++ b/crates/ra_syntax/test_data/parser/ok/0038_where_pred_type.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0038_where_pred_type.txt b/crates/ra_syntax/test_data/parser/ok/0038_where_pred_type.txt index 7a5507473..7a5507473 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0038_where_pred_type.txt +++ b/crates/ra_syntax/test_data/parser/ok/0038_where_pred_type.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0039_raw_fn_item.rs b/crates/ra_syntax/test_data/parser/ok/0039_raw_fn_item.rs index 8380d1e79..8380d1e79 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0039_raw_fn_item.rs +++ b/crates/ra_syntax/test_data/parser/ok/0039_raw_fn_item.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0039_raw_fn_item.txt b/crates/ra_syntax/test_data/parser/ok/0039_raw_fn_item.txt index 69fac87e3..69fac87e3 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0039_raw_fn_item.txt +++ b/crates/ra_syntax/test_data/parser/ok/0039_raw_fn_item.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0040_raw_struct_item_field.rs b/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rs index 098a60a72..098a60a72 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0040_raw_struct_item_field.rs +++ b/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0040_raw_struct_item_field.txt b/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.txt index 3c717555d..3c717555d 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0040_raw_struct_item_field.txt +++ b/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0041_raw_keywords.rs b/crates/ra_syntax/test_data/parser/ok/0041_raw_keywords.rs index d59a6d347..d59a6d347 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0041_raw_keywords.rs +++ b/crates/ra_syntax/test_data/parser/ok/0041_raw_keywords.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0041_raw_keywords.txt b/crates/ra_syntax/test_data/parser/ok/0041_raw_keywords.txt index 554b52f85..554b52f85 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0041_raw_keywords.txt +++ b/crates/ra_syntax/test_data/parser/ok/0041_raw_keywords.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0042_ufcs_call_list.rs b/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rs index 6c02e65ed..6c02e65ed 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0042_ufcs_call_list.rs +++ b/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0042_ufcs_call_list.txt b/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.txt index 19951011e..19951011e 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0042_ufcs_call_list.txt +++ b/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0043_complex_assignment.rs b/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rs index 7e4a28bf7..7e4a28bf7 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0043_complex_assignment.rs +++ b/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0043_complex_assignment.txt b/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.txt index ef47521bf..ef47521bf 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0043_complex_assignment.txt +++ b/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0044_let_attrs.rs b/crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rs index 325a97aeb..325a97aeb 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0044_let_attrs.rs +++ b/crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0044_let_attrs.txt b/crates/ra_syntax/test_data/parser/ok/0044_let_attrs.txt index b928adaad..b928adaad 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0044_let_attrs.txt +++ b/crates/ra_syntax/test_data/parser/ok/0044_let_attrs.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0045_block_inner_attrs.rs b/crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rs index 88df8138e..88df8138e 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0045_block_inner_attrs.rs +++ b/crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0045_block_inner_attrs.txt b/crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.txt index f6d3bf302..f6d3bf302 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0045_block_inner_attrs.txt +++ b/crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0046_extern_inner_attributes.rs b/crates/ra_syntax/test_data/parser/ok/0046_extern_inner_attributes.rs index fe67e2df4..fe67e2df4 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0046_extern_inner_attributes.rs +++ b/crates/ra_syntax/test_data/parser/ok/0046_extern_inner_attributes.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0046_extern_inner_attributes.txt b/crates/ra_syntax/test_data/parser/ok/0046_extern_inner_attributes.txt index 4487a6e2e..4487a6e2e 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0046_extern_inner_attributes.txt +++ b/crates/ra_syntax/test_data/parser/ok/0046_extern_inner_attributes.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0047_minus_in_inner_pattern.rs b/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rs index bbd6b0f6e..bbd6b0f6e 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0047_minus_in_inner_pattern.rs +++ b/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0047_minus_in_inner_pattern.txt b/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.txt index 917b50ddf..917b50ddf 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0047_minus_in_inner_pattern.txt +++ b/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0048_compound_assignment.rs b/crates/ra_syntax/test_data/parser/ok/0048_compound_assignment.rs index 871720a49..871720a49 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0048_compound_assignment.rs +++ b/crates/ra_syntax/test_data/parser/ok/0048_compound_assignment.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0048_compound_assignment.txt b/crates/ra_syntax/test_data/parser/ok/0048_compound_assignment.txt index 3fca4993a..3fca4993a 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0048_compound_assignment.txt +++ b/crates/ra_syntax/test_data/parser/ok/0048_compound_assignment.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0049_async_block.rs b/crates/ra_syntax/test_data/parser/ok/0049_async_block.rs index 4781b3225..4781b3225 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0049_async_block.rs +++ b/crates/ra_syntax/test_data/parser/ok/0049_async_block.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0049_async_block.txt b/crates/ra_syntax/test_data/parser/ok/0049_async_block.txt index 517982ddc..517982ddc 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0049_async_block.txt +++ b/crates/ra_syntax/test_data/parser/ok/0049_async_block.txt | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0050_async_block_as_argument.rs b/crates/ra_syntax/test_data/parser/ok/0050_async_block_as_argument.rs index ec4612cff..ec4612cff 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0050_async_block_as_argument.rs +++ b/crates/ra_syntax/test_data/parser/ok/0050_async_block_as_argument.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0050_async_block_as_argument.txt b/crates/ra_syntax/test_data/parser/ok/0050_async_block_as_argument.txt index 64da5878b..64da5878b 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0050_async_block_as_argument.txt +++ b/crates/ra_syntax/test_data/parser/ok/0050_async_block_as_argument.txt | |||
diff --git a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0000.rs b/crates/ra_syntax/test_data/reparse/fuzz-failures/0000.rs index 388eb74ed..388eb74ed 100644 --- a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0000.rs +++ b/crates/ra_syntax/test_data/reparse/fuzz-failures/0000.rs | |||
diff --git a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0001.rs b/crates/ra_syntax/test_data/reparse/fuzz-failures/0001.rs index d2d42c6f9..d2d42c6f9 100644 --- a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0001.rs +++ b/crates/ra_syntax/test_data/reparse/fuzz-failures/0001.rs | |||
diff --git a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0002.rs b/crates/ra_syntax/test_data/reparse/fuzz-failures/0002.rs index 3fbee1548..3fbee1548 100644 --- a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0002.rs +++ b/crates/ra_syntax/test_data/reparse/fuzz-failures/0002.rs | |||
diff --git a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0003.rs b/crates/ra_syntax/test_data/reparse/fuzz-failures/0003.rs index d2757cd08..d2757cd08 100644 --- a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0003.rs +++ b/crates/ra_syntax/test_data/reparse/fuzz-failures/0003.rs | |||
Binary files differ | |||
diff --git a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0004.rs b/crates/ra_syntax/test_data/reparse/fuzz-failures/0004.rs index 481617a70..481617a70 100644 --- a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0004.rs +++ b/crates/ra_syntax/test_data/reparse/fuzz-failures/0004.rs | |||
diff --git a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0005.rs b/crates/ra_syntax/test_data/reparse/fuzz-failures/0005.rs index 074d761c7..074d761c7 100644 --- a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0005.rs +++ b/crates/ra_syntax/test_data/reparse/fuzz-failures/0005.rs | |||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0132_box_expr.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0132_box_expr.rs deleted file mode 100644 index e69c81e22..000000000 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0132_box_expr.rs +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | fn foo() { | ||
2 | let x = box 1i32; | ||
3 | } | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0132_box_expr.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0132_box_expr.txt deleted file mode 100644 index f4eeb7e24..000000000 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0132_box_expr.txt +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | SOURCE_FILE@[0; 35) | ||
2 | FN_DEF@[0; 34) | ||
3 | FN_KW@[0; 2) "fn" | ||
4 | WHITESPACE@[2; 3) " " | ||
5 | NAME@[3; 6) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 8) | ||
8 | L_PAREN@[6; 7) "(" | ||
9 | R_PAREN@[7; 8) ")" | ||
10 | WHITESPACE@[8; 9) " " | ||
11 | BLOCK@[9; 34) | ||
12 | L_CURLY@[9; 10) "{" | ||
13 | WHITESPACE@[10; 15) "\n " | ||
14 | LET_STMT@[15; 32) | ||
15 | LET_KW@[15; 18) "let" | ||
16 | WHITESPACE@[18; 19) " " | ||
17 | BIND_PAT@[19; 20) | ||
18 | NAME@[19; 20) | ||
19 | IDENT@[19; 20) "x" | ||
20 | WHITESPACE@[20; 21) " " | ||
21 | EQ@[21; 22) "=" | ||
22 | WHITESPACE@[22; 23) " " | ||
23 | BOX_EXPR@[23; 31) | ||
24 | BOX_KW@[23; 26) "box" | ||
25 | WHITESPACE@[26; 27) " " | ||
26 | LITERAL@[27; 31) | ||
27 | INT_NUMBER@[27; 31) "1i32" | ||
28 | SEMI@[31; 32) ";" | ||
29 | WHITESPACE@[32; 33) "\n" | ||
30 | R_CURLY@[33; 34) "}" | ||
31 | WHITESPACE@[34; 35) "\n" | ||
diff --git a/crates/ra_tools/src/lib.rs b/crates/ra_tools/src/lib.rs index d56e0d2ef..bb7845f7d 100644 --- a/crates/ra_tools/src/lib.rs +++ b/crates/ra_tools/src/lib.rs | |||
@@ -15,8 +15,8 @@ pub type Result<T> = std::result::Result<T, Box<dyn Error>>; | |||
15 | 15 | ||
16 | pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron"; | 16 | pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron"; |
17 | const GRAMMAR_DIR: &str = "crates/ra_parser/src/grammar"; | 17 | const GRAMMAR_DIR: &str = "crates/ra_parser/src/grammar"; |
18 | const OK_INLINE_TESTS_DIR: &str = "crates/ra_syntax/tests/data/parser/inline/ok"; | 18 | const OK_INLINE_TESTS_DIR: &str = "crates/ra_syntax/test_data/parser/inline/ok"; |
19 | const ERR_INLINE_TESTS_DIR: &str = "crates/ra_syntax/tests/data/parser/inline/err"; | 19 | const ERR_INLINE_TESTS_DIR: &str = "crates/ra_syntax/test_data/parser/inline/err"; |
20 | 20 | ||
21 | pub const SYNTAX_KINDS: &str = "crates/ra_parser/src/syntax_kind/generated.rs.tera"; | 21 | pub const SYNTAX_KINDS: &str = "crates/ra_parser/src/syntax_kind/generated.rs.tera"; |
22 | pub const AST: &str = "crates/ra_syntax/src/ast/generated.rs.tera"; | 22 | pub const AST: &str = "crates/ra_syntax/src/ast/generated.rs.tera"; |
@@ -79,6 +79,29 @@ pub fn project_root() -> PathBuf { | |||
79 | Path::new(&env!("CARGO_MANIFEST_DIR")).ancestors().nth(2).unwrap().to_path_buf() | 79 | Path::new(&env!("CARGO_MANIFEST_DIR")).ancestors().nth(2).unwrap().to_path_buf() |
80 | } | 80 | } |
81 | 81 | ||
82 | pub struct Cmd { | ||
83 | pub unix: &'static str, | ||
84 | pub windows: &'static str, | ||
85 | pub work_dir: &'static str, | ||
86 | } | ||
87 | |||
88 | impl Cmd { | ||
89 | pub fn run(self) -> Result<()> { | ||
90 | if cfg!(windows) { | ||
91 | run(self.windows, self.work_dir) | ||
92 | } else { | ||
93 | run(self.unix, self.work_dir) | ||
94 | } | ||
95 | } | ||
96 | pub fn run_with_output(self) -> Result<Output> { | ||
97 | if cfg!(windows) { | ||
98 | run_with_output(self.windows, self.work_dir) | ||
99 | } else { | ||
100 | run_with_output(self.unix, self.work_dir) | ||
101 | } | ||
102 | } | ||
103 | } | ||
104 | |||
82 | pub fn run(cmdline: &str, dir: &str) -> Result<()> { | 105 | pub fn run(cmdline: &str, dir: &str) -> Result<()> { |
83 | do_run(cmdline, dir, |c| { | 106 | do_run(cmdline, dir, |c| { |
84 | c.stdout(Stdio::inherit()); | 107 | c.stdout(Stdio::inherit()); |
diff --git a/crates/ra_tools/src/main.rs b/crates/ra_tools/src/main.rs index 7ed592f71..4fcb2adeb 100644 --- a/crates/ra_tools/src/main.rs +++ b/crates/ra_tools/src/main.rs | |||
@@ -1,70 +1,73 @@ | |||
1 | use clap::{App, SubCommand}; | 1 | use clap::{App, Arg, SubCommand}; |
2 | use core::str; | 2 | use core::str; |
3 | use ra_tools::{ | 3 | use ra_tools::{ |
4 | gen_tests, generate, install_format_hook, run, run_clippy, run_fuzzer, run_rustfmt, | 4 | gen_tests, generate, install_format_hook, run, run_clippy, run_fuzzer, run_rustfmt, Cmd, |
5 | run_with_output, Overwrite, Result, | 5 | Overwrite, Result, |
6 | }; | 6 | }; |
7 | use std::{env, path::PathBuf}; | 7 | use std::{env, path::PathBuf}; |
8 | 8 | ||
9 | struct InstallOpt { | ||
10 | client: Option<ClientOpt>, | ||
11 | server: Option<ServerOpt>, | ||
12 | } | ||
13 | |||
14 | enum ClientOpt { | ||
15 | VsCode, | ||
16 | } | ||
17 | |||
18 | struct ServerOpt { | ||
19 | jemalloc: bool, | ||
20 | } | ||
21 | |||
9 | fn main() -> Result<()> { | 22 | fn main() -> Result<()> { |
10 | let matches = App::new("tasks") | 23 | let matches = App::new("tasks") |
11 | .setting(clap::AppSettings::SubcommandRequiredElseHelp) | 24 | .setting(clap::AppSettings::SubcommandRequiredElseHelp) |
12 | .subcommand(SubCommand::with_name("gen-syntax")) | 25 | .subcommand(SubCommand::with_name("gen-syntax")) |
13 | .subcommand(SubCommand::with_name("gen-tests")) | 26 | .subcommand(SubCommand::with_name("gen-tests")) |
14 | .subcommand(SubCommand::with_name("install-code")) | 27 | .subcommand( |
28 | SubCommand::with_name("install-ra") | ||
29 | .arg(Arg::with_name("server").long("--server")) | ||
30 | .arg(Arg::with_name("jemalloc").long("jemalloc")) | ||
31 | .arg(Arg::with_name("client-code").long("client-code").conflicts_with("server")), | ||
32 | ) | ||
33 | .alias("install-code") | ||
15 | .subcommand(SubCommand::with_name("format")) | 34 | .subcommand(SubCommand::with_name("format")) |
16 | .subcommand(SubCommand::with_name("format-hook")) | 35 | .subcommand(SubCommand::with_name("format-hook")) |
17 | .subcommand(SubCommand::with_name("fuzz-tests")) | 36 | .subcommand(SubCommand::with_name("fuzz-tests")) |
18 | .subcommand(SubCommand::with_name("lint")) | 37 | .subcommand(SubCommand::with_name("lint")) |
19 | .get_matches(); | 38 | .get_matches(); |
20 | match matches.subcommand_name().expect("Subcommand must be specified") { | 39 | match matches.subcommand() { |
21 | "install-code" => { | 40 | ("install-ra", Some(matches)) => { |
22 | if cfg!(target_os = "macos") { | 41 | let opts = InstallOpt { |
23 | fix_path_for_mac()?; | 42 | client: if matches.is_present("server") { None } else { Some(ClientOpt::VsCode) }, |
24 | } | 43 | server: if matches.is_present("client-code") { |
25 | install_code_extension()?; | 44 | None |
45 | } else { | ||
46 | Some(ServerOpt { jemalloc: matches.is_present("jemalloc") }) | ||
47 | }, | ||
48 | }; | ||
49 | install(opts)? | ||
26 | } | 50 | } |
27 | "gen-tests" => gen_tests(Overwrite)?, | 51 | ("gen-tests", _) => gen_tests(Overwrite)?, |
28 | "gen-syntax" => generate(Overwrite)?, | 52 | ("gen-syntax", _) => generate(Overwrite)?, |
29 | "format" => run_rustfmt(Overwrite)?, | 53 | ("format", _) => run_rustfmt(Overwrite)?, |
30 | "format-hook" => install_format_hook()?, | 54 | ("format-hook", _) => install_format_hook()?, |
31 | "lint" => run_clippy()?, | 55 | ("lint", _) => run_clippy()?, |
32 | "fuzz-tests" => run_fuzzer()?, | 56 | ("fuzz-tests", _) => run_fuzzer()?, |
33 | _ => unreachable!(), | 57 | _ => unreachable!(), |
34 | } | 58 | } |
35 | Ok(()) | 59 | Ok(()) |
36 | } | 60 | } |
37 | 61 | ||
38 | fn install_code_extension() -> Result<()> { | 62 | fn install(opts: InstallOpt) -> Result<()> { |
39 | run("cargo install --path crates/ra_lsp_server --force", ".")?; | 63 | if cfg!(target_os = "macos") { |
40 | if cfg!(windows) { | 64 | fix_path_for_mac()? |
41 | run(r"cmd.exe /c npm.cmd ci", "./editors/code")?; | ||
42 | run(r"cmd.exe /c npm.cmd run package", "./editors/code")?; | ||
43 | } else { | ||
44 | run(r"npm ci", "./editors/code")?; | ||
45 | run(r"npm run package", "./editors/code")?; | ||
46 | } | 65 | } |
47 | if cfg!(windows) { | 66 | if let Some(client) = opts.client { |
48 | run( | 67 | install_client(client)?; |
49 | r"cmd.exe /c code.cmd --install-extension ./ra-lsp-0.0.1.vsix --force", | ||
50 | "./editors/code", | ||
51 | )?; | ||
52 | } else { | ||
53 | run(r"code --install-extension ./ra-lsp-0.0.1.vsix --force", "./editors/code")?; | ||
54 | } | 68 | } |
55 | verify_installed_extensions()?; | 69 | if let Some(server) = opts.server { |
56 | Ok(()) | 70 | install_server(server)?; |
57 | } | ||
58 | |||
59 | fn verify_installed_extensions() -> Result<()> { | ||
60 | let exts = if cfg!(windows) { | ||
61 | run_with_output(r"cmd.exe /c code.cmd --list-extensions", ".")? | ||
62 | } else { | ||
63 | run_with_output(r"code --list-extensions", ".")? | ||
64 | }; | ||
65 | if !str::from_utf8(&exts.stdout)?.contains("ra-lsp") { | ||
66 | Err("Could not install the Visual Studio Code extension. Please make sure you \ | ||
67 | have at least NodeJS 10.x installed and try again.")?; | ||
68 | } | 71 | } |
69 | Ok(()) | 72 | Ok(()) |
70 | } | 73 | } |
@@ -101,3 +104,53 @@ fn fix_path_for_mac() -> Result<()> { | |||
101 | 104 | ||
102 | Ok(()) | 105 | Ok(()) |
103 | } | 106 | } |
107 | |||
108 | fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> { | ||
109 | Cmd { unix: r"npm ci", windows: r"cmd.exe /c npm.cmd ci", work_dir: "./editors/code" }.run()?; | ||
110 | Cmd { | ||
111 | unix: r"npm run package", | ||
112 | windows: r"cmd.exe /c npm.cmd run package", | ||
113 | work_dir: "./editors/code", | ||
114 | } | ||
115 | .run()?; | ||
116 | |||
117 | let code_in_path = Cmd { | ||
118 | unix: r"code --version", | ||
119 | windows: r"cmd.exe /c code.cmd --version", | ||
120 | work_dir: "./editors/code", | ||
121 | } | ||
122 | .run() | ||
123 | .is_ok(); | ||
124 | if !code_in_path { | ||
125 | Err("Can't execute `code --version`. Perhaps it is not in $PATH?")?; | ||
126 | } | ||
127 | |||
128 | Cmd { | ||
129 | unix: r"code --install-extension ./ra-lsp-0.0.1.vsix --force", | ||
130 | windows: r"cmd.exe /c code.cmd --install-extension ./ra-lsp-0.0.1.vsix --force", | ||
131 | work_dir: "./editors/code", | ||
132 | } | ||
133 | .run()?; | ||
134 | |||
135 | let output = Cmd { | ||
136 | unix: r"code --list-extensions", | ||
137 | windows: r"cmd.exe /c code.cmd --list-extensions", | ||
138 | work_dir: ".", | ||
139 | } | ||
140 | .run_with_output()?; | ||
141 | |||
142 | if !str::from_utf8(&output.stdout)?.contains("ra-lsp") { | ||
143 | Err("Could not install the Visual Studio Code extension. \ | ||
144 | Please make sure you have at least NodeJS 10.x installed and try again.")?; | ||
145 | } | ||
146 | |||
147 | Ok(()) | ||
148 | } | ||
149 | |||
150 | fn install_server(opts: ServerOpt) -> Result<()> { | ||
151 | if opts.jemalloc { | ||
152 | run("cargo install --path crates/ra_lsp_server --force --features jemalloc", ".") | ||
153 | } else { | ||
154 | run("cargo install --path crates/ra_lsp_server --force", ".") | ||
155 | } | ||
156 | } | ||
diff --git a/docs/dev/README.md b/docs/dev/README.md index 0a148ed32..0db3e731e 100644 --- a/docs/dev/README.md +++ b/docs/dev/README.md | |||
@@ -66,7 +66,7 @@ typescript) and Emacs (in elisp). The `docs` top-level directory contains both | |||
66 | developer and user documentation. | 66 | developer and user documentation. |
67 | 67 | ||
68 | We have some automation infra in Rust in the `crates/tool` package. It contains | 68 | We have some automation infra in Rust in the `crates/tool` package. It contains |
69 | stuff like formatting checking, code generation and powers `cargo install-code`. | 69 | stuff like formatting checking, code generation and powers `cargo install-ra`. |
70 | The latter syntax is achieved with the help of cargo aliases (see `.cargo` | 70 | The latter syntax is achieved with the help of cargo aliases (see `.cargo` |
71 | directory). | 71 | directory). |
72 | 72 | ||
@@ -84,7 +84,7 @@ However, launching a VS Code instance with locally build language server is | |||
84 | possible. There's even a VS Code task for this, so just <kbd>F5</kbd> should | 84 | possible. There's even a VS Code task for this, so just <kbd>F5</kbd> should |
85 | work (thanks, [@andrew-w-ross](https://github.com/andrew-w-ross)!). | 85 | work (thanks, [@andrew-w-ross](https://github.com/andrew-w-ross)!). |
86 | 86 | ||
87 | I often just install development version with `cargo jinstall-lsp` and | 87 | I often just install development version with `cargo install-ra --server --jemalloc` and |
88 | restart the host VS Code. | 88 | restart the host VS Code. |
89 | 89 | ||
90 | See [./debugging.md](./debugging.md) for how to attach to rust-analyzer with | 90 | See [./debugging.md](./debugging.md) for how to attach to rust-analyzer with |
@@ -110,12 +110,14 @@ ways: | |||
110 | 110 | ||
111 | 2. Run `npm test` from the command line. Although this is initiated from the | 111 | 2. Run `npm test` from the command line. Although this is initiated from the |
112 | command line it is not headless; it will also launch a temporary instance of | 112 | command line it is not headless; it will also launch a temporary instance of |
113 | VS Code. | 113 | VS Code. |
114 | 114 | ||
115 | Due to the requirements of running the tests inside VS Code they are **not run | 115 | Due to the requirements of running the tests inside VS Code they are **not run |
116 | on CI**. When making changes to the extension please ensure the tests are not | 116 | on CI**. When making changes to the extension please ensure the tests are not |
117 | broken locally before opening a Pull Request. | 117 | broken locally before opening a Pull Request. |
118 | 118 | ||
119 | To install **only** the VS Code extension, use `cargo install-ra --client-code`. | ||
120 | |||
119 | # Logging | 121 | # Logging |
120 | 122 | ||
121 | Logging is done by both rust-analyzer and VS Code, so it might be tricky to | 123 | Logging is done by both rust-analyzer and VS Code, so it might be tricky to |
@@ -151,7 +153,7 @@ There's also two VS Code commands which might be of interest: | |||
151 | $ cargo install --path crates/ra_lsp_server --force --features jemalloc | 153 | $ cargo install --path crates/ra_lsp_server --force --features jemalloc |
152 | ``` | 154 | ``` |
153 | 155 | ||
154 | There's an alias for this: `cargo jinstall-lsp`. | 156 | There's an alias for this: `cargo install-ra --server --jemalloc`. |
155 | 157 | ||
156 | * `Rust Analyzer: Syntax Tree` shows syntax tree of the current file/selection. | 158 | * `Rust Analyzer: Syntax Tree` shows syntax tree of the current file/selection. |
157 | 159 | ||
diff --git a/docs/user/README.md b/docs/user/README.md index d56330192..a5e17f604 100644 --- a/docs/user/README.md +++ b/docs/user/README.md | |||
@@ -1,6 +1,6 @@ | |||
1 | The main interface to rust-analyzer is the | 1 | The main interface to rust-analyzer is the |
2 | [LSP](https://microsoft.github.io/language-server-protocol/) implementation. To | 2 | [LSP](https://microsoft.github.io/language-server-protocol/) implementation. To |
3 | install lsp server, use `cargo install-lsp`, which is a shorthand for `cargo | 3 | install lsp server, use `cargo install-ra --server`, which is a shorthand for `cargo |
4 | install --package ra_lsp_server`. The binary is named `ra_lsp_server`, you | 4 | install --package ra_lsp_server`. The binary is named `ra_lsp_server`, you |
5 | should be able to use it with any LSP-compatible editor. We use custom | 5 | should be able to use it with any LSP-compatible editor. We use custom |
6 | extensions to LSP, so special client-side support is required to take full | 6 | extensions to LSP, so special client-side support is required to take full |
@@ -33,7 +33,7 @@ following commands: | |||
33 | ``` | 33 | ``` |
34 | $ git clone https://github.com/rust-analyzer/rust-analyzer.git --depth 1 | 34 | $ git clone https://github.com/rust-analyzer/rust-analyzer.git --depth 1 |
35 | $ cd rust-analyzer | 35 | $ cd rust-analyzer |
36 | $ cargo install-code | 36 | $ cargo install-ra |
37 | ``` | 37 | ``` |
38 | 38 | ||
39 | The automatic installation is expected to *just work* for common cases, if it | 39 | The automatic installation is expected to *just work* for common cases, if it |
@@ -58,6 +58,9 @@ Beyond basic LSP features, there are some extension commands which you can | |||
58 | invoke via <kbd>Ctrl+Shift+P</kbd> or bind to a shortcut. See [./features.md](./features.md) | 58 | invoke via <kbd>Ctrl+Shift+P</kbd> or bind to a shortcut. See [./features.md](./features.md) |
59 | for details. | 59 | for details. |
60 | 60 | ||
61 | For updates, pull the latest changes from the master branch, run `cargo install-ra` again, and **restart** VS Code instance. | ||
62 | See https://github.com/microsoft/vscode/issues/72308[microsoft/vscode#72308] for why a full restart is needed. | ||
63 | |||
61 | ### Settings | 64 | ### Settings |
62 | 65 | ||
63 | * `rust-analyzer.highlightingOn`: enables experimental syntax highlighting | 66 | * `rust-analyzer.highlightingOn`: enables experimental syntax highlighting |
@@ -86,7 +89,7 @@ Installation: | |||
86 | [ra-emacs-lsp.el](https://github.com/rust-analyzer/rust-analyzer/blob/69ee5c9c5ef212f7911028c9ddf581559e6565c3/editors/emacs/ra-emacs-lsp.el) | 89 | [ra-emacs-lsp.el](https://github.com/rust-analyzer/rust-analyzer/blob/69ee5c9c5ef212f7911028c9ddf581559e6565c3/editors/emacs/ra-emacs-lsp.el) |
87 | to load path and require it in `init.el` | 90 | to load path and require it in `init.el` |
88 | * run `lsp` in a rust buffer | 91 | * run `lsp` in a rust buffer |
89 | * (Optionally) bind commands like `rust-analyzer-join-lines` or `rust-analyzer-extend-selection` to keys | 92 | * (Optionally) bind commands like `rust-analyzer-join-lines` or `rust-analyzer-extend-selection` to keys, and enable `rust-analyzer-inlay-hints-mode` to get inline type hints |
90 | 93 | ||
91 | 94 | ||
92 | ## Vim and NeoVim | 95 | ## Vim and NeoVim |
diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json index b924b2471..56cac1b49 100644 --- a/editors/code/package-lock.json +++ b/editors/code/package-lock.json | |||
@@ -5,18 +5,18 @@ | |||
5 | "requires": true, | 5 | "requires": true, |
6 | "dependencies": { | 6 | "dependencies": { |
7 | "@babel/code-frame": { | 7 | "@babel/code-frame": { |
8 | "version": "7.0.0", | 8 | "version": "7.5.5", |
9 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", | 9 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", |
10 | "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", | 10 | "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", |
11 | "dev": true, | 11 | "dev": true, |
12 | "requires": { | 12 | "requires": { |
13 | "@babel/highlight": "^7.0.0" | 13 | "@babel/highlight": "^7.0.0" |
14 | } | 14 | } |
15 | }, | 15 | }, |
16 | "@babel/highlight": { | 16 | "@babel/highlight": { |
17 | "version": "7.0.0", | 17 | "version": "7.5.0", |
18 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", | 18 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", |
19 | "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", | 19 | "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", |
20 | "dev": true, | 20 | "dev": true, |
21 | "requires": { | 21 | "requires": { |
22 | "chalk": "^2.0.0", | 22 | "chalk": "^2.0.0", |
@@ -25,15 +25,15 @@ | |||
25 | } | 25 | } |
26 | }, | 26 | }, |
27 | "@types/mocha": { | 27 | "@types/mocha": { |
28 | "version": "5.2.6", | 28 | "version": "5.2.7", |
29 | "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.6.tgz", | 29 | "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", |
30 | "integrity": "sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw==", | 30 | "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", |
31 | "dev": true | 31 | "dev": true |
32 | }, | 32 | }, |
33 | "@types/node": { | 33 | "@types/node": { |
34 | "version": "10.14.5", | 34 | "version": "10.14.13", |
35 | "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.5.tgz", | 35 | "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.13.tgz", |
36 | "integrity": "sha512-Ja7d4s0qyGFxjGeDq5S7Si25OFibSAHUi6i17UWnwNnpitADN7hah9q0Tl25gxuV5R1u2Bx+np6w4LHXfHyj/g==", | 36 | "integrity": "sha512-yN/FNNW1UYsRR1wwAoyOwqvDuLDtVXnaJTZ898XIw/Q5cCaeVAlVwvsmXLX5PuiScBYwZsZU4JYSHB3TvfdwvQ==", |
37 | "dev": true | 37 | "dev": true |
38 | }, | 38 | }, |
39 | "@types/seedrandom": { | 39 | "@types/seedrandom": { |
@@ -43,18 +43,18 @@ | |||
43 | "dev": true | 43 | "dev": true |
44 | }, | 44 | }, |
45 | "agent-base": { | 45 | "agent-base": { |
46 | "version": "4.2.1", | 46 | "version": "4.3.0", |
47 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", | 47 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", |
48 | "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", | 48 | "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", |
49 | "dev": true, | 49 | "dev": true, |
50 | "requires": { | 50 | "requires": { |
51 | "es6-promisify": "^5.0.0" | 51 | "es6-promisify": "^5.0.0" |
52 | } | 52 | } |
53 | }, | 53 | }, |
54 | "ajv": { | 54 | "ajv": { |
55 | "version": "6.10.0", | 55 | "version": "6.10.2", |
56 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", | 56 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", |
57 | "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", | 57 | "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", |
58 | "dev": true, | 58 | "dev": true, |
59 | "requires": { | 59 | "requires": { |
60 | "fast-deep-equal": "^2.0.1", | 60 | "fast-deep-equal": "^2.0.1", |
@@ -158,9 +158,9 @@ | |||
158 | } | 158 | } |
159 | }, | 159 | }, |
160 | "browser-stdout": { | 160 | "browser-stdout": { |
161 | "version": "1.3.0", | 161 | "version": "1.3.1", |
162 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", | 162 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", |
163 | "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", | 163 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", |
164 | "dev": true | 164 | "dev": true |
165 | }, | 165 | }, |
166 | "buffer-crc32": { | 166 | "buffer-crc32": { |
@@ -228,9 +228,9 @@ | |||
228 | "dev": true | 228 | "dev": true |
229 | }, | 229 | }, |
230 | "combined-stream": { | 230 | "combined-stream": { |
231 | "version": "1.0.7", | 231 | "version": "1.0.8", |
232 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", | 232 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", |
233 | "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", | 233 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", |
234 | "dev": true, | 234 | "dev": true, |
235 | "requires": { | 235 | "requires": { |
236 | "delayed-stream": "~1.0.0" | 236 | "delayed-stream": "~1.0.0" |
@@ -372,9 +372,9 @@ | |||
372 | "dev": true | 372 | "dev": true |
373 | }, | 373 | }, |
374 | "es6-promise": { | 374 | "es6-promise": { |
375 | "version": "4.2.6", | 375 | "version": "4.2.8", |
376 | "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", | 376 | "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", |
377 | "integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==", | 377 | "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", |
378 | "dev": true | 378 | "dev": true |
379 | }, | 379 | }, |
380 | "es6-promisify": { | 380 | "es6-promisify": { |
@@ -484,9 +484,9 @@ | |||
484 | } | 484 | } |
485 | }, | 485 | }, |
486 | "growl": { | 486 | "growl": { |
487 | "version": "1.10.3", | 487 | "version": "1.10.5", |
488 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", | 488 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", |
489 | "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", | 489 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", |
490 | "dev": true | 490 | "dev": true |
491 | }, | 491 | }, |
492 | "har-schema": { | 492 | "har-schema": { |
@@ -553,12 +553,12 @@ | |||
553 | } | 553 | } |
554 | }, | 554 | }, |
555 | "https-proxy-agent": { | 555 | "https-proxy-agent": { |
556 | "version": "2.2.1", | 556 | "version": "2.2.2", |
557 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", | 557 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.2.tgz", |
558 | "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", | 558 | "integrity": "sha512-c8Ndjc9Bkpfx/vCJueCPy0jlP4ccCCSNDp8xwCZzPjKJUm+B+u9WX2x98Qx4n1PiMNTWo3D7KK5ifNV/yJyRzg==", |
559 | "dev": true, | 559 | "dev": true, |
560 | "requires": { | 560 | "requires": { |
561 | "agent-base": "^4.1.0", | 561 | "agent-base": "^4.3.0", |
562 | "debug": "^3.1.0" | 562 | "debug": "^3.1.0" |
563 | } | 563 | } |
564 | }, | 564 | }, |
@@ -649,18 +649,18 @@ | |||
649 | } | 649 | } |
650 | }, | 650 | }, |
651 | "linkify-it": { | 651 | "linkify-it": { |
652 | "version": "2.1.0", | 652 | "version": "2.2.0", |
653 | "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.1.0.tgz", | 653 | "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", |
654 | "integrity": "sha512-4REs8/062kV2DSHxNfq5183zrqXMl7WP0WzABH9IeJI+NLm429FgE1PDecltYfnOoFDFlZGh2T8PfZn0r+GTRg==", | 654 | "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", |
655 | "dev": true, | 655 | "dev": true, |
656 | "requires": { | 656 | "requires": { |
657 | "uc.micro": "^1.0.1" | 657 | "uc.micro": "^1.0.1" |
658 | } | 658 | } |
659 | }, | 659 | }, |
660 | "lodash": { | 660 | "lodash": { |
661 | "version": "4.17.14", | 661 | "version": "4.17.15", |
662 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", | 662 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", |
663 | "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==", | 663 | "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", |
664 | "dev": true | 664 | "dev": true |
665 | }, | 665 | }, |
666 | "markdown-it": { | 666 | "markdown-it": { |
@@ -728,33 +728,28 @@ | |||
728 | } | 728 | } |
729 | }, | 729 | }, |
730 | "mocha": { | 730 | "mocha": { |
731 | "version": "4.1.0", | 731 | "version": "5.2.0", |
732 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.1.0.tgz", | 732 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", |
733 | "integrity": "sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA==", | 733 | "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", |
734 | "dev": true, | 734 | "dev": true, |
735 | "requires": { | 735 | "requires": { |
736 | "browser-stdout": "1.3.0", | 736 | "browser-stdout": "1.3.1", |
737 | "commander": "2.11.0", | 737 | "commander": "2.15.1", |
738 | "debug": "3.1.0", | 738 | "debug": "3.1.0", |
739 | "diff": "3.3.1", | 739 | "diff": "3.5.0", |
740 | "escape-string-regexp": "1.0.5", | 740 | "escape-string-regexp": "1.0.5", |
741 | "glob": "7.1.2", | 741 | "glob": "7.1.2", |
742 | "growl": "1.10.3", | 742 | "growl": "1.10.5", |
743 | "he": "1.1.1", | 743 | "he": "1.1.1", |
744 | "minimatch": "3.0.4", | ||
744 | "mkdirp": "0.5.1", | 745 | "mkdirp": "0.5.1", |
745 | "supports-color": "4.4.0" | 746 | "supports-color": "5.4.0" |
746 | }, | 747 | }, |
747 | "dependencies": { | 748 | "dependencies": { |
748 | "commander": { | 749 | "commander": { |
749 | "version": "2.11.0", | 750 | "version": "2.15.1", |
750 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", | 751 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", |
751 | "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", | 752 | "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", |
752 | "dev": true | ||
753 | }, | ||
754 | "diff": { | ||
755 | "version": "3.3.1", | ||
756 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", | ||
757 | "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", | ||
758 | "dev": true | 753 | "dev": true |
759 | }, | 754 | }, |
760 | "glob": { | 755 | "glob": { |
@@ -771,19 +766,13 @@ | |||
771 | "path-is-absolute": "^1.0.0" | 766 | "path-is-absolute": "^1.0.0" |
772 | } | 767 | } |
773 | }, | 768 | }, |
774 | "has-flag": { | ||
775 | "version": "2.0.0", | ||
776 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", | ||
777 | "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", | ||
778 | "dev": true | ||
779 | }, | ||
780 | "supports-color": { | 769 | "supports-color": { |
781 | "version": "4.4.0", | 770 | "version": "5.4.0", |
782 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", | 771 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", |
783 | "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", | 772 | "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", |
784 | "dev": true, | 773 | "dev": true, |
785 | "requires": { | 774 | "requires": { |
786 | "has-flag": "^2.0.0" | 775 | "has-flag": "^3.0.0" |
787 | } | 776 | } |
788 | } | 777 | } |
789 | } | 778 | } |
@@ -895,15 +884,15 @@ | |||
895 | "dev": true | 884 | "dev": true |
896 | }, | 885 | }, |
897 | "prettier": { | 886 | "prettier": { |
898 | "version": "1.17.0", | 887 | "version": "1.18.2", |
899 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.0.tgz", | 888 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz", |
900 | "integrity": "sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw==", | 889 | "integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==", |
901 | "dev": true | 890 | "dev": true |
902 | }, | 891 | }, |
903 | "psl": { | 892 | "psl": { |
904 | "version": "1.1.31", | 893 | "version": "1.2.0", |
905 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", | 894 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.2.0.tgz", |
906 | "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", | 895 | "integrity": "sha512-GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA==", |
907 | "dev": true | 896 | "dev": true |
908 | }, | 897 | }, |
909 | "punycode": { | 898 | "punycode": { |
@@ -1133,15 +1122,15 @@ | |||
1133 | } | 1122 | } |
1134 | }, | 1123 | }, |
1135 | "tslib": { | 1124 | "tslib": { |
1136 | "version": "1.9.3", | 1125 | "version": "1.10.0", |
1137 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", | 1126 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", |
1138 | "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", | 1127 | "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", |
1139 | "dev": true | 1128 | "dev": true |
1140 | }, | 1129 | }, |
1141 | "tslint": { | 1130 | "tslint": { |
1142 | "version": "5.16.0", | 1131 | "version": "5.18.0", |
1143 | "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.16.0.tgz", | 1132 | "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.18.0.tgz", |
1144 | "integrity": "sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA==", | 1133 | "integrity": "sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==", |
1145 | "dev": true, | 1134 | "dev": true, |
1146 | "requires": { | 1135 | "requires": { |
1147 | "@babel/code-frame": "^7.0.0", | 1136 | "@babel/code-frame": "^7.0.0", |
@@ -1150,7 +1139,7 @@ | |||
1150 | "commander": "^2.12.1", | 1139 | "commander": "^2.12.1", |
1151 | "diff": "^3.2.0", | 1140 | "diff": "^3.2.0", |
1152 | "glob": "^7.1.1", | 1141 | "glob": "^7.1.1", |
1153 | "js-yaml": "^3.13.0", | 1142 | "js-yaml": "^3.13.1", |
1154 | "minimatch": "^3.0.4", | 1143 | "minimatch": "^3.0.4", |
1155 | "mkdirp": "^0.5.1", | 1144 | "mkdirp": "^0.5.1", |
1156 | "resolve": "^1.3.2", | 1145 | "resolve": "^1.3.2", |
@@ -1206,9 +1195,9 @@ | |||
1206 | } | 1195 | } |
1207 | }, | 1196 | }, |
1208 | "typescript": { | 1197 | "typescript": { |
1209 | "version": "3.4.4", | 1198 | "version": "3.5.3", |
1210 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.4.tgz", | 1199 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz", |
1211 | "integrity": "sha512-xt5RsIRCEaf6+j9AyOBgvVuAec0i92rgCaS3S+UVf5Z/vF2Hvtsw08wtUTJqp4djwznoAgjSxeCcU4r+CcDBJA==", | 1200 | "integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==", |
1212 | "dev": true | 1201 | "dev": true |
1213 | }, | 1202 | }, |
1214 | "uc.micro": { | 1203 | "uc.micro": { |
@@ -1239,12 +1228,12 @@ | |||
1239 | "dev": true | 1228 | "dev": true |
1240 | }, | 1229 | }, |
1241 | "url-parse": { | 1230 | "url-parse": { |
1242 | "version": "1.4.6", | 1231 | "version": "1.4.7", |
1243 | "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.6.tgz", | 1232 | "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", |
1244 | "integrity": "sha512-/B8AD9iQ01seoXmXf9z/MjLZQIdOoYl/+gvsQF6+mpnxaTfG9P7srYaiqaDMyKkR36XMXfhqSHss5MyFAO8lew==", | 1233 | "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", |
1245 | "dev": true, | 1234 | "dev": true, |
1246 | "requires": { | 1235 | "requires": { |
1247 | "querystringify": "^2.0.0", | 1236 | "querystringify": "^2.1.1", |
1248 | "requires-port": "^1.0.0" | 1237 | "requires-port": "^1.0.0" |
1249 | } | 1238 | } |
1250 | }, | 1239 | }, |
@@ -1272,9 +1261,9 @@ | |||
1272 | } | 1261 | } |
1273 | }, | 1262 | }, |
1274 | "vsce": { | 1263 | "vsce": { |
1275 | "version": "1.64.0", | 1264 | "version": "1.66.0", |
1276 | "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.64.0.tgz", | 1265 | "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.66.0.tgz", |
1277 | "integrity": "sha512-t3R7QTe2nAXQZs2kD+nA8GjdlX8pAQlnzxaNTG2976i5cyQ8r+ZsMNa/f9PDt7bhjcQM+u/fL+LkNuw+hwoy2A==", | 1266 | "integrity": "sha512-Zf4+WD4PhEcOr7jkU08SI9lwFqDhmhk73YOCGQ/tNLaBy+PnnX4eSdqj9LdzDLuI2dsyomJLXzDSNgxuaInxCQ==", |
1278 | "dev": true, | 1267 | "dev": true, |
1279 | "requires": { | 1268 | "requires": { |
1280 | "azure-devops-node-api": "^7.2.0", | 1269 | "azure-devops-node-api": "^7.2.0", |
@@ -1300,52 +1289,52 @@ | |||
1300 | } | 1289 | } |
1301 | }, | 1290 | }, |
1302 | "vscode": { | 1291 | "vscode": { |
1303 | "version": "1.1.33", | 1292 | "version": "1.1.35", |
1304 | "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.33.tgz", | 1293 | "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.35.tgz", |
1305 | "integrity": "sha512-sXedp2oF6y4ZvqrrFiZpeMzaCLSWV+PpYkIxjG/iYquNZ9KrLL2LujltGxPLvzn49xu2sZkyC+avVNFgcJD1Iw==", | 1294 | "integrity": "sha512-xPnxzQU40LOS2yPyzWW+WKpTV6qA3z16TcgpZ9O38UWLA157Zz4GxUx5H7Gd07pxzw0GqvusbF4D+5GBgNxvEQ==", |
1306 | "dev": true, | 1295 | "dev": true, |
1307 | "requires": { | 1296 | "requires": { |
1308 | "glob": "^7.1.2", | 1297 | "glob": "^7.1.2", |
1309 | "mocha": "^4.0.1", | 1298 | "mocha": "^5.2.0", |
1310 | "request": "^2.88.0", | 1299 | "request": "^2.88.0", |
1311 | "semver": "^5.4.1", | 1300 | "semver": "^5.4.1", |
1312 | "source-map-support": "^0.5.0", | 1301 | "source-map-support": "^0.5.0", |
1313 | "url-parse": "^1.4.4", | 1302 | "url-parse": "^1.4.4", |
1314 | "vscode-test": "^0.1.4" | 1303 | "vscode-test": "^0.4.1" |
1315 | } | 1304 | } |
1316 | }, | 1305 | }, |
1317 | "vscode-jsonrpc": { | 1306 | "vscode-jsonrpc": { |
1318 | "version": "4.1.0-next.1", | 1307 | "version": "4.1.0-next.2", |
1319 | "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-4.1.0-next.1.tgz", | 1308 | "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-4.1.0-next.2.tgz", |
1320 | "integrity": "sha512-FzNkvHmg3GXpzZAlnGnpdRbQQX6LDRb0bvc+oxxjMUwIJ66kTO/DyeE2bwU0fsiOEGfsJTCzvjESVl368jZ0/g==" | 1309 | "integrity": "sha512-GsBLjP9DxQ42yl1mW9GEIlnSc0+R8mfzhaebwmmTPEJjezD5SPoAo3DFrIAFZha9yvQ1nzZfZlhtVpGQmgxtXg==" |
1321 | }, | 1310 | }, |
1322 | "vscode-languageclient": { | 1311 | "vscode-languageclient": { |
1323 | "version": "5.3.0-next.4", | 1312 | "version": "5.3.0-next.6", |
1324 | "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-5.3.0-next.4.tgz", | 1313 | "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-5.3.0-next.6.tgz", |
1325 | "integrity": "sha512-RODuzXErVpJRSgHv+Xei8fwQtZ/iZOWPCqlLl07NTtkzgTAepJf9r4EioZVuTviGJ5DEJ9xs0bjrit8shKtW6Q==", | 1314 | "integrity": "sha512-DxT8+gkenjCjJV6ArcP75/AQfx6HP6m6kHIbacPCpffMeoE1YMLKj6ZixA9J87yr0fMtBmqumLmDeGe7MIF2bw==", |
1326 | "requires": { | 1315 | "requires": { |
1327 | "semver": "^5.5.0", | 1316 | "semver": "^5.5.0", |
1328 | "vscode-languageserver-protocol": "3.15.0-next.4" | 1317 | "vscode-languageserver-protocol": "^3.15.0-next.6" |
1329 | } | 1318 | } |
1330 | }, | 1319 | }, |
1331 | "vscode-languageserver-protocol": { | 1320 | "vscode-languageserver-protocol": { |
1332 | "version": "3.15.0-next.4", | 1321 | "version": "3.15.0-next.6", |
1333 | "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.0-next.4.tgz", | 1322 | "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.0-next.6.tgz", |
1334 | "integrity": "sha512-4AgisQ8GWa3irdRu3/UNr3brcSSm0oobmoV1eSOnV7JM32lYyXDnSKB7RuTTXvaAjD/0xQJLEGhkyGHS5gbywA==", | 1323 | "integrity": "sha512-/yDpYlWyNs26mM23mT73xmOFsh1iRfgZfBdHmfAxwDKwpQKLoOSqVidtYfxlK/pD3IEKGcAVnT4WXTsguxxAMQ==", |
1335 | "requires": { | 1324 | "requires": { |
1336 | "vscode-jsonrpc": "^4.1.0-next.1", | 1325 | "vscode-jsonrpc": "^4.1.0-next.2", |
1337 | "vscode-languageserver-types": "3.15.0-next.1" | 1326 | "vscode-languageserver-types": "^3.15.0-next.2" |
1338 | } | 1327 | } |
1339 | }, | 1328 | }, |
1340 | "vscode-languageserver-types": { | 1329 | "vscode-languageserver-types": { |
1341 | "version": "3.15.0-next.1", | 1330 | "version": "3.15.0-next.2", |
1342 | "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.15.0-next.1.tgz", | 1331 | "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.15.0-next.2.tgz", |
1343 | "integrity": "sha512-R0kzmaI8gOGEoU7b9huYQAzgZzRQ/5Q8HKjsIUdfz0MjXcBZ4tr1ik1So1p1O5kGrI1VTCd22Fw/wI7ECGoIPw==" | 1332 | "integrity": "sha512-2JkrMWWUi2rlVLSo9OFR2PIGUzdiowEM8NgNYiwLKnXTjpwpjjIrJbNNxDik7Rv4oo9KtikcFQZKXbrKilL/MQ==" |
1344 | }, | 1333 | }, |
1345 | "vscode-test": { | 1334 | "vscode-test": { |
1346 | "version": "0.1.5", | 1335 | "version": "0.4.3", |
1347 | "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-0.1.5.tgz", | 1336 | "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-0.4.3.tgz", |
1348 | "integrity": "sha512-s+lbF1Dtasc0yXVB9iQTexBe2JK6HJAUJe3fWezHKIjq+xRw5ZwCMEMBaonFIPy7s95qg2HPTRDR5W4h4kbxGw==", | 1337 | "integrity": "sha512-EkMGqBSefZH2MgW65nY05rdRSko15uvzq4VAPM5jVmwYuFQKE7eikKXNJDRxL+OITXHB6pI+a3XqqD32Y3KC5w==", |
1349 | "dev": true, | 1338 | "dev": true, |
1350 | "requires": { | 1339 | "requires": { |
1351 | "http-proxy-agent": "^2.1.0", | 1340 | "http-proxy-agent": "^2.1.0", |
diff --git a/editors/code/package.json b/editors/code/package.json index ea74ab85a..808dc5dc1 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -25,7 +25,7 @@ | |||
25 | "lint": "tslint --project .", | 25 | "lint": "tslint --project .", |
26 | "test": "node node_modules/vscode/bin/test", | 26 | "test": "node node_modules/vscode/bin/test", |
27 | "prettier": "prettier **/*.{json,ts}", | 27 | "prettier": "prettier **/*.{json,ts}", |
28 | "travis": "npm run compile && npm run test && npm run lint && npm run prettier -- --list-different" | 28 | "travis": "npm run compile && npm run test && npm run lint && npm run prettier -- --write && git diff --exit-code" |
29 | }, | 29 | }, |
30 | "prettier": { | 30 | "prettier": { |
31 | "tabWidth": 4, | 31 | "tabWidth": 4, |
@@ -36,16 +36,16 @@ | |||
36 | "vscode-languageclient": "^5.3.0-next.4" | 36 | "vscode-languageclient": "^5.3.0-next.4" |
37 | }, | 37 | }, |
38 | "devDependencies": { | 38 | "devDependencies": { |
39 | "@types/mocha": "^5.2.6", | 39 | "@types/mocha": "^5.2.7", |
40 | "@types/node": "^10.14.5", | 40 | "@types/node": "^10.14.13", |
41 | "@types/seedrandom": "^2.4.28", | 41 | "@types/seedrandom": "^2.4.28", |
42 | "prettier": "^1.17.0", | 42 | "prettier": "^1.18.2", |
43 | "shx": "^0.3.1", | 43 | "shx": "^0.3.1", |
44 | "tslint": "^5.16.0", | 44 | "tslint": "^5.18.0", |
45 | "tslint-config-prettier": "^1.18.0", | 45 | "tslint-config-prettier": "^1.18.0", |
46 | "typescript": "^3.4.4", | 46 | "typescript": "^3.5.3", |
47 | "vsce": "^1.64.0", | 47 | "vsce": "^1.66.0", |
48 | "vscode": "^1.1.33" | 48 | "vscode": "^1.1.35" |
49 | }, | 49 | }, |
50 | "activationEvents": [ | 50 | "activationEvents": [ |
51 | "onLanguage:rust", | 51 | "onLanguage:rust", |
@@ -238,6 +238,11 @@ | |||
238 | "type": "number", | 238 | "type": "number", |
239 | "default": null, | 239 | "default": null, |
240 | "description": "Number of syntax trees rust-analyzer keeps in memory" | 240 | "description": "Number of syntax trees rust-analyzer keeps in memory" |
241 | }, | ||
242 | "rust-analyzer.displayInlayHints": { | ||
243 | "type": "boolean", | ||
244 | "default": true, | ||
245 | "description": "Display additional type information in the editor" | ||
241 | } | 246 | } |
242 | } | 247 | } |
243 | }, | 248 | }, |
@@ -444,6 +449,15 @@ | |||
444 | "light": "#000000", | 449 | "light": "#000000", |
445 | "highContrast": "#FFFFFF" | 450 | "highContrast": "#FFFFFF" |
446 | } | 451 | } |
452 | }, | ||
453 | { | ||
454 | "id": "ralsp.inlayHint", | ||
455 | "description": "Color for inlay hints", | ||
456 | "defaults": { | ||
457 | "dark": "#A0A0A0F0", | ||
458 | "light": "#747474", | ||
459 | "highContrast": "#BEBEBE" | ||
460 | } | ||
447 | } | 461 | } |
448 | ] | 462 | ] |
449 | } | 463 | } |
diff --git a/editors/code/src/commands/index.ts b/editors/code/src/commands/index.ts index 194658497..c194bd2ea 100644 --- a/editors/code/src/commands/index.ts +++ b/editors/code/src/commands/index.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import * as analyzerStatus from './analyzer_status'; | 1 | import * as analyzerStatus from './analyzer_status'; |
2 | import * as applySourceChange from './apply_source_change'; | 2 | import * as applySourceChange from './apply_source_change'; |
3 | import * as inlayHints from './inlay_hints'; | ||
3 | import * as joinLines from './join_lines'; | 4 | import * as joinLines from './join_lines'; |
4 | import * as matchingBrace from './matching_brace'; | 5 | import * as matchingBrace from './matching_brace'; |
5 | import * as onEnter from './on_enter'; | 6 | import * as onEnter from './on_enter'; |
@@ -15,5 +16,6 @@ export { | |||
15 | parentModule, | 16 | parentModule, |
16 | runnables, | 17 | runnables, |
17 | syntaxTree, | 18 | syntaxTree, |
18 | onEnter | 19 | onEnter, |
20 | inlayHints | ||
19 | }; | 21 | }; |
diff --git a/editors/code/src/commands/inlay_hints.ts b/editors/code/src/commands/inlay_hints.ts new file mode 100644 index 000000000..3ba9da48b --- /dev/null +++ b/editors/code/src/commands/inlay_hints.ts | |||
@@ -0,0 +1,109 @@ | |||
1 | import * as vscode from 'vscode'; | ||
2 | import { Range, TextDocumentChangeEvent, TextEditor } from 'vscode'; | ||
3 | import { TextDocumentIdentifier } from 'vscode-languageclient'; | ||
4 | import { Server } from '../server'; | ||
5 | |||
6 | interface InlayHintsParams { | ||
7 | textDocument: TextDocumentIdentifier; | ||
8 | } | ||
9 | |||
10 | interface InlayHint { | ||
11 | range: Range; | ||
12 | kind: string; | ||
13 | label: string; | ||
14 | } | ||
15 | |||
16 | const typeHintDecorationType = vscode.window.createTextEditorDecorationType({ | ||
17 | after: { | ||
18 | color: new vscode.ThemeColor('ralsp.inlayHint') | ||
19 | } | ||
20 | }); | ||
21 | |||
22 | export class HintsUpdater { | ||
23 | private displayHints = true; | ||
24 | |||
25 | public async loadHints( | ||
26 | editor: vscode.TextEditor | undefined | ||
27 | ): Promise<void> { | ||
28 | if ( | ||
29 | this.displayHints && | ||
30 | editor !== undefined && | ||
31 | this.isRustDocument(editor.document) | ||
32 | ) { | ||
33 | await this.updateDecorationsFromServer( | ||
34 | editor.document.uri.toString(), | ||
35 | editor | ||
36 | ); | ||
37 | } | ||
38 | } | ||
39 | |||
40 | public async toggleHintsDisplay(displayHints: boolean): Promise<void> { | ||
41 | if (this.displayHints !== displayHints) { | ||
42 | this.displayHints = displayHints; | ||
43 | |||
44 | if (displayHints) { | ||
45 | return this.updateHints(); | ||
46 | } else { | ||
47 | const editor = vscode.window.activeTextEditor; | ||
48 | if (editor != null) { | ||
49 | return editor.setDecorations(typeHintDecorationType, []); | ||
50 | } | ||
51 | } | ||
52 | } | ||
53 | } | ||
54 | |||
55 | public async updateHints(cause?: TextDocumentChangeEvent): Promise<void> { | ||
56 | if (!this.displayHints) { | ||
57 | return; | ||
58 | } | ||
59 | const editor = vscode.window.activeTextEditor; | ||
60 | if (editor == null) { | ||
61 | return; | ||
62 | } | ||
63 | const document = cause == null ? editor.document : cause.document; | ||
64 | if (!this.isRustDocument(document)) { | ||
65 | return; | ||
66 | } | ||
67 | |||
68 | return await this.updateDecorationsFromServer( | ||
69 | document.uri.toString(), | ||
70 | editor | ||
71 | ); | ||
72 | } | ||
73 | |||
74 | private isRustDocument(document: vscode.TextDocument): boolean { | ||
75 | return document && document.languageId === 'rust'; | ||
76 | } | ||
77 | |||
78 | private async updateDecorationsFromServer( | ||
79 | documentUri: string, | ||
80 | editor: TextEditor | ||
81 | ): Promise<void> { | ||
82 | const newHints = await this.queryHints(documentUri); | ||
83 | if (newHints != null) { | ||
84 | const newDecorations = newHints.map(hint => ({ | ||
85 | range: hint.range, | ||
86 | renderOptions: { after: { contentText: `: ${hint.label}` } } | ||
87 | })); | ||
88 | return editor.setDecorations( | ||
89 | typeHintDecorationType, | ||
90 | newDecorations | ||
91 | ); | ||
92 | } | ||
93 | } | ||
94 | |||
95 | private async queryHints(documentUri: string): Promise<InlayHint[] | null> { | ||
96 | const request: InlayHintsParams = { | ||
97 | textDocument: { uri: documentUri } | ||
98 | }; | ||
99 | const client = Server.client; | ||
100 | return client | ||
101 | .onReady() | ||
102 | .then(() => | ||
103 | client.sendRequest<InlayHint[] | null>( | ||
104 | 'rust-analyzer/inlayHints', | ||
105 | request | ||
106 | ) | ||
107 | ); | ||
108 | } | ||
109 | } | ||
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 3f1b482e3..4d58a1a93 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -21,6 +21,7 @@ export class Config { | |||
21 | public raLspServerPath = RA_LSP_DEBUG || 'ra_lsp_server'; | 21 | public raLspServerPath = RA_LSP_DEBUG || 'ra_lsp_server'; |
22 | public showWorkspaceLoadedNotification = true; | 22 | public showWorkspaceLoadedNotification = true; |
23 | public lruCapacity: null | number = null; | 23 | public lruCapacity: null | number = null; |
24 | public displayInlayHints = true; | ||
24 | public cargoWatchOptions: CargoWatchOptions = { | 25 | public cargoWatchOptions: CargoWatchOptions = { |
25 | enableOnStartup: 'ask', | 26 | enableOnStartup: 'ask', |
26 | trace: 'off', | 27 | trace: 'off', |
@@ -123,5 +124,9 @@ export class Config { | |||
123 | if (config.has('lruCapacity')) { | 124 | if (config.has('lruCapacity')) { |
124 | this.lruCapacity = config.get('lruCapacity') as number; | 125 | this.lruCapacity = config.get('lruCapacity') as number; |
125 | } | 126 | } |
127 | |||
128 | if (config.has('displayInlayHints')) { | ||
129 | this.displayInlayHints = config.get('displayInlayHints') as boolean; | ||
130 | } | ||
126 | } | 131 | } |
127 | } | 132 | } |
diff --git a/editors/code/src/extension.ts b/editors/code/src/extension.ts index c8c3004a7..c6efc2e7e 100644 --- a/editors/code/src/extension.ts +++ b/editors/code/src/extension.ts | |||
@@ -3,6 +3,7 @@ import * as lc from 'vscode-languageclient'; | |||
3 | 3 | ||
4 | import * as commands from './commands'; | 4 | import * as commands from './commands'; |
5 | import { CargoWatchProvider } from './commands/cargo_watch'; | 5 | import { CargoWatchProvider } from './commands/cargo_watch'; |
6 | import { HintsUpdater } from './commands/inlay_hints'; | ||
6 | import { | 7 | import { |
7 | interactivelyStartCargoWatch, | 8 | interactivelyStartCargoWatch, |
8 | startCargoWatch | 9 | startCargoWatch |
@@ -147,6 +148,29 @@ export function activate(context: vscode.ExtensionContext) { | |||
147 | 148 | ||
148 | // Start the language server, finally! | 149 | // Start the language server, finally! |
149 | startServer(); | 150 | startServer(); |
151 | |||
152 | if (Server.config.displayInlayHints) { | ||
153 | const hintsUpdater = new HintsUpdater(); | ||
154 | hintsUpdater.loadHints(vscode.window.activeTextEditor).then(() => { | ||
155 | disposeOnDeactivation( | ||
156 | vscode.window.onDidChangeActiveTextEditor(editor => | ||
157 | hintsUpdater.loadHints(editor) | ||
158 | ) | ||
159 | ); | ||
160 | disposeOnDeactivation( | ||
161 | vscode.workspace.onDidChangeTextDocument(e => | ||
162 | hintsUpdater.updateHints(e) | ||
163 | ) | ||
164 | ); | ||
165 | disposeOnDeactivation( | ||
166 | vscode.workspace.onDidChangeConfiguration(_ => | ||
167 | hintsUpdater.toggleHintsDisplay( | ||
168 | Server.config.displayInlayHints | ||
169 | ) | ||
170 | ) | ||
171 | ); | ||
172 | }); | ||
173 | } | ||
150 | } | 174 | } |
151 | 175 | ||
152 | export function deactivate(): Thenable<void> { | 176 | export function deactivate(): Thenable<void> { |
diff --git a/editors/emacs/ra-emacs-lsp.el b/editors/emacs/ra-emacs-lsp.el index 21a90c86b..d7656476e 100644 --- a/editors/emacs/ra-emacs-lsp.el +++ b/editors/emacs/ra-emacs-lsp.el | |||
@@ -15,6 +15,7 @@ | |||
15 | ;; - implements source changes (for code actions etc.), except for file system changes | 15 | ;; - implements source changes (for code actions etc.), except for file system changes |
16 | ;; - implements joinLines (you need to bind rust-analyzer-join-lines to a key) | 16 | ;; - implements joinLines (you need to bind rust-analyzer-join-lines to a key) |
17 | ;; - implements extendSelection (either bind rust-analyzer-extend-selection to a key, or use expand-region) | 17 | ;; - implements extendSelection (either bind rust-analyzer-extend-selection to a key, or use expand-region) |
18 | ;; - provides rust-analyzer-inlay-hints-mode for inline type hints | ||
18 | 19 | ||
19 | ;; What's missing: | 20 | ;; What's missing: |
20 | ;; - file system changes in apply-source-change | 21 | ;; - file system changes in apply-source-change |
@@ -22,7 +23,6 @@ | |||
22 | ;; - onEnter, parentModule, findMatchingBrace | 23 | ;; - onEnter, parentModule, findMatchingBrace |
23 | ;; - runnables | 24 | ;; - runnables |
24 | ;; - the debugging commands (syntaxTree and analyzerStatus) | 25 | ;; - the debugging commands (syntaxTree and analyzerStatus) |
25 | ;; - lsp-ui doesn't interpret the markdown we return currently and instead displays it raw (https://github.com/emacs-lsp/lsp-ui/issues/220 ) | ||
26 | ;; - more | 26 | ;; - more |
27 | 27 | ||
28 | ;; Also, there's a problem with company-lsp's caching being too eager, sometimes | 28 | ;; Also, there's a problem with company-lsp's caching being too eager, sometimes |
@@ -225,10 +225,46 @@ | |||
225 | (with-current-buffer buf | 225 | (with-current-buffer buf |
226 | (let ((inhibit-read-only t)) | 226 | (let ((inhibit-read-only t)) |
227 | (erase-buffer) | 227 | (erase-buffer) |
228 | (insert parse-result)) | 228 | (insert parse-result))) |
229 | ) | ||
230 | (pop-to-buffer buf)))))) | 229 | (pop-to-buffer buf)))))) |
231 | 230 | ||
231 | ;; inlay hints | ||
232 | (defun rust-analyzer--update-inlay-hints () | ||
233 | (lsp-send-request-async | ||
234 | (lsp-make-request "rust-analyzer/inlayHints" | ||
235 | (list :textDocument (lsp--text-document-identifier))) | ||
236 | (lambda (res) | ||
237 | (remove-overlays (point-min) (point-max) 'rust-analyzer--inlay-hint t) | ||
238 | (dolist (hint res) | ||
239 | (-let* (((&hash "range" "label" "kind") hint) | ||
240 | ((beg . end) (lsp--range-to-region range)) | ||
241 | (overlay (make-overlay beg end))) | ||
242 | (overlay-put overlay 'rust-analyzer--inlay-hint t) | ||
243 | (overlay-put overlay 'evaporate t) | ||
244 | (overlay-put overlay 'after-string (propertize (concat ": " label) | ||
245 | 'font-lock-face 'font-lock-comment-face))))) | ||
246 | 'tick) | ||
247 | nil) | ||
248 | |||
249 | (defvar-local rust-analyzer--inlay-hints-timer nil) | ||
250 | |||
251 | (defun rust-analyzer--inlay-hints-change-handler (&rest rest) | ||
252 | (when rust-analyzer--inlay-hints-timer | ||
253 | (cancel-timer rust-analyzer--inlay-hints-timer)) | ||
254 | (setq rust-analyzer--inlay-hints-timer | ||
255 | (run-with-idle-timer 0.1 nil #'rust-analyzer--update-inlay-hints))) | ||
256 | |||
257 | (define-minor-mode rust-analyzer-inlay-hints-mode | ||
258 | "Mode for showing inlay hints." | ||
259 | nil nil nil | ||
260 | (cond | ||
261 | (rust-analyzer-inlay-hints-mode | ||
262 | (rust-analyzer--update-inlay-hints) | ||
263 | (add-hook 'after-change-functions #'rust-analyzer--inlay-hints-change-handler nil t)) | ||
264 | (t | ||
265 | (remove-overlays (point-min) (point-max) 'rust-analyzer--inlay-hint t) | ||
266 | (remove-hook 'after-change-functions #'rust-analyzer--inlay-hints-change-handler t)))) | ||
267 | |||
232 | 268 | ||
233 | (provide 'ra-emacs-lsp) | 269 | (provide 'ra-emacs-lsp) |
234 | ;;; ra-emacs-lsp.el ends here | 270 | ;;; ra-emacs-lsp.el ends here |