aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_assists/src/assist_ctx.rs15
-rw-r--r--crates/ra_assists/src/auto_import.rs18
-rw-r--r--crates/ra_cli/src/analysis_bench.rs2
-rw-r--r--crates/ra_hir/src/nameres/collector.rs148
-rw-r--r--crates/ra_hir/src/nameres/tests/mods.rs53
-rw-r--r--crates/ra_ide_api/src/inlay_hints.rs470
-rw-r--r--crates/ra_ide_api/src/lib.rs86
-rw-r--r--crates/ra_ide_api/src/references.rs3
-rw-r--r--crates/ra_ide_api/src/syntax_tree.rs14
-rw-r--r--crates/ra_ide_api/src/typing.rs4
-rw-r--r--crates/ra_lsp_server/src/conv.rs14
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs70
-rw-r--r--crates/ra_lsp_server/src/req.rs4
-rw-r--r--crates/ra_lsp_server/src/world.rs7
-rw-r--r--crates/ra_parser/src/grammar/expressions/atom.rs3
-rw-r--r--crates/ra_syntax/Cargo.toml4
-rw-r--r--crates/ra_syntax/src/lib.rs2
-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.rs91
-rw-r--r--crates/ra_syntax/src/validation/unescape.rs521
-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.rs5
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.txt89
-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)bin8 -> 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.rs3
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/ok/0132_box_expr.txt31
-rw-r--r--crates/ra_tools/src/lib.rs27
-rw-r--r--crates/ra_tools/src/main.rs141
532 files changed, 1003 insertions, 839 deletions
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
131impl AssistBuilder { 131impl 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 @@
1use std::borrow::Cow; 1use std::borrow::Cow;
2use std::sync::Arc;
2 3
3use arrayvec::ArrayVec; 4use ra_db::{FileId, SourceRoot};
4use ra_db::FileId;
5use ra_syntax::{ast, SmolStr}; 5use ra_syntax::{ast, SmolStr};
6use relative_path::RelativePathBuf; 6use relative_path::RelativePathBuf;
7use rustc_hash::FxHashMap; 7use 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
481impl<DB> ModCollector<'_, &'_ mut DefCollector<&'_ DB>> 489impl<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
681fn normalize_attribute_path(file_path: &SmolStr) -> Cow<str> { 693fn 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
708enum OutOfLineMode {
709 RootOrModRs { file: RelativePathBuf, directory: RelativePathBuf },
710 FileInDirectory(RelativePathBuf),
711 WithAttributePath(RelativePathBuf),
712}
713
714impl 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
727enum InsideInlineModuleMode {
728 File(RelativePathBuf),
729 WithAttributePath(RelativePathBuf),
730}
731
732impl 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
743enum ResolutionMode {
744 OutOfLine(OutOfLineMode),
745 InsideInlineModule(InsideInlineModuleMode),
746}
747
748impl 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
759fn 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
766fn 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)]
697mod tests { 777mod 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]
342fn module_resolution_decl_inside_inline_module() { 342fn 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]
372fn 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]
374fn module_resolution_decl_inside_inline_module_2() { 403fn 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]
406fn module_resolution_decl_inside_inline_module_3() { 435fn 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]
439fn module_resolution_decl_inside_inline_module_empty_path() { 468fn 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]
497fn module_resolution_decl_inside_inline_module_relative_path() { 526fn 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]
529fn module_resolution_decl_inside_inline_module_in_crate_root() { 556fn 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]
563fn module_resolution_decl_inside_inline_module_in_mod_rs() { 588fn 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]
603fn module_resolution_decl_inside_inline_module_in_non_crate_root() { 626fn 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]
643fn module_resolution_decl_inside_inline_module_in_non_crate_root_2() { 666fn module_resolution_decl_inside_inline_module_in_non_crate_root_2() {
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 @@
1use crate::{db::RootDatabase, FileId}; 1use crate::{db::RootDatabase, FileId};
2use hir::{HirDisplay, Ty}; 2use hir::{HirDisplay, SourceAnalyzer, Ty};
3use ra_syntax::ast::Pat;
4use ra_syntax::{ 3use 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)]
11pub enum InlayKind { 13pub 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
103fn 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
127fn 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
92fn get_node_displayable_type( 174fn 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#"
117struct OuterStruct {} 197#[derive(PartialEq)]
198enum CustomOption<T> {
199 None,
200 Some(T),
201}
202
203#[derive(PartialEq)]
204struct Test {
205 a: CustomOption<u32>,
206 b: u8,
207}
118 208
119fn main() { 209fn 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#"
291fn 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#"
318fn 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)]
346enum CustomOption<T> {
347 None,
348 Some(T),
349}
350
351#[derive(PartialEq)]
352struct Test {
353 a: CustomOption<u32>,
354 b: u8,
355}
356
357fn 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)]
407enum CustomOption<T> {
408 None,
409 Some(T),
410}
411
412#[derive(PartialEq)]
413struct Test {
414 a: CustomOption<u32>,
415 b: u8,
416}
417
418fn 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)]
448enum CustomOption<T> {
449 None,
450 Some(T),
451}
452
453#[derive(PartialEq)]
454struct Test {
455 a: CustomOption<u32>,
456 b: u8,
457}
458
459fn 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 379dd422e..2118e7ad3 100644
--- a/crates/ra_ide_api/src/references.rs
+++ b/crates/ra_ide_api/src/references.rs
@@ -437,7 +437,8 @@ mod tests {
437 } 437 }
438 } 438 }
439 } 439 }
440 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());
441 assert_eq_text!(expected, &*result); 442 assert_eq_text!(expected, &*result);
442 } 443 }
443} 444}
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
40pub fn handle_syntax_tree(world: WorldSnapshot, params: req::SyntaxTreeParams) -> Result<String> { 40pub 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 = (&params.text_document, params.range).try_conv_with(&world)?; 140 let frange = (&params.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
138pub fn handle_on_enter( 144pub 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
854fn highlight(world: &WorldSnapshot, file_id: FileId) -> Result<Vec<Decoration>> { 860fn 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 {
215pub enum InlayKind { 215pub 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// }
533fn box_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker { 536fn 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]
11unicode-xid = "0.1.0" 11unicode-xid = "0.1.0"
12itertools = "0.8.0" 12itertools = "0.8.0"
13rowan = "0.6.0-pre.1" 13rowan = "0.6.0"
14ra_rustc_lexer = { version = "0.1.0-pre.1", features = [ "unicode-xid" ] } 14ra_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;
24mod parsing; 24mod parsing;
25mod validation; 25mod validation;
26mod ptr; 26mod ptr;
27#[cfg(test)]
28mod tests;
27 29
28pub mod algo; 30pub mod algo;
29pub mod ast; 31pub 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 @@
1extern crate ra_syntax;
2extern crate test_utils;
3extern crate walkdir;
4
5use std::{ 1use std::{
6 fmt::Write, 2 fmt::Write,
7 path::{Component, PathBuf}, 3 path::{Component, PathBuf},
8}; 4};
9 5
10use ra_syntax::{fuzz, SourceFile};
11use test_utils::{collect_tests, dir_tests, project_dir, read_text}; 6use test_utils::{collect_tests, dir_tests, project_dir, read_text};
12 7
8use crate::{fuzz, SourceFile};
9
13#[test] 10#[test]
14fn lexer_tests() { 11fn 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
89fn test_data_dir() -> PathBuf { 86fn 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
93fn dump_tokens(tokens: &[ra_syntax::Token], text: &str) -> String { 90fn 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 @@
1mod unescape;
2
3mod block; 1mod block;
4mod field_expr; 2mod field_expr;
5 3
4use ra_rustc_lexer::unescape;
5
6use crate::{ 6use 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
13pub(crate) use unescape::EscapeError; 13#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
14pub 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
36impl 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
92impl 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
15pub(crate) fn validate(root: &SyntaxNode) -> Vec<SyntaxError> { 98pub(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
10use std::ops::Range;
11use std::str::Chars;
12
13#[derive(Debug, PartialEq, Eq, Clone, Hash)]
14pub 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
42pub(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.
50pub(crate) fn unescape_str<F>(literal_text: &str, callback: &mut F)
51where
52 F: FnMut(Range<usize>, Result<char, EscapeError>),
53{
54 unescape_str_or_byte_str(literal_text, Mode::Str, callback)
55}
56
57pub(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.
66pub(crate) fn unescape_byte_str<F>(literal_text: &str, callback: &mut F)
67where
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)]
76pub(crate) enum Mode {
77 Char,
78 Str,
79 Byte,
80 ByteStr,
81}
82
83impl 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
103fn 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
201fn 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.
212fn unescape_str_or_byte_str<F>(src: &str, mode: Mode, callback: &mut F)
213where
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
263fn 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
269fn is_ascii(x: u32) -> bool {
270 x <= 0x7F
271}
272
273#[cfg(test)]
274mod 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 @@
1fn 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 @@
1SOURCE_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 @@
1fn 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 @@
1SOURCE_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
16pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron"; 16pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron";
17const GRAMMAR_DIR: &str = "crates/ra_parser/src/grammar"; 17const GRAMMAR_DIR: &str = "crates/ra_parser/src/grammar";
18const OK_INLINE_TESTS_DIR: &str = "crates/ra_syntax/tests/data/parser/inline/ok"; 18const OK_INLINE_TESTS_DIR: &str = "crates/ra_syntax/test_data/parser/inline/ok";
19const ERR_INLINE_TESTS_DIR: &str = "crates/ra_syntax/tests/data/parser/inline/err"; 19const ERR_INLINE_TESTS_DIR: &str = "crates/ra_syntax/test_data/parser/inline/err";
20 20
21pub const SYNTAX_KINDS: &str = "crates/ra_parser/src/syntax_kind/generated.rs.tera"; 21pub const SYNTAX_KINDS: &str = "crates/ra_parser/src/syntax_kind/generated.rs.tera";
22pub const AST: &str = "crates/ra_syntax/src/ast/generated.rs.tera"; 22pub 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
82pub struct Cmd {
83 pub unix: &'static str,
84 pub windows: &'static str,
85 pub work_dir: &'static str,
86}
87
88impl 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
82pub fn run(cmdline: &str, dir: &str) -> Result<()> { 105pub 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 @@
1use clap::{App, SubCommand}; 1use clap::{App, Arg, SubCommand};
2use core::str; 2use core::str;
3use ra_tools::{ 3use 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};
7use std::{env, path::PathBuf}; 7use std::{env, path::PathBuf};
8 8
9struct InstallOpt {
10 client: Option<ClientOpt>,
11 server: Option<ServerOpt>,
12}
13
14enum ClientOpt {
15 VsCode,
16}
17
18struct ServerOpt {
19 jemalloc: bool,
20}
21
9fn main() -> Result<()> { 22fn 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
38fn install_code_extension() -> Result<()> { 62fn 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
59fn 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
108fn 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
150fn 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}