From 29d28f801cf7cac6a2b80dadfd60f3f6823bc3cf Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Thu, 28 Mar 2024 20:39:21 -0700 Subject: [PATCH 1/2] Make `cargo run` always available for binaries Previously, items for `cargo test` and `cargo check` would appear as in the `Select Runnable` quick pick that appears when running `rust-analyzer: Run`, but `run` would only appear as a runnable if a `main`` function was selected in the editor. This change adds `cargo run` as an always available runnable command for binary packages. This makes it easier to develop cli / tui applications, as now users can run application from anywhere in their codebase. --- src/tools/rust-analyzer/.cargo/config.toml | 12 + src/tools/rust-analyzer/.editorconfig | 17 + .../rust-analyzer/.git-blame-ignore-revs | 8 + src/tools/rust-analyzer/.gitattributes | 9 + .../.github/ISSUE_TEMPLATE/bug_report.md | 33 + .../critical_nightly_regression.md | 16 + .../.github/ISSUE_TEMPLATE/feature_request.md | 8 + .../.github/ISSUE_TEMPLATE/question.md | 8 + .../.github/actions/github-release/Dockerfile | 8 + .../.github/actions/github-release/README.md | 21 + .../.github/actions/github-release/action.yml | 15 + .../.github/actions/github-release/main.js | 144 + .../actions/github-release/package.json | 10 + src/tools/rust-analyzer/.github/rust.json | 33 + .../.github/workflows/autopublish.yaml | 60 + .../rust-analyzer/.github/workflows/ci.yaml | 256 + .../rust-analyzer/.github/workflows/fuzz.yml | 43 + .../.github/workflows/metrics.yaml | 153 + .../.github/workflows/publish-libs.yaml | 36 + .../.github/workflows/release.yaml | 280 + .../.github/workflows/rustdoc.yaml | 34 + src/tools/rust-analyzer/.gitignore | 16 + src/tools/rust-analyzer/.typos.toml | 30 + .../rust-analyzer/.vscode/extensions.json | 9 + src/tools/rust-analyzer/.vscode/launch.json | 131 + src/tools/rust-analyzer/.vscode/tasks.json | 67 + src/tools/rust-analyzer/Cargo.lock | 2469 +++ src/tools/rust-analyzer/Cargo.toml | 205 + src/tools/rust-analyzer/LICENSE-APACHE | 201 + src/tools/rust-analyzer/LICENSE-MIT | 23 + src/tools/rust-analyzer/PRIVACY.md | 1 + src/tools/rust-analyzer/README.md | 49 + .../rust-analyzer/assets/logo-square.svg | 88 + src/tools/rust-analyzer/assets/logo-wide.svg | 142 + .../bench_data/glorious_old_parser | 8562 +++++++++ .../bench_data/numerous_macro_rules | 560 + src/tools/rust-analyzer/clippy.toml | 5 + .../rust-analyzer/crates/base-db/Cargo.toml | 32 + .../crates/base-db/src/change.rs | 86 + .../rust-analyzer/crates/base-db/src/input.rs | 863 + .../rust-analyzer/crates/base-db/src/lib.rs | 180 + src/tools/rust-analyzer/crates/cfg/Cargo.toml | 34 + .../rust-analyzer/crates/cfg/src/cfg_expr.rs | 123 + src/tools/rust-analyzer/crates/cfg/src/dnf.rs | 345 + src/tools/rust-analyzer/crates/cfg/src/lib.rs | 233 + .../rust-analyzer/crates/cfg/src/tests.rs | 216 + .../rust-analyzer/crates/flycheck/Cargo.toml | 29 + .../crates/flycheck/src/command.rs | 156 + .../rust-analyzer/crates/flycheck/src/lib.rs | 494 + .../crates/flycheck/src/test_runner.rs | 80 + .../rust-analyzer/crates/hir-def/Cargo.toml | 60 + .../rust-analyzer/crates/hir-def/src/attr.rs | 640 + .../crates/hir-def/src/attr/builtin.rs | 697 + .../crates/hir-def/src/attr/tests.rs | 47 + .../rust-analyzer/crates/hir-def/src/body.rs | 431 + .../crates/hir-def/src/body/lower.rs | 2042 +++ .../crates/hir-def/src/body/pretty.rs | 697 + .../crates/hir-def/src/body/scope.rs | 605 + .../crates/hir-def/src/body/tests.rs | 335 + .../crates/hir-def/src/body/tests/block.rs | 530 + .../crates/hir-def/src/builtin_type.rs | 199 + .../crates/hir-def/src/child_by_source.rs | 259 + .../rust-analyzer/crates/hir-def/src/data.rs | 819 + .../crates/hir-def/src/data/adt.rs | 524 + .../rust-analyzer/crates/hir-def/src/db.rs | 348 + .../crates/hir-def/src/dyn_map.rs | 118 + .../crates/hir-def/src/dyn_map/keys.rs | 73 + .../crates/hir-def/src/expander.rs | 203 + .../crates/hir-def/src/find_path.rs | 1585 ++ .../crates/hir-def/src/generics.rs | 577 + .../rust-analyzer/crates/hir-def/src/hir.rs | 573 + .../crates/hir-def/src/hir/format_args.rs | 519 + .../crates/hir-def/src/hir/type_ref.rs | 524 + .../crates/hir-def/src/import_map.rs | 1035 ++ .../crates/hir-def/src/item_scope.rs | 793 + .../crates/hir-def/src/item_tree.rs | 1056 ++ .../crates/hir-def/src/item_tree/lower.rs | 829 + .../crates/hir-def/src/item_tree/pretty.rs | 647 + .../crates/hir-def/src/item_tree/tests.rs | 449 + .../crates/hir-def/src/lang_item.rs | 485 + .../rust-analyzer/crates/hir-def/src/lib.rs | 1441 ++ .../rust-analyzer/crates/hir-def/src/lower.rs | 48 + .../builtin_derive_macro.rs | 648 + .../macro_expansion_tests/builtin_fn_macro.rs | 534 + .../hir-def/src/macro_expansion_tests/mbe.rs | 1885 ++ .../src/macro_expansion_tests/mbe/matching.rs | 186 + .../macro_expansion_tests/mbe/meta_syntax.rs | 154 + .../macro_expansion_tests/mbe/metavar_expr.rs | 313 + .../macro_expansion_tests/mbe/regression.rs | 1146 ++ .../mbe/tt_conversion.rs | 200 + .../hir-def/src/macro_expansion_tests/mod.rs | 327 + .../src/macro_expansion_tests/proc_macros.rs | 188 + .../crates/hir-def/src/nameres.rs | 766 + .../hir-def/src/nameres/attr_resolution.rs | 156 + .../crates/hir-def/src/nameres/collector.rs | 2524 +++ .../crates/hir-def/src/nameres/diagnostics.rs | 165 + .../hir-def/src/nameres/mod_resolution.rs | 170 + .../hir-def/src/nameres/path_resolution.rs | 576 + .../crates/hir-def/src/nameres/proc_macro.rs | 89 + .../crates/hir-def/src/nameres/tests.rs | 931 + .../crates/hir-def/src/nameres/tests/globs.rs | 369 + .../hir-def/src/nameres/tests/incremental.rs | 354 + .../hir-def/src/nameres/tests/macros.rs | 1486 ++ .../src/nameres/tests/mod_resolution.rs | 896 + .../hir-def/src/nameres/tests/primitives.rs | 23 + .../rust-analyzer/crates/hir-def/src/path.rs | 272 + .../crates/hir-def/src/path/lower.rs | 278 + .../crates/hir-def/src/per_ns.rs | 135 + .../crates/hir-def/src/pretty.rs | 271 + .../crates/hir-def/src/resolver.rs | 1227 ++ .../rust-analyzer/crates/hir-def/src/src.rs | 160 + .../crates/hir-def/src/test_db.rs | 242 + .../rust-analyzer/crates/hir-def/src/trace.rs | 55 + .../crates/hir-def/src/visibility.rs | 254 + .../crates/hir-expand/Cargo.toml | 40 + .../crates/hir-expand/src/attrs.rs | 398 + .../hir-expand/src/builtin_attr_macro.rs | 147 + .../hir-expand/src/builtin_derive_macro.rs | 830 + .../crates/hir-expand/src/builtin_fn_macro.rs | 843 + .../crates/hir-expand/src/cfg_process.rs | 333 + .../crates/hir-expand/src/change.rs | 74 + .../rust-analyzer/crates/hir-expand/src/db.rs | 700 + .../crates/hir-expand/src/declarative.rs | 184 + .../crates/hir-expand/src/eager.rs | 259 + .../crates/hir-expand/src/files.rs | 390 + .../crates/hir-expand/src/fixup.rs | 744 + .../crates/hir-expand/src/hygiene.rs | 251 + .../crates/hir-expand/src/lib.rs | 1003 ++ .../crates/hir-expand/src/mod_path.rs | 400 + .../crates/hir-expand/src/name.rs | 493 + .../crates/hir-expand/src/proc_macro.rs | 167 + .../crates/hir-expand/src/quote.rs | 323 + .../crates/hir-expand/src/span_map.rs | 148 + .../rust-analyzer/crates/hir-ty/Cargo.toml | 67 + .../crates/hir-ty/src/autoderef.rs | 176 + .../crates/hir-ty/src/builder.rs | 405 + .../crates/hir-ty/src/chalk_db.rs | 1036 ++ .../crates/hir-ty/src/chalk_ext.rs | 455 + .../crates/hir-ty/src/consteval.rs | 320 + .../crates/hir-ty/src/consteval/tests.rs | 2854 +++ .../hir-ty/src/consteval/tests/intrinsics.rs | 750 + .../rust-analyzer/crates/hir-ty/src/db.rs | 315 + .../crates/hir-ty/src/diagnostics.rs | 13 + .../hir-ty/src/diagnostics/decl_check.rs | 689 + .../src/diagnostics/decl_check/case_conv.rs | 155 + .../crates/hir-ty/src/diagnostics/expr.rs | 582 + .../hir-ty/src/diagnostics/match_check.rs | 412 + .../diagnostics/match_check/pat_analysis.rs | 489 + .../src/diagnostics/match_check/pat_util.rs | 56 + .../hir-ty/src/diagnostics/unsafe_check.rs | 109 + .../crates/hir-ty/src/display.rs | 2019 +++ .../rust-analyzer/crates/hir-ty/src/infer.rs | 1761 ++ .../crates/hir-ty/src/infer/cast.rs | 51 + .../crates/hir-ty/src/infer/closure.rs | 1122 ++ .../crates/hir-ty/src/infer/coerce.rs | 749 + .../crates/hir-ty/src/infer/expr.rs | 2106 +++ .../crates/hir-ty/src/infer/mutability.rs | 220 + .../crates/hir-ty/src/infer/pat.rs | 529 + .../crates/hir-ty/src/infer/path.rs | 411 + .../crates/hir-ty/src/infer/unify.rs | 1030 ++ .../crates/hir-ty/src/inhabitedness.rs | 174 + .../crates/hir-ty/src/interner.rs | 393 + .../crates/hir-ty/src/lang_items.rs | 65 + .../rust-analyzer/crates/hir-ty/src/layout.rs | 493 + .../crates/hir-ty/src/layout/adt.rs | 186 + .../crates/hir-ty/src/layout/target.rs | 47 + .../crates/hir-ty/src/layout/tests.rs | 542 + .../crates/hir-ty/src/layout/tests/closure.rs | 272 + .../rust-analyzer/crates/hir-ty/src/lib.rs | 1012 ++ .../rust-analyzer/crates/hir-ty/src/lower.rs | 2321 +++ .../crates/hir-ty/src/mapping.rs | 168 + .../crates/hir-ty/src/method_resolution.rs | 1663 ++ .../rust-analyzer/crates/hir-ty/src/mir.rs | 1178 ++ .../crates/hir-ty/src/mir/borrowck.rs | 600 + .../crates/hir-ty/src/mir/eval.rs | 2765 +++ .../crates/hir-ty/src/mir/eval/shim.rs | 1476 ++ .../crates/hir-ty/src/mir/eval/shim/simd.rs | 192 + .../crates/hir-ty/src/mir/eval/tests.rs | 835 + .../crates/hir-ty/src/mir/lower.rs | 2194 +++ .../crates/hir-ty/src/mir/lower/as_place.rs | 371 + .../hir-ty/src/mir/lower/pattern_matching.rs | 643 + .../crates/hir-ty/src/mir/monomorphization.rs | 350 + .../crates/hir-ty/src/mir/pretty.rs | 463 + .../crates/hir-ty/src/primitive.rs | 62 + .../crates/hir-ty/src/test_db.rs | 150 + .../rust-analyzer/crates/hir-ty/src/tests.rs | 594 + .../crates/hir-ty/src/tests/coercion.rs | 944 + .../crates/hir-ty/src/tests/diagnostics.rs | 138 + .../hir-ty/src/tests/display_source_code.rs | 248 + .../crates/hir-ty/src/tests/incremental.rs | 99 + .../crates/hir-ty/src/tests/macros.rs | 1406 ++ .../hir-ty/src/tests/method_resolution.rs | 2052 +++ .../crates/hir-ty/src/tests/never_type.rs | 538 + .../crates/hir-ty/src/tests/patterns.rs | 1227 ++ .../crates/hir-ty/src/tests/regression.rs | 2042 +++ .../crates/hir-ty/src/tests/simple.rs | 3666 ++++ .../crates/hir-ty/src/tests/traits.rs | 4766 +++++ .../rust-analyzer/crates/hir-ty/src/tls.rs | 152 + .../rust-analyzer/crates/hir-ty/src/traits.rs | 253 + .../rust-analyzer/crates/hir-ty/src/utils.rs | 636 + src/tools/rust-analyzer/crates/hir/Cargo.toml | 39 + .../rust-analyzer/crates/hir/src/attrs.rs | 337 + src/tools/rust-analyzer/crates/hir/src/db.rs | 27 + .../crates/hir/src/diagnostics.rs | 628 + .../rust-analyzer/crates/hir/src/display.rs | 711 + .../rust-analyzer/crates/hir/src/from_id.rs | 300 + .../crates/hir/src/has_source.rs | 231 + src/tools/rust-analyzer/crates/hir/src/lib.rs | 5325 ++++++ .../rust-analyzer/crates/hir/src/semantics.rs | 1749 ++ .../crates/hir/src/semantics/source_to_def.rs | 506 + .../crates/hir/src/source_analyzer.rs | 1283 ++ .../rust-analyzer/crates/hir/src/symbols.rs | 352 + .../crates/hir/src/term_search.rs | 323 + .../crates/hir/src/term_search/expr.rs | 483 + .../crates/hir/src/term_search/tactics.rs | 932 + .../crates/ide-assists/Cargo.toml | 37 + .../crates/ide-assists/src/assist_config.rs | 19 + .../crates/ide-assists/src/assist_context.rs | 210 + .../ide-assists/src/handlers/add_braces.rs | 155 + .../src/handlers/add_explicit_type.rs | 326 + .../src/handlers/add_label_to_loop.rs | 164 + .../src/handlers/add_lifetime_to_type.rs | 229 + .../src/handlers/add_missing_impl_members.rs | 2283 +++ .../src/handlers/add_missing_match_arms.rs | 2001 +++ .../src/handlers/add_return_type.rs | 447 + .../src/handlers/add_turbo_fish.rs | 457 + .../src/handlers/apply_demorgan.rs | 588 + .../ide-assists/src/handlers/auto_import.rs | 1591 ++ .../src/handlers/bind_unused_param.rs | 159 + .../ide-assists/src/handlers/bool_to_enum.rs | 1778 ++ .../src/handlers/change_visibility.rs | 277 + .../src/handlers/convert_bool_then.rs | 573 + .../src/handlers/convert_comment_block.rs | 399 + .../src/handlers/convert_integer_literal.rs | 268 + .../src/handlers/convert_into_to_from.rs | 356 + .../handlers/convert_iter_for_each_to_for.rs | 549 + .../src/handlers/convert_let_else_to_match.rs | 501 + .../src/handlers/convert_match_to_let_else.rs | 496 + .../convert_named_struct_to_tuple_struct.rs | 981 ++ .../convert_nested_function_to_closure.rs | 209 + .../src/handlers/convert_to_guarded_return.rs | 768 + .../convert_tuple_return_type_to_struct.rs | 889 + .../convert_tuple_struct_to_named_struct.rs | 885 + ...ert_two_arm_bool_match_to_matches_macro.rs | 345 + .../src/handlers/convert_while_to_loop.rs | 188 + .../handlers/destructure_struct_binding.rs | 753 + .../src/handlers/destructure_tuple_binding.rs | 2094 +++ .../src/handlers/desugar_doc_comment.rs | 312 + .../src/handlers/expand_glob_import.rs | 1036 ++ .../extract_expressions_from_format_string.rs | 295 + .../src/handlers/extract_function.rs | 6111 +++++++ .../src/handlers/extract_module.rs | 1735 ++ .../extract_struct_from_enum_variant.rs | 1179 ++ .../src/handlers/extract_type_alias.rs | 391 + .../src/handlers/extract_variable.rs | 1463 ++ .../handlers/fill_record_pattern_fields.rs | 355 + .../src/handlers/fix_visibility.rs | 606 + .../ide-assists/src/handlers/flip_binexpr.rs | 168 + .../ide-assists/src/handlers/flip_comma.rs | 92 + .../src/handlers/flip_trait_bound.rs | 124 + .../src/handlers/generate_constant.rs | 271 + .../generate_default_from_enum_variant.rs | 178 + .../src/handlers/generate_default_from_new.rs | 686 + .../src/handlers/generate_delegate_methods.rs | 717 + .../src/handlers/generate_delegate_trait.rs | 1780 ++ .../src/handlers/generate_deref.rs | 354 + .../src/handlers/generate_derive.rs | 202 + .../generate_documentation_template.rs | 1338 ++ .../src/handlers/generate_enum_is_method.rs | 310 + .../generate_enum_projection_method.rs | 348 + .../src/handlers/generate_enum_variant.rs | 566 + .../handlers/generate_from_impl_for_enum.rs | 307 + .../src/handlers/generate_function.rs | 2870 +++ .../src/handlers/generate_getter_or_setter.rs | 1006 ++ .../ide-assists/src/handlers/generate_impl.rs | 421 + .../handlers/generate_is_empty_from_len.rs | 288 + .../src/handlers/generate_mut_trait_impl.rs | 202 + .../ide-assists/src/handlers/generate_new.rs | 559 + .../src/handlers/generate_trait_from_impl.rs | 407 + .../ide-assists/src/handlers/inline_call.rs | 1814 ++ .../src/handlers/inline_const_as_literal.rs | 722 + .../src/handlers/inline_local_variable.rs | 972 ++ .../ide-assists/src/handlers/inline_macro.rs | 301 + .../src/handlers/inline_type_alias.rs | 1020 ++ .../src/handlers/into_to_qualified_from.rs | 273 + .../src/handlers/introduce_named_generic.rs | 178 + .../src/handlers/introduce_named_lifetime.rs | 338 + .../ide-assists/src/handlers/invert_if.rs | 144 + .../ide-assists/src/handlers/merge_imports.rs | 717 + .../src/handlers/merge_match_arms.rs | 823 + .../src/handlers/merge_nested_if.rs | 246 + .../ide-assists/src/handlers/move_bounds.rs | 126 + .../src/handlers/move_const_to_impl.rs | 447 + .../src/handlers/move_from_mod_rs.rs | 130 + .../ide-assists/src/handlers/move_guard.rs | 997 ++ .../src/handlers/move_module_to_file.rs | 337 + .../src/handlers/move_to_mod_rs.rs | 151 + .../src/handlers/normalize_import.rs | 219 + .../src/handlers/number_representation.rs | 183 + .../src/handlers/promote_local_to_const.rs | 349 + .../src/handlers/pull_assignment_up.rs | 507 + .../src/handlers/qualify_method_call.rs | 552 + .../ide-assists/src/handlers/qualify_path.rs | 1297 ++ .../ide-assists/src/handlers/raw_string.rs | 485 + .../ide-assists/src/handlers/remove_dbg.rs | 378 + .../ide-assists/src/handlers/remove_mut.rs | 37 + .../src/handlers/remove_parentheses.rs | 242 + .../src/handlers/remove_unused_imports.rs | 915 + .../src/handlers/remove_unused_param.rs | 410 + .../src/handlers/reorder_fields.rs | 210 + .../src/handlers/reorder_impl_items.rs | 319 + .../src/handlers/replace_arith_op.rs | 226 + .../replace_derive_with_manual_impl.rs | 1382 ++ .../src/handlers/replace_if_let_with_match.rs | 1155 ++ .../replace_is_method_with_if_let_method.rs | 190 + .../src/handlers/replace_let_with_if_let.rs | 100 + .../src/handlers/replace_method_eager_lazy.rs | 310 + .../replace_named_generic_with_impl.rs | 354 + .../replace_qualified_name_with_use.rs | 440 + .../src/handlers/replace_string_with_char.rs | 307 + .../handlers/replace_try_expr_with_match.rs | 150 + .../replace_turbofish_with_explicit_type.rs | 365 + .../ide-assists/src/handlers/sort_items.rs | 685 + .../ide-assists/src/handlers/split_import.rs | 82 + .../ide-assists/src/handlers/term_search.rs | 276 + .../ide-assists/src/handlers/toggle_ignore.rs | 98 + .../src/handlers/unmerge_match_arm.rs | 292 + .../ide-assists/src/handlers/unmerge_use.rs | 233 + .../src/handlers/unnecessary_async.rs | 275 + .../src/handlers/unqualify_method_call.rs | 261 + .../ide-assists/src/handlers/unwrap_block.rs | 830 + .../src/handlers/unwrap_result_return_type.rs | 1115 ++ .../ide-assists/src/handlers/unwrap_tuple.rs | 159 + .../handlers/wrap_return_type_in_result.rs | 1001 ++ .../crates/ide-assists/src/lib.rs | 372 + .../crates/ide-assists/src/tests.rs | 714 + .../crates/ide-assists/src/tests/generated.rs | 3153 ++++ .../crates/ide-assists/src/utils.rs | 905 + .../src/utils/gen_trait_fn_body.rs | 687 + .../ide-assists/src/utils/ref_field_expr.rs | 133 + .../ide-assists/src/utils/suggest_name.rs | 823 + .../crates/ide-completion/Cargo.toml | 41 + .../crates/ide-completion/src/completions.rs | 781 + .../src/completions/attribute.rs | 381 + .../src/completions/attribute/cfg.rs | 105 + .../src/completions/attribute/derive.rs | 116 + .../src/completions/attribute/lint.rs | 61 + .../src/completions/attribute/macro_use.rs | 35 + .../src/completions/attribute/repr.rs | 74 + .../ide-completion/src/completions/dot.rs | 1281 ++ .../src/completions/env_vars.rs | 153 + .../ide-completion/src/completions/expr.rs | 386 + .../src/completions/extern_abi.rs | 110 + .../src/completions/extern_crate.rs | 71 + .../ide-completion/src/completions/field.rs | 39 + .../src/completions/flyimport.rs | 440 + .../src/completions/fn_param.rs | 198 + .../src/completions/format_string.rs | 207 + .../src/completions/item_list.rs | 133 + .../src/completions/item_list/trait_impl.rs | 1399 ++ .../ide-completion/src/completions/keyword.rs | 274 + .../src/completions/lifetime.rs | 342 + .../ide-completion/src/completions/mod_.rs | 372 + .../ide-completion/src/completions/pattern.rs | 186 + .../ide-completion/src/completions/postfix.rs | 849 + .../src/completions/postfix/format_like.rs | 115 + .../ide-completion/src/completions/record.rs | 473 + .../ide-completion/src/completions/snippet.rs | 186 + .../ide-completion/src/completions/type.rs | 241 + .../ide-completion/src/completions/use_.rs | 123 + .../ide-completion/src/completions/vis.rs | 41 + .../crates/ide-completion/src/config.rs | 46 + .../crates/ide-completion/src/context.rs | 786 + .../ide-completion/src/context/analysis.rs | 1535 ++ .../ide-completion/src/context/tests.rs | 425 + .../crates/ide-completion/src/item.rs | 727 + .../crates/ide-completion/src/lib.rs | 279 + .../crates/ide-completion/src/render.rs | 2983 ++++ .../ide-completion/src/render/const_.rs | 33 + .../ide-completion/src/render/function.rs | 735 + .../ide-completion/src/render/literal.rs | 198 + .../ide-completion/src/render/macro_.rs | 329 + .../ide-completion/src/render/pattern.rs | 222 + .../ide-completion/src/render/type_alias.rs | 57 + .../src/render/union_literal.rs | 86 + .../ide-completion/src/render/variant.rs | 118 + .../crates/ide-completion/src/snippet.rs | 219 + .../crates/ide-completion/src/tests.rs | 312 + .../ide-completion/src/tests/attribute.rs | 1148 ++ .../ide-completion/src/tests/expression.rs | 1311 ++ .../ide-completion/src/tests/flyimport.rs | 1547 ++ .../ide-completion/src/tests/fn_param.rs | 274 + .../crates/ide-completion/src/tests/item.rs | 154 + .../ide-completion/src/tests/item_list.rs | 470 + .../ide-completion/src/tests/pattern.rs | 821 + .../ide-completion/src/tests/predicate.rs | 171 + .../ide-completion/src/tests/proc_macros.rs | 175 + .../crates/ide-completion/src/tests/record.rs | 303 + .../ide-completion/src/tests/special.rs | 1516 ++ .../ide-completion/src/tests/type_pos.rs | 1031 ++ .../ide-completion/src/tests/use_tree.rs | 458 + .../ide-completion/src/tests/visibility.rs | 90 + .../rust-analyzer/crates/ide-db/Cargo.toml | 53 + .../crates/ide-db/src/active_parameter.rs | 141 + .../crates/ide-db/src/apply_change.rs | 217 + .../crates/ide-db/src/assists.rs | 137 + .../rust-analyzer/crates/ide-db/src/defs.rs | 829 + .../crates/ide-db/src/documentation.rs | 279 + .../crates/ide-db/src/famous_defs.rs | 208 + .../crates/ide-db/src/generated/lints.rs | 14569 ++++++++++++++++ .../crates/ide-db/src/helpers.rs | 127 + .../ide-db/src/imports/import_assets.rs | 748 + .../crates/ide-db/src/imports/insert_use.rs | 517 + .../ide-db/src/imports/insert_use/tests.rs | 1317 ++ .../ide-db/src/imports/merge_imports.rs | 708 + .../crates/ide-db/src/items_locator.rs | 97 + .../rust-analyzer/crates/ide-db/src/label.rs | 48 + .../rust-analyzer/crates/ide-db/src/lib.rs | 416 + .../crates/ide-db/src/path_transform.rs | 477 + .../crates/ide-db/src/prime_caches.rs | 162 + .../ide-db/src/prime_caches/topologic_sort.rs | 98 + .../rust-analyzer/crates/ide-db/src/rename.rs | 628 + .../crates/ide-db/src/rust_doc.rs | 203 + .../rust-analyzer/crates/ide-db/src/search.rs | 927 + .../crates/ide-db/src/source_change.rs | 428 + .../crates/ide-db/src/symbol_index.rs | 518 + .../src/syntax_helpers/format_string.rs | 298 + .../src/syntax_helpers/format_string_exprs.rs | 253 + .../insert_whitespace_into_node.rs | 135 + .../ide-db/src/syntax_helpers/node_ext.rs | 474 + .../ide-db/src/test_data/test_doc_alias.txt | 223 + .../test_symbol_index_collection.txt | 957 + .../rust-analyzer/crates/ide-db/src/traits.rs | 276 + .../crates/ide-db/src/ty_filter.rs | 86 + .../ide-db/src/use_trivial_constructor.rs | 32 + .../crates/ide-diagnostics/Cargo.toml | 39 + .../src/handlers/break_outside_of_loop.rs | 159 + .../src/handlers/expected_function.rs | 40 + .../src/handlers/field_shorthand.rs | 216 + .../src/handlers/inactive_code.rs | 174 + .../src/handlers/incoherent_impl.rs | 77 + .../src/handlers/incorrect_case.rs | 769 + .../src/handlers/invalid_derive_target.rs | 37 + .../src/handlers/json_is_not_rust.rs | 303 + .../src/handlers/macro_error.rs | 287 + .../src/handlers/malformed_derive.rs | 36 + .../src/handlers/mismatched_arg_count.rs | 406 + .../src/handlers/missing_fields.rs | 835 + .../src/handlers/missing_match_arms.rs | 1142 ++ .../src/handlers/missing_unsafe.rs | 476 + .../src/handlers/moved_out_of_ref.rs | 193 + .../src/handlers/mutability_errors.rs | 1261 ++ .../src/handlers/no_such_field.rs | 399 + .../src/handlers/non_exhaustive_let.rs | 47 + .../src/handlers/private_assoc_item.rs | 154 + .../src/handlers/private_field.rs | 115 + .../src/handlers/remove_trailing_return.rs | 394 + .../src/handlers/remove_unnecessary_else.rs | 518 + .../replace_filter_map_next_with_find_map.rs | 186 + .../handlers/trait_impl_incorrect_safety.rs | 129 + .../handlers/trait_impl_missing_assoc_item.rs | 129 + .../src/handlers/trait_impl_orphan.rs | 107 + .../trait_impl_redundant_assoc_item.rs | 253 + .../src/handlers/type_mismatch.rs | 751 + .../src/handlers/typed_hole.rs | 393 + .../src/handlers/undeclared_label.rs | 110 + .../handlers/unimplemented_builtin_macro.rs | 16 + .../src/handlers/unlinked_file.rs | 483 + .../src/handlers/unreachable_label.rs | 92 + .../src/handlers/unresolved_assoc_item.rs | 53 + .../src/handlers/unresolved_extern_crate.rs | 50 + .../src/handlers/unresolved_field.rs | 462 + .../src/handlers/unresolved_ident.rs | 59 + .../src/handlers/unresolved_import.rs | 91 + .../src/handlers/unresolved_macro_call.rs | 85 + .../src/handlers/unresolved_method.rs | 363 + .../src/handlers/unresolved_module.rs | 86 + .../src/handlers/unresolved_proc_macro.rs | 45 + .../src/handlers/unused_variables.rs | 216 + .../src/handlers/useless_braces.rs | 183 + .../crates/ide-diagnostics/src/lib.rs | 612 + .../crates/ide-diagnostics/src/tests.rs | 312 + .../rust-analyzer/crates/ide-ssr/Cargo.toml | 37 + .../crates/ide-ssr/src/errors.rs | 29 + .../crates/ide-ssr/src/fragments.rs | 60 + .../crates/ide-ssr/src/from_comment.rs | 35 + .../rust-analyzer/crates/ide-ssr/src/lib.rs | 357 + .../crates/ide-ssr/src/matching.rs | 814 + .../crates/ide-ssr/src/nester.rs | 99 + .../crates/ide-ssr/src/parsing.rs | 406 + .../crates/ide-ssr/src/replacing.rs | 252 + .../crates/ide-ssr/src/resolving.rs | 308 + .../crates/ide-ssr/src/search.rs | 286 + .../rust-analyzer/crates/ide-ssr/src/tests.rs | 1398 ++ src/tools/rust-analyzer/crates/ide/Cargo.toml | 59 + .../crates/ide/src/annotations.rs | 912 + .../ide/src/annotations/fn_references.rs | 103 + .../crates/ide/src/call_hierarchy.rs | 493 + .../rust-analyzer/crates/ide/src/doc_links.rs | 683 + .../ide/src/doc_links/intra_doc_links.rs | 73 + .../crates/ide/src/doc_links/tests.rs | 689 + .../crates/ide/src/expand_macro.rs | 549 + .../crates/ide/src/extend_selection.rs | 665 + .../crates/ide/src/fetch_crates.rs | 42 + .../crates/ide/src/file_structure.rs | 638 + .../rust-analyzer/crates/ide/src/fixture.rs | 86 + .../crates/ide/src/folding_ranges.rs | 626 + .../crates/ide/src/goto_declaration.rs | 246 + .../crates/ide/src/goto_definition.rs | 2292 +++ .../crates/ide/src/goto_implementation.rs | 414 + .../crates/ide/src/goto_type_definition.rs | 385 + .../crates/ide/src/highlight_related.rs | 1702 ++ .../rust-analyzer/crates/ide/src/hover.rs | 597 + .../crates/ide/src/hover/render.rs | 859 + .../crates/ide/src/hover/tests.rs | 7880 +++++++++ .../crates/ide/src/inlay_hints.rs | 733 + .../crates/ide/src/inlay_hints/adjustment.rs | 712 + .../crates/ide/src/inlay_hints/bind_pat.rs | 1104 ++ .../ide/src/inlay_hints/binding_mode.rs | 168 + .../crates/ide/src/inlay_hints/chaining.rs | 674 + .../ide/src/inlay_hints/closing_brace.rs | 194 + .../ide/src/inlay_hints/closure_captures.rs | 211 + .../crates/ide/src/inlay_hints/closure_ret.rs | 100 + .../ide/src/inlay_hints/discriminant.rs | 206 + .../ide/src/inlay_hints/fn_lifetime_fn.rs | 332 + .../ide/src/inlay_hints/implicit_drop.rs | 218 + .../ide/src/inlay_hints/implicit_static.rs | 78 + .../crates/ide/src/inlay_hints/param_name.rs | 552 + .../ide/src/inlay_hints/range_exclusive.rs | 120 + .../crates/ide/src/interpret_function.rs | 50 + .../crates/ide/src/join_lines.rs | 1084 ++ src/tools/rust-analyzer/crates/ide/src/lib.rs | 791 + .../crates/ide/src/markdown_remove.rs | 163 + .../rust-analyzer/crates/ide/src/markup.rs | 41 + .../crates/ide/src/matching_brace.rs | 78 + .../rust-analyzer/crates/ide/src/moniker.rs | 587 + .../rust-analyzer/crates/ide/src/move_item.rs | 891 + .../crates/ide/src/navigation_target.rs | 927 + .../crates/ide/src/parent_module.rs | 171 + .../crates/ide/src/references.rs | 2169 +++ .../rust-analyzer/crates/ide/src/rename.rs | 2782 +++ .../rust-analyzer/crates/ide/src/runnables.rs | 1487 ++ .../crates/ide/src/shuffle_crate_graph.rs | 58 + .../crates/ide/src/signature_help.rs | 2259 +++ src/tools/rust-analyzer/crates/ide/src/ssr.rs | 264 + .../crates/ide/src/static_index.rs | 353 + .../rust-analyzer/crates/ide/src/status.rs | 289 + .../crates/ide/src/syntax_highlighting.rs | 558 + .../ide/src/syntax_highlighting/escape.rs | 69 + .../ide/src/syntax_highlighting/format.rs | 69 + .../ide/src/syntax_highlighting/highlight.rs | 756 + .../ide/src/syntax_highlighting/highlights.rs | 92 + .../ide/src/syntax_highlighting/html.rs | 117 + .../ide/src/syntax_highlighting/inject.rs | 318 + .../ide/src/syntax_highlighting/injector.rs | 81 + .../ide/src/syntax_highlighting/macro_.rs | 128 + .../ide/src/syntax_highlighting/tags.rs | 360 + .../test_data/highlight_assoc_functions.html | 65 + .../test_data/highlight_attributes.html | 64 + .../test_data/highlight_block_mod_items.html | 66 + .../test_data/highlight_const.html | 83 + .../test_data/highlight_crate_root.html | 69 + .../test_data/highlight_default_library.html | 53 + .../test_data/highlight_doctest.html | 193 + .../test_data/highlight_extern_crate.html | 51 + .../test_data/highlight_general.html | 236 + .../test_data/highlight_injection.html | 65 + .../test_data/highlight_keywords.html | 61 + .../test_data/highlight_lifetimes.html | 58 + .../test_data/highlight_macros.html | 105 + .../highlight_module_docs_inline.html | 54 + .../highlight_module_docs_outline.html | 53 + .../test_data/highlight_operators.html | 61 + .../test_data/highlight_rainbow.html | 59 + .../test_data/highlight_strings.html | 180 + .../test_data/highlight_unsafe.html | 129 + .../ide/src/syntax_highlighting/tests.rs | 1248 ++ .../crates/ide/src/syntax_tree.rs | 339 + .../crates/ide/src/test_explorer.rs | 138 + .../rust-analyzer/crates/ide/src/typing.rs | 1442 ++ .../crates/ide/src/typing/on_enter.rs | 613 + .../crates/ide/src/view_crate_graph.rs | 92 + .../rust-analyzer/crates/ide/src/view_hir.rs | 32 + .../crates/ide/src/view_item_tree.rs | 16 + .../crates/ide/src/view_memory_layout.rs | 409 + .../rust-analyzer/crates/ide/src/view_mir.rs | 31 + .../rust-analyzer/crates/intern/Cargo.toml | 23 + .../rust-analyzer/crates/intern/src/lib.rs | 209 + .../rust-analyzer/crates/limit/Cargo.toml | 16 + .../rust-analyzer/crates/limit/src/lib.rs | 69 + .../crates/load-cargo/Cargo.toml | 32 + .../crates/load-cargo/src/lib.rs | 562 + src/tools/rust-analyzer/crates/mbe/Cargo.toml | 34 + .../rust-analyzer/crates/mbe/src/benchmark.rs | 247 + .../rust-analyzer/crates/mbe/src/expander.rs | 148 + .../crates/mbe/src/expander/matcher.rs | 987 ++ .../crates/mbe/src/expander/transcriber.rs | 586 + src/tools/rust-analyzer/crates/mbe/src/lib.rs | 349 + .../rust-analyzer/crates/mbe/src/parser.rs | 384 + .../crates/mbe/src/syntax_bridge.rs | 1003 ++ .../crates/mbe/src/syntax_bridge/tests.rs | 96 + .../crates/mbe/src/to_parser_input.rs | 111 + .../rust-analyzer/crates/mbe/src/tt_iter.rs | 207 + .../rust-analyzer/crates/parser/Cargo.toml | 31 + .../rust-analyzer/crates/parser/src/event.rs | 139 + .../crates/parser/src/grammar.rs | 428 + .../crates/parser/src/grammar/attributes.rs | 55 + .../crates/parser/src/grammar/expressions.rs | 752 + .../parser/src/grammar/expressions/atom.rs | 771 + .../crates/parser/src/grammar/generic_args.rs | 192 + .../parser/src/grammar/generic_params.rs | 263 + .../crates/parser/src/grammar/items.rs | 475 + .../crates/parser/src/grammar/items/adt.rs | 184 + .../crates/parser/src/grammar/items/consts.rs | 37 + .../crates/parser/src/grammar/items/traits.rs | 140 + .../parser/src/grammar/items/use_item.rs | 108 + .../crates/parser/src/grammar/params.rs | 221 + .../crates/parser/src/grammar/paths.rs | 154 + .../crates/parser/src/grammar/patterns.rs | 533 + .../crates/parser/src/grammar/types.rs | 369 + .../rust-analyzer/crates/parser/src/input.rs | 88 + .../crates/parser/src/lexed_str.rs | 401 + .../rust-analyzer/crates/parser/src/lib.rs | 197 + .../rust-analyzer/crates/parser/src/output.rs | 112 + .../rust-analyzer/crates/parser/src/parser.rs | 372 + .../crates/parser/src/shortcuts.rs | 285 + .../crates/parser/src/syntax_kind.rs | 29 + .../parser/src/syntax_kind/generated.rs | 503 + .../rust-analyzer/crates/parser/src/tests.rs | 170 + .../crates/parser/src/tests/prefix_entries.rs | 109 + .../src/tests/sourcegen_inline_tests.rs | 124 + .../crates/parser/src/tests/top_entries.rs | 312 + .../crates/parser/src/token_set.rs | 42 + .../lexer/err/byte_char_literals.rast | 86 + .../test_data/lexer/err/byte_char_literals.rs | 44 + .../test_data/lexer/err/byte_strings.rast | 28 + .../test_data/lexer/err/byte_strings.rs | 14 + .../parser/test_data/lexer/err/c_strings.rast | 28 + .../parser/test_data/lexer/err/c_strings.rs | 14 + .../test_data/lexer/err/char_literals.rast | 92 + .../test_data/lexer/err/char_literals.rs | 47 + .../test_data/lexer/err/empty_exponent.rast | 48 + .../test_data/lexer/err/empty_exponent.rs | 22 + .../test_data/lexer/err/empty_exponent.txt | 48 + .../parser/test_data/lexer/err/empty_int.rast | 26 + .../parser/test_data/lexer/err/empty_int.rs | 17 + .../parser/test_data/lexer/err/empty_int.txt | 26 + .../err/lifetime_starts_with_a_number.rast | 4 + .../err/lifetime_starts_with_a_number.rs | 2 + .../err/lifetime_starts_with_a_number.txt | 4 + .../parser/test_data/lexer/err/strings.rast | 28 + .../parser/test_data/lexer/err/strings.rs | 14 + .../err/unclosed_block_comment_at_eof.rast | 1 + .../err/unclosed_block_comment_at_eof.rs | 1 + .../err/unclosed_block_comment_at_eof.txt | 1 + .../unclosed_block_comment_with_content.rast | 1 + .../unclosed_block_comment_with_content.rs | 1 + .../unclosed_block_comment_with_content.txt | 1 + .../lexer/err/unclosed_byte_at_eof.rast | 1 + .../lexer/err/unclosed_byte_at_eof.rs | 1 + .../lexer/err/unclosed_byte_at_eof.txt | 1 + .../err/unclosed_byte_string_at_eof.rast | 1 + .../lexer/err/unclosed_byte_string_at_eof.rs | 1 + .../lexer/err/unclosed_byte_string_at_eof.txt | 1 + ...nclosed_byte_string_with_ascii_escape.rast | 1 + .../unclosed_byte_string_with_ascii_escape.rs | 1 + ...unclosed_byte_string_with_ascii_escape.txt | 1 + .../err/unclosed_byte_string_with_ferris.rast | 1 + .../err/unclosed_byte_string_with_ferris.rs | 1 + .../err/unclosed_byte_string_with_ferris.txt | 1 + .../err/unclosed_byte_string_with_slash.rast | 1 + .../err/unclosed_byte_string_with_slash.rs | 1 + .../err/unclosed_byte_string_with_slash.txt | 1 + ...d_byte_string_with_slash_double_quote.rast | 1 + ...sed_byte_string_with_slash_double_quote.rs | 1 + ...ed_byte_string_with_slash_double_quote.txt | 1 + .../unclosed_byte_string_with_slash_n.rast | 1 + .../err/unclosed_byte_string_with_slash_n.rs | 1 + .../err/unclosed_byte_string_with_slash_n.txt | 1 + .../err/unclosed_byte_string_with_space.rast | 1 + .../err/unclosed_byte_string_with_space.rs | 1 + .../err/unclosed_byte_string_with_space.txt | 1 + ...losed_byte_string_with_unicode_escape.rast | 1 + ...nclosed_byte_string_with_unicode_escape.rs | 1 + ...closed_byte_string_with_unicode_escape.txt | 1 + .../err/unclosed_byte_with_ascii_escape.rast | 1 + .../err/unclosed_byte_with_ascii_escape.rs | 1 + .../err/unclosed_byte_with_ascii_escape.txt | 1 + .../lexer/err/unclosed_byte_with_ferris.rast | 1 + .../lexer/err/unclosed_byte_with_ferris.rs | 1 + .../lexer/err/unclosed_byte_with_ferris.txt | 1 + .../lexer/err/unclosed_byte_with_slash.rast | 1 + .../lexer/err/unclosed_byte_with_slash.rs | 1 + .../lexer/err/unclosed_byte_with_slash.txt | 1 + .../lexer/err/unclosed_byte_with_slash_n.rast | 1 + .../lexer/err/unclosed_byte_with_slash_n.rs | 1 + .../lexer/err/unclosed_byte_with_slash_n.txt | 1 + ...unclosed_byte_with_slash_single_quote.rast | 1 + .../unclosed_byte_with_slash_single_quote.rs | 1 + .../unclosed_byte_with_slash_single_quote.txt | 1 + .../lexer/err/unclosed_byte_with_space.rast | 1 + .../lexer/err/unclosed_byte_with_space.rs | 1 + .../lexer/err/unclosed_byte_with_space.txt | 1 + .../unclosed_byte_with_unicode_escape.rast | 1 + .../err/unclosed_byte_with_unicode_escape.rs | 1 + .../err/unclosed_byte_with_unicode_escape.txt | 1 + .../lexer/err/unclosed_char_at_eof.rast | 1 + .../lexer/err/unclosed_char_at_eof.rs | 1 + .../lexer/err/unclosed_char_at_eof.txt | 1 + .../err/unclosed_char_with_ascii_escape.rast | 1 + .../err/unclosed_char_with_ascii_escape.rs | 1 + .../err/unclosed_char_with_ascii_escape.txt | 1 + .../lexer/err/unclosed_char_with_ferris.rast | 1 + .../lexer/err/unclosed_char_with_ferris.rs | 1 + .../lexer/err/unclosed_char_with_ferris.txt | 1 + .../lexer/err/unclosed_char_with_slash.rast | 1 + .../lexer/err/unclosed_char_with_slash.rs | 1 + .../lexer/err/unclosed_char_with_slash.txt | 1 + .../lexer/err/unclosed_char_with_slash_n.rast | 1 + .../lexer/err/unclosed_char_with_slash_n.rs | 1 + .../lexer/err/unclosed_char_with_slash_n.txt | 1 + ...unclosed_char_with_slash_single_quote.rast | 1 + .../unclosed_char_with_slash_single_quote.rs | 1 + .../unclosed_char_with_slash_single_quote.txt | 1 + .../lexer/err/unclosed_char_with_space.rast | 1 + .../lexer/err/unclosed_char_with_space.rs | 1 + .../lexer/err/unclosed_char_with_space.txt | 1 + .../unclosed_char_with_unicode_escape.rast | 1 + .../err/unclosed_char_with_unicode_escape.rs | 1 + .../err/unclosed_char_with_unicode_escape.txt | 1 + ...nclosed_nested_block_comment_entirely.rast | 1 + .../unclosed_nested_block_comment_entirely.rs | 1 + ...unclosed_nested_block_comment_entirely.txt | 1 + ...closed_nested_block_comment_partially.rast | 1 + ...unclosed_nested_block_comment_partially.rs | 1 + ...nclosed_nested_block_comment_partially.txt | 1 + .../err/unclosed_raw_byte_string_at_eof.rast | 1 + .../err/unclosed_raw_byte_string_at_eof.rs | 1 + .../err/unclosed_raw_byte_string_at_eof.txt | 1 + ...sed_raw_byte_string_with_ascii_escape.rast | 1 + ...losed_raw_byte_string_with_ascii_escape.rs | 1 + ...osed_raw_byte_string_with_ascii_escape.txt | 1 + .../unclosed_raw_byte_string_with_ferris.rast | 1 + .../unclosed_raw_byte_string_with_ferris.rs | 1 + .../unclosed_raw_byte_string_with_ferris.txt | 1 + .../unclosed_raw_byte_string_with_slash.rast | 1 + .../unclosed_raw_byte_string_with_slash.rs | 1 + .../unclosed_raw_byte_string_with_slash.txt | 1 + ...unclosed_raw_byte_string_with_slash_n.rast | 1 + .../unclosed_raw_byte_string_with_slash_n.rs | 1 + .../unclosed_raw_byte_string_with_slash_n.txt | 1 + .../unclosed_raw_byte_string_with_space.rast | 1 + .../unclosed_raw_byte_string_with_space.rs | 1 + .../unclosed_raw_byte_string_with_space.txt | 1 + ...d_raw_byte_string_with_unicode_escape.rast | 1 + ...sed_raw_byte_string_with_unicode_escape.rs | 1 + ...ed_raw_byte_string_with_unicode_escape.txt | 1 + .../lexer/err/unclosed_raw_string_at_eof.rast | 1 + .../lexer/err/unclosed_raw_string_at_eof.rs | 1 + .../lexer/err/unclosed_raw_string_at_eof.txt | 1 + ...unclosed_raw_string_with_ascii_escape.rast | 1 + .../unclosed_raw_string_with_ascii_escape.rs | 1 + .../unclosed_raw_string_with_ascii_escape.txt | 1 + .../err/unclosed_raw_string_with_ferris.rast | 1 + .../err/unclosed_raw_string_with_ferris.rs | 1 + .../err/unclosed_raw_string_with_ferris.txt | 1 + .../err/unclosed_raw_string_with_slash.rast | 1 + .../err/unclosed_raw_string_with_slash.rs | 1 + .../err/unclosed_raw_string_with_slash.txt | 1 + .../err/unclosed_raw_string_with_slash_n.rast | 1 + .../err/unclosed_raw_string_with_slash_n.rs | 1 + .../err/unclosed_raw_string_with_slash_n.txt | 1 + .../err/unclosed_raw_string_with_space.rast | 1 + .../err/unclosed_raw_string_with_space.rs | 1 + .../err/unclosed_raw_string_with_space.txt | 1 + ...closed_raw_string_with_unicode_escape.rast | 1 + ...unclosed_raw_string_with_unicode_escape.rs | 1 + ...nclosed_raw_string_with_unicode_escape.txt | 1 + .../lexer/err/unclosed_string_at_eof.rast | 1 + .../lexer/err/unclosed_string_at_eof.rs | 1 + .../lexer/err/unclosed_string_at_eof.txt | 1 + .../unclosed_string_with_ascii_escape.rast | 1 + .../err/unclosed_string_with_ascii_escape.rs | 1 + .../err/unclosed_string_with_ascii_escape.txt | 1 + .../err/unclosed_string_with_ferris.rast | 1 + .../lexer/err/unclosed_string_with_ferris.rs | 1 + .../lexer/err/unclosed_string_with_ferris.txt | 1 + .../lexer/err/unclosed_string_with_slash.rast | 1 + .../lexer/err/unclosed_string_with_slash.rs | 1 + .../lexer/err/unclosed_string_with_slash.txt | 1 + ...closed_string_with_slash_double_quote.rast | 1 + ...unclosed_string_with_slash_double_quote.rs | 1 + ...nclosed_string_with_slash_double_quote.txt | 1 + .../err/unclosed_string_with_slash_n.rast | 1 + .../lexer/err/unclosed_string_with_slash_n.rs | 1 + .../err/unclosed_string_with_slash_n.txt | 1 + .../lexer/err/unclosed_string_with_space.rast | 1 + .../lexer/err/unclosed_string_with_space.rs | 1 + .../lexer/err/unclosed_string_with_space.txt | 1 + .../unclosed_string_with_unicode_escape.rast | 1 + .../unclosed_string_with_unicode_escape.rs | 1 + .../unclosed_string_with_unicode_escape.txt | 1 + .../err/unstarted_raw_byte_string_at_eof.rast | 1 + .../err/unstarted_raw_byte_string_at_eof.rs | 1 + .../err/unstarted_raw_byte_string_at_eof.txt | 1 + .../unstarted_raw_byte_string_with_ascii.rast | 9 + .../unstarted_raw_byte_string_with_ascii.rs | 1 + .../unstarted_raw_byte_string_with_ascii.txt | 9 + .../err/unstarted_raw_string_at_eof.rast | 1 + .../lexer/err/unstarted_raw_string_at_eof.rs | 1 + .../lexer/err/unstarted_raw_string_at_eof.txt | 1 + .../err/unstarted_raw_string_with_ascii.rast | 9 + .../err/unstarted_raw_string_with_ascii.rs | 1 + .../err/unstarted_raw_string_with_ascii.txt | 9 + .../test_data/lexer/ok/block_comment.rast | 6 + .../test_data/lexer/ok/block_comment.rs | 3 + .../test_data/lexer/ok/block_comment.txt | 6 + .../test_data/lexer/ok/byte_strings.rast | 16 + .../parser/test_data/lexer/ok/byte_strings.rs | 3 + .../test_data/lexer/ok/byte_strings.txt | 22 + .../parser/test_data/lexer/ok/chars.rast | 14 + .../crates/parser/test_data/lexer/ok/chars.rs | 1 + .../parser/test_data/lexer/ok/chars.txt | 16 + .../parser/test_data/lexer/ok/hello.rast | 3 + .../crates/parser/test_data/lexer/ok/hello.rs | 1 + .../parser/test_data/lexer/ok/hello.txt | 3 + .../parser/test_data/lexer/ok/ident.rast | 14 + .../crates/parser/test_data/lexer/ok/ident.rs | 1 + .../parser/test_data/lexer/ok/ident.txt | 14 + .../parser/test_data/lexer/ok/keywords.rast | 64 + .../parser/test_data/lexer/ok/keywords.rs | 3 + .../parser/test_data/lexer/ok/keywords.txt | 64 + .../parser/test_data/lexer/ok/lifetimes.rast | 8 + .../parser/test_data/lexer/ok/lifetimes.rs | 1 + .../parser/test_data/lexer/ok/lifetimes.txt | 8 + .../parser/test_data/lexer/ok/numbers.rast | 57 + .../parser/test_data/lexer/ok/numbers.rs | 9 + .../parser/test_data/lexer/ok/numbers.txt | 57 + .../parser/test_data/lexer/ok/raw_ident.rast | 2 + .../parser/test_data/lexer/ok/raw_ident.rs | 1 + .../parser/test_data/lexer/ok/raw_ident.txt | 2 + .../test_data/lexer/ok/raw_strings.rast | 2 + .../parser/test_data/lexer/ok/raw_strings.rs | 1 + .../parser/test_data/lexer/ok/raw_strings.txt | 2 + .../lexer/ok/single_line_comments.rast | 22 + .../lexer/ok/single_line_comments.rs | 12 + .../lexer/ok/single_line_comments.txt | 22 + .../parser/test_data/lexer/ok/strings.rast | 8 + .../parser/test_data/lexer/ok/strings.rs | 2 + .../parser/test_data/lexer/ok/strings.txt | 8 + .../parser/test_data/lexer/ok/symbols.rast | 77 + .../parser/test_data/lexer/ok/symbols.rs | 6 + .../parser/test_data/lexer/ok/symbols.txt | 77 + .../parser/test_data/lexer/ok/whitespace.rast | 12 + .../parser/test_data/lexer/ok/whitespace.rs | 4 + .../parser/test_data/lexer/ok/whitespace.txt | 12 + .../err/0000_struct_field_missing_comma.rast | 34 + .../err/0000_struct_field_missing_comma.rs | 4 + .../err/0001_item_recovery_in_file.rast | 18 + .../parser/err/0001_item_recovery_in_file.rs | 3 + .../parser/err/0002_duplicate_shebang.rast | 45 + .../parser/err/0002_duplicate_shebang.rs | 2 + .../parser/err/0003_C++_semicolon.rast | 39 + .../parser/err/0003_C++_semicolon.rs | 4 + .../parser/err/0004_use_path_bad_segment.rast | 15 + .../parser/err/0004_use_path_bad_segment.rs | 1 + .../parser/err/0005_attribute_recover.rast | 62 + .../parser/err/0005_attribute_recover.rs | 8 + .../parser/err/0006_named_field_recovery.rast | 74 + .../parser/err/0006_named_field_recovery.rs | 7 + .../parser/err/0007_stray_curly_in_file.rast | 33 + .../parser/err/0007_stray_curly_in_file.rs | 9 + .../parser/err/0008_item_block_recovery.rast | 80 + .../parser/err/0008_item_block_recovery.rs | 13 + .../0009_broken_struct_type_parameter.rast | 55 + .../err/0009_broken_struct_type_parameter.rs | 5 + .../parser/err/0010_unsafe_lambda_block.rast | 45 + .../parser/err/0010_unsafe_lambda_block.rs | 3 + .../parser/err/0011_extern_struct.rast | 13 + .../parser/err/0011_extern_struct.rs | 1 + .../parser/err/0012_broken_lambda.rast | 387 + .../parser/err/0013_invalid_type.rast | 83 + .../test_data/parser/err/0013_invalid_type.rs | 7 + .../parser/err/0014_where_no_bounds.rast | 32 + .../parser/err/0014_where_no_bounds.rs | 1 + .../parser/err/0015_curly_in_params.rast | 24 + .../parser/err/0015_curly_in_params.rs | 2 + .../parser/err/0016_missing_semi.rast | 44 + .../test_data/parser/err/0016_missing_semi.rs | 6 + .../parser/err/0017_incomplete_binexpr.rast | 47 + .../parser/err/0017_incomplete_binexpr.rs | 4 + .../parser/err/0018_incomplete_fn.rast | 134 + .../parser/err/0018_incomplete_fn.rs | 8 + .../parser/err/0019_let_recover.rast | 107 + .../test_data/parser/err/0019_let_recover.rs | 12 + .../test_data/parser/err/0020_fn_recover.rast | 21 + .../test_data/parser/err/0020_fn_recover.rs | 3 + .../parser/err/0021_incomplete_param.rast | 34 + .../parser/err/0021_incomplete_param.rs | 2 + .../test_data/parser/err/0022_bad_exprs.rast | 173 + .../test_data/parser/err/0022_bad_exprs.rs | 3 + .../parser/err/0023_mismatched_paren.rast | 45 + .../parser/err/0023_mismatched_paren.rs | 5 + .../parser/err/0024_many_type_parens.rast | 312 + .../parser/err/0024_many_type_parens.rs | 7 + .../test_data/parser/err/0025_nope.rast | 206 + .../parser/test_data/parser/err/0025_nope.rs | 32 + .../parser/err/0026_imp_recovery.rast | 49 + .../test_data/parser/err/0026_imp_recovery.rs | 2 + .../parser/err/0027_incomplete_where_for.rast | 29 + .../parser/err/0027_incomplete_where_for.rs | 3 + .../parser/err/0029_field_completion.rast | 36 + .../parser/err/0029_field_completion.rs | 3 + .../err/0032_match_arms_inner_attrs.rast | 205 + .../parser/err/0032_match_arms_inner_attrs.rs | 20 + .../err/0033_match_arms_outer_attrs.rast | 68 + .../parser/err/0033_match_arms_outer_attrs.rs | 7 + .../parser/err/0034_bad_box_pattern.rast | 96 + .../parser/err/0034_bad_box_pattern.rs | 6 + .../parser/err/0035_use_recover.rast | 55 + .../test_data/parser/err/0035_use_recover.rs | 5 + .../parser/err/0036_partial_use.rast | 40 + .../test_data/parser/err/0036_partial_use.rs | 2 + .../parser/err/0039_lambda_recovery.rast | 83 + .../parser/err/0039_lambda_recovery.rs | 5 + .../parser/err/0042_weird_blocks.rast | 75 + .../test_data/parser/err/0042_weird_blocks.rs | 6 + .../parser/err/0043_unexpected_for_type.rast | 256 + .../parser/err/0043_unexpected_for_type.rs | 9 + .../parser/err/0044_item_modifiers.rast | 48 + .../parser/err/0044_item_modifiers.rs | 2 + .../err/0047_repeated_extern_modifier.rast | 15 + .../err/0047_repeated_extern_modifier.rs | 1 + .../parser/err/0048_double_fish.rast | 122 + .../test_data/parser/err/0048_double_fish.rs | 7 + .../0049_let_else_right_curly_brace_for.rast | 58 + .../0049_let_else_right_curly_brace_for.rs | 6 + .../0050_let_else_right_curly_brace_loop.rast | 46 + .../0050_let_else_right_curly_brace_loop.rs | 6 + ...0051_let_else_right_curly_brace_match.rast | 85 + .../0051_let_else_right_curly_brace_match.rs | 8 + ...0052_let_else_right_curly_brace_while.rast | 49 + .../0052_let_else_right_curly_brace_while.rs | 6 + .../0053_let_else_right_curly_brace_if.rast | 57 + .../err/0053_let_else_right_curly_brace_if.rs | 7 + .../0054_float_split_scientific_notation.rast | 88 + .../0054_float_split_scientific_notation.rs | 5 + .../err/0001_array_type_missing_semi.rast | 27 + .../err/0001_array_type_missing_semi.rs | 1 + .../inline/err/0002_misplaced_label_err.rast | 28 + .../inline/err/0002_misplaced_label_err.rs | 3 + .../err/0003_pointer_type_no_mutability.rast | 17 + .../err/0003_pointer_type_no_mutability.rs | 1 + .../parser/inline/err/0004_impl_type.rast | 79 + .../parser/inline/err/0004_impl_type.rs | 4 + .../err/0005_fn_pointer_type_missing_fn.rast | 23 + .../err/0005_fn_pointer_type_missing_fn.rs | 1 + .../inline/err/0006_unsafe_block_in_mod.rast | 37 + .../inline/err/0006_unsafe_block_in_mod.rs | 1 + .../err/0007_async_without_semicolon.rast | 32 + .../err/0007_async_without_semicolon.rs | 1 + .../parser/inline/err/0008_pub_expr.rast | 26 + .../parser/inline/err/0008_pub_expr.rs | 1 + .../inline/err/0013_anonymous_static.rast | 21 + .../inline/err/0013_anonymous_static.rs | 1 + ...cord_literal_before_ellipsis_recovery.rast | 49 + ...record_literal_before_ellipsis_recovery.rs | 3 + ...ord_literal_missing_ellipsis_recovery.rast | 43 + ...ecord_literal_missing_ellipsis_recovery.rs | 3 + .../inline/err/0014_struct_field_recover.rast | 31 + .../inline/err/0014_struct_field_recover.rs | 1 + .../inline/err/0015_arg_list_recovery.rast | 105 + .../inline/err/0015_arg_list_recovery.rs | 6 + .../parser/inline/err/0015_empty_segment.rast | 14 + .../parser/inline/err/0015_empty_segment.rs | 1 + .../err/0015_missing_fn_param_type.rast | 53 + .../inline/err/0015_missing_fn_param_type.rs | 1 + .../err/0016_angled_path_without_qual.rast | 49 + .../err/0016_angled_path_without_qual.rs | 2 + .../err/0017_let_else_right_curly_brace.rast | 69 + .../err/0017_let_else_right_curly_brace.rs | 1 + .../0018_crate_visibility_empty_recover.rast | 18 + .../0018_crate_visibility_empty_recover.rs | 1 + .../err/0019_tuple_expr_leading_comma.rast | 24 + .../err/0019_tuple_expr_leading_comma.rs | 3 + .../err/0020_tuple_pat_leading_comma.rast | 26 + .../err/0020_tuple_pat_leading_comma.rs | 3 + ...cover_from_missing_assoc_item_binding.rast | 48 + ...recover_from_missing_assoc_item_binding.rs | 1 + ...22_recover_from_missing_const_default.rast | 46 + ...0022_recover_from_missing_const_default.rs | 1 + .../inline/err/0023_empty_param_slot.rast | 41 + .../inline/err/0023_empty_param_slot.rs | 1 + ..._comma_after_functional_update_syntax.rast | 66 + ...24_comma_after_functional_update_syntax.rs | 4 + .../parser/inline/err/0024_top_level_let.rast | 30 + .../parser/inline/err/0024_top_level_let.rs | 1 + .../err/0026_macro_rules_as_macro_name.rast | 39 + .../err/0026_macro_rules_as_macro_name.rs | 3 + .../err/0026_use_tree_list_err_recovery.rast | 71 + .../err/0026_use_tree_list_err_recovery.rs | 5 + ...028_method_call_missing_argument_list.rast | 56 + .../0028_method_call_missing_argument_list.rs | 4 + .../err/0029_tuple_field_list_recovery.rast | 44 + .../err/0029_tuple_field_list_recovery.rs | 2 + .../err/0030_generic_arg_list_recover.rast | 33 + .../err/0030_generic_arg_list_recover.rs | 1 + .../err/0031_generic_param_list_recover.rast | 45 + .../err/0031_generic_param_list_recover.rs | 1 + ...0032_record_literal_field_eq_recovery.rast | 41 + .../0032_record_literal_field_eq_recovery.rs | 3 + .../0033_record_pat_field_eq_recovery.rast | 43 + .../err/0033_record_pat_field_eq_recovery.rs | 3 + .../inline/err/0034_match_arms_recovery.rast | 113 + .../inline/err/0034_match_arms_recovery.rs | 11 + .../parser/inline/ok/0002_use_tree_list.rast | 29 + .../parser/inline/ok/0002_use_tree_list.rs | 1 + .../parser/inline/ok/0003_where_pred_for.rast | 63 + .../parser/inline/ok/0003_where_pred_for.rs | 4 + .../ok/0004_value_parameters_no_patterns.rast | 60 + .../ok/0004_value_parameters_no_patterns.rs | 1 + .../inline/ok/0005_function_type_params.rast | 38 + .../inline/ok/0005_function_type_params.rs | 1 + .../parser/inline/ok/0006_self_param.rast | 128 + .../parser/inline/ok/0006_self_param.rs | 7 + .../inline/ok/0007_type_param_bounds.rast | 53 + .../inline/ok/0007_type_param_bounds.rs | 1 + .../parser/inline/ok/0008_path_part.rast | 98 + .../parser/inline/ok/0008_path_part.rs | 6 + .../parser/inline/ok/0009_loop_expr.rast | 26 + .../parser/inline/ok/0009_loop_expr.rs | 3 + .../parser/inline/ok/0010_extern_block.rast | 21 + .../parser/inline/ok/0010_extern_block.rs | 2 + .../parser/inline/ok/0011_field_expr.rast | 93 + .../parser/inline/ok/0011_field_expr.rs | 7 + .../ok/0012_type_item_where_clause.rast | 33 + .../inline/ok/0012_type_item_where_clause.rs | 1 + .../inline/ok/0013_pointer_type_mut.rast | 35 + .../parser/inline/ok/0013_pointer_type_mut.rs | 2 + .../parser/inline/ok/0014_never_type.rast | 13 + .../parser/inline/ok/0014_never_type.rs | 1 + .../parser/inline/ok/0015_continue_expr.rast | 38 + .../parser/inline/ok/0015_continue_expr.rs | 6 + .../parser/inline/ok/0017_array_type.rast | 22 + .../parser/inline/ok/0017_array_type.rs | 1 + .../parser/inline/ok/0018_arb_self_types.rast | 76 + .../parser/inline/ok/0018_arb_self_types.rs | 4 + .../parser/inline/ok/0019_unary_expr.rast | 45 + .../parser/inline/ok/0019_unary_expr.rs | 5 + .../inline/ok/0021_assoc_item_list.rast | 81 + .../parser/inline/ok/0021_assoc_item_list.rs | 6 + .../inline/ok/0022_crate_visibility.rast | 49 + .../parser/inline/ok/0022_crate_visibility.rs | 3 + .../inline/ok/0023_placeholder_type.rast | 13 + .../parser/inline/ok/0023_placeholder_type.rs | 1 + .../parser/inline/ok/0024_slice_pat.rast | 65 + .../parser/inline/ok/0024_slice_pat.rs | 4 + .../parser/inline/ok/0025_slice_type.rast | 17 + .../parser/inline/ok/0025_slice_type.rs | 1 + .../inline/ok/0026_tuple_pat_fields.rast | 128 + .../parser/inline/ok/0026_tuple_pat_fields.rs | 7 + .../parser/inline/ok/0027_ref_pat.rast | 50 + .../parser/inline/ok/0027_ref_pat.rs | 4 + .../inline/ok/0028_impl_trait_type.rast | 45 + .../parser/inline/ok/0028_impl_trait_type.rs | 1 + .../parser/inline/ok/0029_cast_expr.rast | 90 + .../parser/inline/ok/0029_cast_expr.rs | 6 + .../parser/inline/ok/0030_let_expr.rast | 90 + .../parser/inline/ok/0030_let_expr.rs | 4 + .../parser/inline/ok/0031_while_expr.rast | 87 + .../parser/inline/ok/0031_while_expr.rs | 5 + .../inline/ok/0032_fn_pointer_type.rast | 98 + .../parser/inline/ok/0032_fn_pointer_type.rs | 4 + .../inline/ok/0033_reference_type;.rast | 51 + .../parser/inline/ok/0033_reference_type;.rs | 3 + .../parser/inline/ok/0034_break_expr.rast | 57 + .../parser/inline/ok/0034_break_expr.rs | 8 + .../parser/inline/ok/0037_qual_paths.rast | 79 + .../parser/inline/ok/0037_qual_paths.rs | 2 + .../inline/ok/0038_full_range_expr.rast | 29 + .../parser/inline/ok/0038_full_range_expr.rs | 1 + .../parser/inline/ok/0041_trait_item.rast | 31 + .../parser/inline/ok/0041_trait_item.rs | 1 + .../parser/inline/ok/0042_call_expr.rast | 148 + .../parser/inline/ok/0042_call_expr.rs | 6 + .../parser/inline/ok/0044_block_items.rast | 30 + .../parser/inline/ok/0044_block_items.rs | 1 + .../ok/0045_param_list_opt_patterns.rast | 48 + .../inline/ok/0045_param_list_opt_patterns.rs | 1 + .../inline/ok/0046_singleton_tuple_type.rast | 20 + .../inline/ok/0046_singleton_tuple_type.rs | 1 + .../inline/ok/0048_path_type_with_bounds.rast | 85 + .../inline/ok/0048_path_type_with_bounds.rs | 2 + .../parser/inline/ok/0050_fn_decl.rast | 22 + .../parser/inline/ok/0050_fn_decl.rs | 1 + .../parser/inline/ok/0051_unit_type.rast | 14 + .../parser/inline/ok/0051_unit_type.rs | 1 + .../parser/inline/ok/0052_path_type.rast | 72 + .../parser/inline/ok/0052_path_type.rs | 4 + .../parser/inline/ok/0053_path_expr.rast | 97 + .../parser/inline/ok/0053_path_expr.rs | 6 + .../inline/ok/0054_record_field_attrs.rast | 33 + .../inline/ok/0054_record_field_attrs.rs | 1 + .../inline/ok/0055_literal_pattern.rast | 77 + .../parser/inline/ok/0055_literal_pattern.rs | 8 + .../parser/inline/ok/0056_where_clause.rast | 117 + .../parser/inline/ok/0056_where_clause.rs | 7 + .../parser/inline/ok/0058_range_pat.rast | 473 + .../parser/inline/ok/0058_range_pat.rs | 33 + .../inline/ok/0059_match_arms_commas.rast | 60 + .../inline/ok/0059_match_arms_commas.rs | 7 + .../parser/inline/ok/0060_extern_crate.rast | 10 + .../parser/inline/ok/0060_extern_crate.rs | 1 + .../parser/inline/ok/0061_record_lit.rast | 174 + .../parser/inline/ok/0061_record_lit.rs | 8 + .../parser/inline/ok/0062_mod_contents.rast | 65 + .../parser/inline/ok/0062_mod_contents.rs | 5 + .../parser/inline/ok/0063_impl_item_neg.rast | 23 + .../parser/inline/ok/0063_impl_item_neg.rs | 1 + .../parser/inline/ok/0064_if_expr.rast | 126 + .../parser/inline/ok/0064_if_expr.rs | 7 + .../parser/inline/ok/0065_dyn_trait_type.rast | 45 + .../parser/inline/ok/0065_dyn_trait_type.rs | 1 + .../parser/inline/ok/0066_match_arm.rast | 152 + .../parser/inline/ok/0066_match_arm.rs | 9 + .../parser/inline/ok/0067_crate_path.rast | 16 + .../parser/inline/ok/0067_crate_path.rs | 1 + .../ok/0070_stmt_bin_expr_ambiguity.rast | 53 + .../inline/ok/0070_stmt_bin_expr_ambiguity.rs | 4 + .../parser/inline/ok/0071_match_expr.rast | 96 + .../parser/inline/ok/0071_match_expr.rs | 6 + .../parser/inline/ok/0072_return_expr.rast | 29 + .../parser/inline/ok/0072_return_expr.rs | 4 + .../inline/ok/0073_type_item_type_params.rast | 20 + .../inline/ok/0073_type_item_type_params.rs | 1 + .../ok/0074_stmt_postfix_expr_ambiguity.rast | 63 + .../ok/0074_stmt_postfix_expr_ambiguity.rs | 7 + .../parser/inline/ok/0075_block.rast | 90 + .../test_data/parser/inline/ok/0075_block.rs | 4 + .../inline/ok/0076_function_where_clause.rast | 40 + .../inline/ok/0076_function_where_clause.rs | 1 + .../parser/inline/ok/0077_try_expr.rast | 26 + .../parser/inline/ok/0077_try_expr.rs | 3 + .../parser/inline/ok/0078_type_alias.rast | 16 + .../parser/inline/ok/0078_type_alias.rs | 1 + .../parser/inline/ok/0079_impl_item.rast | 14 + .../parser/inline/ok/0079_impl_item.rs | 1 + .../parser/inline/ok/0080_postfix_range.rast | 96 + .../parser/inline/ok/0080_postfix_range.rs | 5 + .../parser/inline/ok/0081_for_type.rast | 117 + .../parser/inline/ok/0081_for_type.rs | 3 + .../parser/inline/ok/0082_ref_expr.rast | 139 + .../parser/inline/ok/0082_ref_expr.rs | 10 + .../parser/inline/ok/0083_struct_items.rast | 87 + .../parser/inline/ok/0084_paren_type.rast | 19 + .../parser/inline/ok/0084_paren_type.rs | 1 + .../parser/inline/ok/0085_expr_literals.rast | 160 + .../parser/inline/ok/0085_expr_literals.rs | 14 + .../inline/ok/0086_function_ret_type.rast | 36 + .../inline/ok/0086_function_ret_type.rs | 2 + .../inline/ok/0088_break_ambiguity.rast | 67 + .../parser/inline/ok/0088_break_ambiguity.rs | 6 + .../inline/ok/0090_type_param_default.rast | 22 + .../inline/ok/0090_type_param_default.rs | 1 + .../ok/0092_fn_pointer_type_with_ret.rast | 23 + .../ok/0092_fn_pointer_type_with_ret.rs | 1 + .../parser/inline/ok/0093_index_expr.rast | 34 + .../parser/inline/ok/0093_index_expr.rs | 3 + .../inline/ok/0095_placeholder_pat.rast | 29 + .../parser/inline/ok/0095_placeholder_pat.rs | 1 + .../inline/ok/0096_no_semi_after_block.rast | 125 + .../inline/ok/0096_no_semi_after_block.rs | 13 + .../parser/inline/ok/0099_param_list.rast | 103 + .../parser/inline/ok/0099_param_list.rs | 4 + .../parser/inline/ok/0100_for_expr.rast | 36 + .../parser/inline/ok/0100_for_expr.rs | 3 + .../inline/ok/0102_record_pat_field_list.rast | 175 + .../inline/ok/0102_record_pat_field_list.rs | 7 + .../parser/inline/ok/0103_array_expr.rast | 55 + .../parser/inline/ok/0103_array_expr.rs | 6 + .../inline/ok/0104_path_fn_trait_args.rast | 41 + .../inline/ok/0104_path_fn_trait_args.rs | 1 + .../parser/inline/ok/0106_lambda_expr.rast | 246 + .../parser/inline/ok/0106_lambda_expr.rs | 15 + .../inline/ok/0107_method_call_expr.rast | 106 + .../parser/inline/ok/0107_method_call_expr.rs | 6 + .../parser/inline/ok/0108_tuple_expr.rast | 39 + .../parser/inline/ok/0108_tuple_expr.rs | 5 + .../parser/inline/ok/0109_label.rast | 70 + .../test_data/parser/inline/ok/0109_label.rs | 5 + .../parser/inline/ok/0111_tuple_pat.rast | 130 + .../parser/inline/ok/0111_tuple_pat.rs | 7 + .../parser/inline/ok/0112_bind_pat.rast | 128 + .../parser/inline/ok/0112_bind_pat.rs | 8 + .../parser/inline/ok/0113_nocontentexpr.rast | 57 + .../parser/inline/ok/0113_nocontentexpr.rs | 3 + .../inline/ok/0114_tuple_struct_where.rast | 42 + .../inline/ok/0114_tuple_struct_where.rs | 1 + .../inline/ok/0115_tuple_field_attrs.rast | 28 + .../inline/ok/0115_tuple_field_attrs.rs | 1 + .../inline/ok/0117_macro_call_type.rast | 46 + .../parser/inline/ok/0117_macro_call_type.rs | 2 + .../parser/inline/ok/0118_match_guard.rast | 77 + .../parser/inline/ok/0118_match_guard.rs | 6 + .../ok/0120_match_arms_inner_attribute.rast | 84 + .../ok/0120_match_arms_inner_attribute.rs | 8 + .../ok/0121_match_arms_outer_attributes.rast | 151 + .../ok/0121_match_arms_outer_attributes.rs | 12 + .../inline/ok/0123_param_list_vararg.rast | 62 + .../inline/ok/0123_param_list_vararg.rs | 1 + .../0125_record_literal_field_with_attr.rast | 49 + .../ok/0125_record_literal_field_with_attr.rs | 3 + .../inline/ok/0126_attr_on_expr_stmt.rast | 105 + .../inline/ok/0126_attr_on_expr_stmt.rs | 6 + .../parser/inline/ok/0129_marco_pat.rast | 37 + .../parser/inline/ok/0129_marco_pat.rs | 3 + .../parser/inline/ok/0130_let_stmt.rast | 36 + .../parser/inline/ok/0130_let_stmt.rs | 1 + .../parser/inline/ok/0130_try_block_expr.rast | 32 + .../parser/inline/ok/0130_try_block_expr.rs | 3 + .../inline/ok/0131_existential_type.rast | 31 + .../parser/inline/ok/0131_existential_type.rs | 1 + .../ok/0134_nocontentexpr_after_item.rast | 64 + .../ok/0134_nocontentexpr_after_item.rs | 8 + .../parser/inline/ok/0137_await_expr.rast | 105 + .../parser/inline/ok/0137_await_expr.rs | 7 + .../ok/0138_associated_type_bounds.rast | 111 + .../inline/ok/0138_associated_type_bounds.rs | 1 + .../ok/0138_expression_after_block.rast | 66 + .../inline/ok/0138_expression_after_block.rs | 4 + .../inline/ok/0138_self_param_outer_attr.rast | 28 + .../inline/ok/0138_self_param_outer_attr.rs | 1 + .../inline/ok/0139_param_outer_arg.rast | 36 + .../parser/inline/ok/0139_param_outer_arg.rs | 1 + .../parser/inline/ok/0142_for_range_from.rast | 42 + .../parser/inline/ok/0142_for_range_from.rs | 5 + .../parser/inline/ok/0143_box_pat.rast | 111 + .../parser/inline/ok/0143_box_pat.rs | 5 + .../parser/inline/ok/0144_dot_dot_pat.rast | 456 + .../parser/inline/ok/0144_dot_dot_pat.rs | 25 + .../inline/ok/0145_record_pat_field.rast | 123 + .../parser/inline/ok/0145_record_pat_field.rs | 5 + .../parser/inline/ok/0146_as_precedence.rast | 43 + .../parser/inline/ok/0146_as_precedence.rs | 1 + .../parser/inline/ok/0147_const_param.rast | 23 + .../parser/inline/ok/0147_const_param.rs | 1 + .../parser/inline/ok/0147_macro_def.rast | 19 + .../parser/inline/ok/0147_macro_def.rs | 1 + .../parser/inline/ok/0150_array_attrs.rast | 48 + .../parser/inline/ok/0150_array_attrs.rs | 1 + .../inline/ok/0150_impl_type_params.rast | 38 + .../parser/inline/ok/0150_impl_type_params.rs | 1 + .../test_data/parser/inline/ok/0151_fn.rast | 15 + .../test_data/parser/inline/ok/0151_fn.rs | 1 + .../parser/inline/ok/0151_trait_alias.rast | 33 + .../parser/inline/ok/0151_trait_alias.rs | 1 + .../parser/inline/ok/0152_arg_with_attr.rast | 38 + .../parser/inline/ok/0152_arg_with_attr.rs | 3 + .../inline/ok/0153_pub_parens_typepath.rast | 56 + .../inline/ok/0153_pub_parens_typepath.rs | 2 + .../ok/0154_fn_pointer_param_ident_path.rast | 58 + .../ok/0154_fn_pointer_param_ident_path.rs | 2 + .../ok/0154_no_dyn_trait_leading_for.rast | 43 + .../ok/0154_no_dyn_trait_leading_for.rs | 1 + .../parser/inline/ok/0154_tuple_attrs.rast | 51 + .../parser/inline/ok/0154_tuple_attrs.rs | 1 + .../parser/inline/ok/0155_closure_params.rast | 70 + .../parser/inline/ok/0155_closure_params.rs | 3 + .../inline/ok/0156_const_block_pat.rast | 199 + .../parser/inline/ok/0156_const_block_pat.rs | 12 + .../parser/inline/ok/0156_fn_def_param.rast | 48 + .../parser/inline/ok/0156_fn_def_param.rs | 1 + .../parser/inline/ok/0156_or_pattern.rast | 112 + .../parser/inline/ok/0156_or_pattern.rs | 8 + .../ok/0157_fn_pointer_unnamed_arg.rast | 26 + .../inline/ok/0157_fn_pointer_unnamed_arg.rs | 1 + .../inline/ok/0157_variant_discriminant.rast | 30 + .../inline/ok/0157_variant_discriminant.rs | 1 + .../ok/0158_binop_resets_statementness.rast | 38 + .../ok/0158_binop_resets_statementness.rs | 1 + .../inline/ok/0158_lambda_ret_block.rast | 45 + .../parser/inline/ok/0158_lambda_ret_block.rs | 1 + .../inline/ok/0158_macro_rules_non_brace.rast | 57 + .../inline/ok/0158_macro_rules_non_brace.rs | 2 + .../inline/ok/0159_try_macro_fallback.rast | 36 + .../inline/ok/0159_try_macro_fallback.rs | 1 + .../parser/inline/ok/0159_yield_expr.rast | 29 + .../parser/inline/ok/0159_yield_expr.rs | 4 + .../inline/ok/0160_crate_visibility_in.rast | 42 + .../inline/ok/0160_crate_visibility_in.rs | 2 + .../inline/ok/0160_try_macro_rules.rast | 24 + .../parser/inline/ok/0160_try_macro_rules.rs | 1 + .../inline/ok/0161_impl_item_const.rast | 24 + .../parser/inline/ok/0161_impl_item_const.rs | 1 + .../parser/inline/ok/0161_labeled_block.rast | 28 + .../parser/inline/ok/0161_labeled_block.rs | 1 + .../ok/0162_default_async_unsafe_fn.rast | 43 + .../inline/ok/0162_default_async_unsafe_fn.rs | 3 + .../inline/ok/0163_default_async_fn.rast | 41 + .../parser/inline/ok/0163_default_async_fn.rs | 3 + .../inline/ok/0163_default_unsafe_item.rast | 45 + .../inline/ok/0163_default_unsafe_item.rs | 3 + .../parser/inline/ok/0164_default_item.rast | 24 + .../parser/inline/ok/0164_default_item.rs | 1 + .../inline/ok/0164_type_path_in_pattern.rast | 39 + .../inline/ok/0164_type_path_in_pattern.rs | 1 + .../inline/ok/0166_half_open_range_pat.rast | 94 + .../inline/ok/0166_half_open_range_pat.rs | 9 + .../inline/ok/0168_extern_crate_rename.rast | 16 + .../inline/ok/0168_extern_crate_rename.rs | 1 + .../inline/ok/0168_extern_crate_self.rast | 10 + .../inline/ok/0168_extern_crate_self.rs | 1 + .../parser/inline/ok/0169_mod_item.rast | 8 + .../parser/inline/ok/0169_mod_item.rs | 1 + .../parser/inline/ok/0170_mod_item_curly.rast | 12 + .../parser/inline/ok/0170_mod_item_curly.rs | 1 + .../parser/inline/ok/0170_tuple_struct.rast | 25 + .../parser/inline/ok/0170_tuple_struct.rs | 1 + .../parser/inline/ok/0171_struct_item.rast | 11 + .../parser/inline/ok/0171_struct_item.rs | 1 + .../parser/inline/ok/0172_const_item.rast | 20 + .../parser/inline/ok/0172_const_item.rs | 1 + .../inline/ok/0172_record_field_list.rast | 35 + .../inline/ok/0172_record_field_list.rs | 1 + .../inline/ok/0173_anonymous_const.rast | 19 + .../parser/inline/ok/0173_anonymous_const.rs | 1 + .../inline/ok/0173_macro_def_curly.rast | 27 + .../parser/inline/ok/0173_macro_def_curly.rs | 1 + .../parser/inline/ok/0173_union_item.rast | 35 + .../parser/inline/ok/0173_union_item.rs | 1 + .../ok/0174_trait_item_generic_params.rast | 35 + .../ok/0174_trait_item_generic_params.rs | 1 + .../parser/inline/ok/0174_unit_struct.rast | 8 + .../parser/inline/ok/0174_unit_struct.rs | 1 + .../parser/inline/ok/0174_use_tree_star.rast | 24 + .../parser/inline/ok/0174_use_tree_star.rs | 2 + .../inline/ok/0175_trait_item_bounds.rast | 29 + .../inline/ok/0175_trait_item_bounds.rs | 1 + .../ok/0176_trait_item_where_clause.rast | 30 + .../inline/ok/0176_trait_item_where_clause.rs | 1 + .../parser/inline/ok/0176_use_tree_alias.rast | 32 + .../parser/inline/ok/0176_use_tree_alias.rs | 2 + .../ok/0177_assoc_item_list_inner_attrs.rast | 26 + .../ok/0177_assoc_item_list_inner_attrs.rs | 1 + .../ok/0177_trait_alias_where_clause.rast | 96 + .../ok/0177_trait_alias_where_clause.rs | 2 + .../parser/inline/ok/0177_use_tree.rast | 30 + .../parser/inline/ok/0177_use_tree.rs | 1 + .../parser/inline/ok/0177_use_tree_path.rast | 72 + .../parser/inline/ok/0177_use_tree_path.rs | 6 + .../ok/0178_use_tree_path_use_tree.rast | 20 + .../inline/ok/0178_use_tree_path_use_tree.rs | 1 + .../inline/ok/0179_use_tree_abs_star.rast | 26 + .../inline/ok/0179_use_tree_abs_star.rs | 2 + .../inline/ok/0180_use_tree_path_star.rast | 13 + .../inline/ok/0180_use_tree_path_star.rs | 1 + .../ok/0181_generic_param_attribute.rast | 46 + .../inline/ok/0181_generic_param_attribute.rs | 1 + .../parser/inline/ok/0181_use_item.rast | 16 + .../parser/inline/ok/0181_use_item.rs | 1 + .../parser/inline/ok/0182_lifetime_param.rast | 25 + .../parser/inline/ok/0182_lifetime_param.rs | 1 + .../inline/ok/0183_const_arg_block.rast | 32 + .../parser/inline/ok/0183_const_arg_block.rs | 1 + .../parser/inline/ok/0183_type_param.rast | 30 + .../parser/inline/ok/0183_type_param.rs | 1 + .../parser/inline/ok/0184_const_arg.rast | 22 + .../parser/inline/ok/0184_const_arg.rs | 1 + .../inline/ok/0184_generic_param_list.rast | 30 + .../inline/ok/0184_generic_param_list.rs | 1 + .../inline/ok/0185_assoc_type_bound.rast | 37 + .../parser/inline/ok/0185_assoc_type_bound.rs | 1 + .../parser/inline/ok/0186_lifetime_arg.rast | 22 + .../parser/inline/ok/0186_lifetime_arg.rs | 1 + .../parser/inline/ok/0187_assoc_type_eq.rast | 41 + .../parser/inline/ok/0187_assoc_type_eq.rs | 1 + .../ok/0188_const_param_default_path.rast | 37 + .../ok/0188_const_param_default_path.rs | 1 + .../inline/ok/0189_const_arg_literal.rast | 27 + .../inline/ok/0189_const_arg_literal.rs | 1 + .../parser/inline/ok/0190_generic_arg.rast | 25 + .../parser/inline/ok/0190_generic_arg.rs | 1 + .../ok/0191_const_arg_negative_number.rast | 24 + .../ok/0191_const_arg_negative_number.rs | 1 + .../ok/0192_const_arg_bool_literal.rast | 22 + .../inline/ok/0192_const_arg_bool_literal.rs | 1 + .../parser/inline/ok/0193_let_stmt_init.rast | 29 + .../parser/inline/ok/0193_let_stmt_init.rs | 1 + .../parser/inline/ok/0194_let_else.rast | 51 + .../parser/inline/ok/0194_let_else.rs | 1 + .../inline/ok/0194_let_stmt_ascription.rast | 31 + .../inline/ok/0194_let_stmt_ascription.rs | 1 + .../ok/0194_macro_inside_generic_arg.rast | 36 + .../ok/0194_macro_inside_generic_arg.rs | 1 + .../inline/ok/0196_pub_tuple_field.rast | 69 + .../parser/inline/ok/0196_pub_tuple_field.rs | 3 + ...turing_assignment_struct_rest_pattern.rast | 44 + ...ucturing_assignment_struct_rest_pattern.rs | 3 + ...destructuring_assignment_wildcard_pat.rast | 50 + ...8_destructuring_assignment_wildcard_pat.rs | 4 + .../0199_const_param_default_expression.rast | 35 + .../ok/0199_const_param_default_expression.rs | 1 + .../parser/inline/ok/0199_effect_blocks.rast | 95 + .../parser/inline/ok/0199_effect_blocks.rs | 4 + ...199_type_item_where_clause_deprecated.rast | 33 + .../0199_type_item_where_clause_deprecated.rs | 1 + .../parser/inline/ok/0200_assoc_const_eq.rast | 105 + .../parser/inline/ok/0200_assoc_const_eq.rs | 3 + .../ok/0200_const_param_default_literal.rast | 31 + .../ok/0200_const_param_default_literal.rs | 1 + .../0201_question_for_type_trait_bound.rast | 47 + .../ok/0201_question_for_type_trait_bound.rs | 1 + .../ok/0202_typepathfn_with_coloncolon.rast | 81 + .../ok/0202_typepathfn_with_coloncolon.rs | 2 + ...03_closure_body_underscore_assignment.rast | 32 + ...0203_closure_body_underscore_assignment.rs | 1 + .../parser/inline/ok/0204_yeet_expr.rast | 31 + .../parser/inline/ok/0204_yeet_expr.rs | 4 + .../parser/inline/ok/0205_const_closure.rast | 42 + .../parser/inline/ok/0205_const_closure.rs | 1 + .../parser/inline/ok/0207_builtin_expr.rast | 105 + .../parser/inline/ok/0207_builtin_expr.rs | 5 + .../inline/ok/0207_exclusive_range_pat.rast | 58 + .../inline/ok/0207_exclusive_range_pat.rs | 6 + .../0208_associated_return_type_bounds.rast | 102 + .../ok/0208_associated_return_type_bounds.rs | 1 + ..._bare_dyn_types_with_leading_lifetime.rast | 58 + ...08_bare_dyn_types_with_leading_lifetime.rs | 2 + .../ok/0208_closure_range_method_call.rast | 49 + .../ok/0208_closure_range_method_call.rs | 4 + .../ok/0208_macro_rules_as_macro_name.rast | 72 + .../ok/0208_macro_rules_as_macro_name.rs | 6 + ..._dyn_types_with_paren_as_generic_args.rast | 175 + ...re_dyn_types_with_paren_as_generic_args.rs | 4 + .../parser/inline/ok/0209_become_expr.rast | 31 + .../parser/inline/ok/0209_become_expr.rs | 3 + .../inline/ok/0211_async_trait_bound.rast | 43 + .../inline/ok/0211_async_trait_bound.rs | 1 + .../inline/ok/0212_const_trait_bound.rast | 34 + .../inline/ok/0212_const_trait_bound.rs | 1 + .../test_data/parser/ok/0000_empty.rast | 1 + .../parser/test_data/parser/ok/0000_empty.rs | 0 .../test_data/parser/ok/0001_struct_item.rast | 39 + .../test_data/parser/ok/0001_struct_item.rs | 3 + .../parser/ok/0002_struct_item_field.rast | 22 + .../parser/ok/0002_struct_item_field.rs | 3 + .../parser/ok/0004_file_shebang.rast | 2 + .../test_data/parser/ok/0004_file_shebang.rs | 1 + .../test_data/parser/ok/0005_fn_item.rast | 16 + .../test_data/parser/ok/0005_fn_item.rs | 2 + .../parser/ok/0006_inner_attributes.rast | 194 + .../parser/ok/0006_inner_attributes.rs | 10 + .../parser/ok/0007_extern_crate.rast | 40 + .../test_data/parser/ok/0007_extern_crate.rs | 3 + .../test_data/parser/ok/0008_mod_item.rast | 77 + .../test_data/parser/ok/0008_mod_item.rs | 12 + .../test_data/parser/ok/0009_use_item.rast | 21 + .../test_data/parser/ok/0009_use_item.rs | 2 + .../parser/ok/0010_use_path_segments.rast | 42 + .../parser/ok/0010_use_path_segments.rs | 2 + .../parser/ok/0011_outer_attribute.rast | 61 + .../parser/ok/0011_outer_attribute.rs | 6 + .../test_data/parser/ok/0012_visibility.rast | 133 + .../test_data/parser/ok/0012_visibility.rs | 6 + .../parser/ok/0013_use_path_self_super.rast | 36 + .../parser/ok/0013_use_path_self_super.rs | 2 + .../test_data/parser/ok/0014_use_tree.rast | 95 + .../test_data/parser/ok/0014_use_tree.rs | 7 + .../test_data/parser/ok/0015_use_tree.rast | 65 + .../test_data/parser/ok/0015_use_tree.rs | 2 + .../parser/ok/0016_struct_flavors.rast | 93 + .../parser/ok/0016_struct_flavors.rs | 10 + .../parser/ok/0017_attr_trailing_comma.rast | 30 + .../parser/ok/0017_attr_trailing_comma.rs | 2 + .../parser/ok/0018_struct_type_params.rast | 274 + .../parser/ok/0018_struct_type_params.rs | 17 + .../test_data/parser/ok/0019_enums.rast | 155 + .../parser/test_data/parser/ok/0019_enums.rs | 25 + .../parser/ok/0020_type_param_bounds.rast | 283 + .../parser/ok/0020_type_param_bounds.rs | 10 + .../parser/ok/0022_empty_extern_block.rast | 21 + .../parser/ok/0022_empty_extern_block.rs | 5 + .../parser/ok/0023_static_items.rast | 41 + .../test_data/parser/ok/0023_static_items.rs | 2 + .../test_data/parser/ok/0024_const_item.rast | 1 + .../test_data/parser/ok/0024_const_item.rs | 0 .../parser/ok/0025_extern_fn_in_block.rast | 33 + .../parser/ok/0025_extern_fn_in_block.rs | 3 + .../parser/ok/0026_const_fn_in_block.rast | 32 + .../parser/ok/0026_const_fn_in_block.rs | 3 + .../parser/ok/0027_unsafe_fn_in_block.rast | 43 + .../parser/ok/0027_unsafe_fn_in_block.rs | 4 + .../ok/0028_operator_binding_power.rast | 455 + .../parser/ok/0028_operator_binding_power.rs | 27 + .../test_data/parser/ok/0029_range_forms.rast | 152 + .../test_data/parser/ok/0029_range_forms.rs | 11 + .../parser/ok/0030_string_suffixes.rast | 64 + .../parser/ok/0030_string_suffixes.rs | 6 + .../test_data/parser/ok/0030_traits.rast | 62 + .../parser/test_data/parser/ok/0030_traits.rs | 7 + .../test_data/parser/ok/0031_extern.rast | 973 ++ .../parser/test_data/parser/ok/0031_extern.rs | 29 + .../test_data/parser/ok/0032_where_for.rast | 93 + .../test_data/parser/ok/0032_where_for.rs | 4 + .../test_data/parser/ok/0033_label_break.rast | 223 + .../test_data/parser/ok/0033_label_break.rs | 28 + .../parser/ok/0034_crate_path_in_call.rast | 43 + .../parser/ok/0034_crate_path_in_call.rs | 3 + .../test_data/parser/ok/0035_weird_exprs.rast | 2339 +++ .../test_data/parser/ok/0035_weird_exprs.rs | 154 + .../parser/ok/0036_fully_qualified.rast | 93 + .../parser/ok/0036_fully_qualified.rs | 8 + .../parser/test_data/parser/ok/0037_mod.rast | 16 + .../parser/test_data/parser/ok/0037_mod.rs | 5 + .../parser/ok/0038_where_pred_type.rast | 43 + .../parser/ok/0038_where_pred_type.rs | 1 + .../test_data/parser/ok/0039_raw_fn_item.rast | 16 + .../test_data/parser/ok/0039_raw_fn_item.rs | 2 + .../parser/ok/0040_raw_struct_item_field.rast | 22 + .../parser/ok/0040_raw_struct_item_field.rs | 3 + .../parser/ok/0041_raw_keywords.rast | 50 + .../test_data/parser/ok/0041_raw_keywords.rs | 1 + .../parser/ok/0042_ufcs_call_list.rast | 127 + .../parser/ok/0042_ufcs_call_list.rs | 15 + .../parser/ok/0043_complex_assignment.rast | 111 + .../parser/ok/0043_complex_assignment.rs | 8 + .../test_data/parser/ok/0044_let_attrs.rast | 77 + .../test_data/parser/ok/0044_let_attrs.rs | 5 + .../test_data/parser/ok/0045_block_attrs.rast | 230 + .../test_data/parser/ok/0045_block_attrs.rs | 24 + .../ok/0046_extern_inner_attributes.rast | 29 + .../parser/ok/0046_extern_inner_attributes.rs | 4 + .../ok/0047_minus_in_inner_pattern.rast | 323 + .../parser/ok/0047_minus_in_inner_pattern.rs | 27 + .../parser/ok/0048_compound_assignment.rast | 201 + .../parser/ok/0048_compound_assignment.rs | 17 + .../test_data/parser/ok/0049_async_block.rast | 36 + .../test_data/parser/ok/0049_async_block.rs | 5 + .../ok/0050_async_block_as_argument.rast | 92 + .../parser/ok/0050_async_block_as_argument.rs | 5 + .../parser/ok/0051_parameter_attrs.rast | 548 + .../parser/ok/0051_parameter_attrs.rs | 21 + .../parser/ok/0052_for_range_block.rast | 81 + .../parser/ok/0052_for_range_block.rs | 5 + .../0053_outer_attribute_on_macro_rules.rast | 37 + .../ok/0053_outer_attribute_on_macro_rules.rs | 5 + .../parser/ok/0054_qual_path_in_type_arg.rast | 126 + .../parser/ok/0054_qual_path_in_type_arg.rs | 5 + .../test_data/parser/ok/0055_dot_dot_dot.rast | 50 + .../test_data/parser/ok/0055_dot_dot_dot.rs | 5 + .../test_data/parser/ok/0056_neq_in_type.rast | 65 + .../test_data/parser/ok/0056_neq_in_type.rs | 3 + .../parser/ok/0057_loop_in_call.rast | 59 + .../test_data/parser/ok/0057_loop_in_call.rs | 5 + .../parser/ok/0058_unary_expr_precedence.rast | 97 + .../parser/ok/0058_unary_expr_precedence.rs | 7 + .../parser/ok/0059_loops_in_parens.rast | 100 + .../parser/ok/0059_loops_in_parens.rs | 5 + .../test_data/parser/ok/0060_as_range.rast | 56 + .../test_data/parser/ok/0060_as_range.rs | 4 + .../parser/ok/0061_match_full_range.rast | 27 + .../parser/ok/0061_match_full_range.rs | 4 + .../test_data/parser/ok/0062_macro_2.0.rast | 177 + .../test_data/parser/ok/0062_macro_2.0.rs | 15 + .../parser/ok/0063_trait_fn_patterns.rast | 198 + .../parser/ok/0063_trait_fn_patterns.rs | 7 + .../parser/ok/0063_variadic_fun.rast | 134 + .../test_data/parser/ok/0063_variadic_fun.rs | 5 + .../parser/ok/0064_impl_fn_params.rast | 166 + .../parser/ok/0064_impl_fn_params.rs | 6 + .../parser/ok/0065_comment_newline.rast | 17 + .../parser/ok/0065_comment_newline.rs | 3 + .../ok/0065_plus_after_fn_trait_bound.rast | 61 + .../ok/0065_plus_after_fn_trait_bound.rs | 1 + .../parser/ok/0066_default_modifier.rast | 222 + .../parser/ok/0066_default_modifier.rs | 16 + .../parser/ok/0067_where_for_pred.rast | 413 + .../parser/ok/0067_where_for_pred.rs | 30 + .../parser/ok/0068_item_modifiers.rast | 238 + .../parser/ok/0068_item_modifiers.rs | 18 + .../parser/ok/0069_multi_trait_object.rast | 204 + .../parser/ok/0069_multi_trait_object.rs | 6 + .../parser/ok/0070_expr_attr_placement.rast | 59 + .../parser/ok/0070_expr_attr_placement.rs | 3 + .../parser/ok/0071_stmt_attr_placement.rast | 72 + .../parser/ok/0071_stmt_attr_placement.rs | 4 + .../ok/0072_destructuring_assignment.rast | 356 + .../ok/0072_destructuring_assignment.rs | 14 + .../rust-analyzer/crates/paths/Cargo.toml | 25 + .../rust-analyzer/crates/paths/src/lib.rs | 425 + .../crates/proc-macro-api/Cargo.toml | 37 + .../crates/proc-macro-api/src/lib.rs | 210 + .../crates/proc-macro-api/src/msg.rs | 292 + .../crates/proc-macro-api/src/msg/flat.rs | 494 + .../crates/proc-macro-api/src/process.rs | 209 + .../crates/proc-macro-api/src/version.rs | 164 + .../crates/proc-macro-srv-cli/Cargo.toml | 25 + .../crates/proc-macro-srv-cli/src/main.rs | 72 + .../crates/proc-macro-srv/Cargo.toml | 39 + .../crates/proc-macro-srv/build.rs | 25 + .../proc-macro-srv/proc-macro-test/Cargo.toml | 13 + .../proc-macro-srv/proc-macro-test/build.rs | 126 + .../proc-macro-test/imp/.gitignore | 2 + .../proc-macro-test/imp/Cargo.toml | 16 + .../proc-macro-test/imp/src/lib.rs | 139 + .../proc-macro-srv/proc-macro-test/src/lib.rs | 6 + .../crates/proc-macro-srv/src/dylib.rs | 203 + .../crates/proc-macro-srv/src/lib.rs | 309 + .../crates/proc-macro-srv/src/proc_macros.rs | 132 + .../crates/proc-macro-srv/src/server.rs | 106 + .../src/server/rust_analyzer_span.rs | 476 + .../proc-macro-srv/src/server/symbol.rs | 48 + .../proc-macro-srv/src/server/token_id.rs | 436 + .../proc-macro-srv/src/server/token_stream.rs | 155 + .../crates/proc-macro-srv/src/tests/mod.rs | 272 + .../crates/proc-macro-srv/src/tests/utils.rs | 102 + .../rust-analyzer/crates/profile/Cargo.toml | 37 + .../crates/profile/src/google_cpu_profiler.rs | 44 + .../rust-analyzer/crates/profile/src/lib.rs | 105 + .../crates/profile/src/memory_usage.rs | 133 + .../crates/profile/src/stop_watch.rs | 98 + .../crates/project-model/Cargo.toml | 38 + .../crates/project-model/src/build_scripts.rs | 503 + .../project-model/src/cargo_workspace.rs | 553 + .../crates/project-model/src/cfg_flag.rs | 71 + .../crates/project-model/src/lib.rs | 185 + .../crates/project-model/src/manifest_path.rs | 61 + .../crates/project-model/src/project_json.rs | 251 + .../crates/project-model/src/rustc_cfg.rs | 100 + .../crates/project-model/src/sysroot.rs | 518 + .../project-model/src/target_data_layout.rs | 67 + .../crates/project-model/src/tests.rs | 293 + .../crates/project-model/src/workspace.rs | 1629 ++ .../test_data/fake-sysroot/alloc/src/lib.rs | 0 .../test_data/fake-sysroot/core/src/lib.rs | 0 .../fake-sysroot/panic_abort/src/lib.rs | 0 .../fake-sysroot/panic_unwind/src/lib.rs | 0 .../fake-sysroot/proc_macro/src/lib.rs | 0 .../fake-sysroot/profiler_builtins/src/lib.rs | 0 .../test_data/fake-sysroot/std/src/lib.rs | 0 .../stdarch/crates/std_detect/src/lib.rs | 0 .../test_data/fake-sysroot/term/src/lib.rs | 0 .../test_data/fake-sysroot/test/src/lib.rs | 0 .../test_data/fake-sysroot/unwind/src/lib.rs | 0 .../test_data/hello-world-metadata.json | 245 + .../test_data/hello-world-project.json | 12 + .../test_data/is-proc-macro-project.json | 13 + .../cargo_hello_world_project_model.txt | 328 + ...project_model_with_selective_overrides.txt | 328 + ..._project_model_with_wildcard_overrides.txt | 324 + ...rust_project_hello_world_project_model.txt | 440 + .../test_data/regex-metadata.json | 6420 +++++++ .../test_data/ripgrep-metadata.json | 12816 ++++++++++++++ .../crates/rust-analyzer/Cargo.toml | 98 + .../crates/rust-analyzer/build.rs | 50 + .../crates/rust-analyzer/src/bin/main.rs | 306 + .../rust-analyzer/src/bin/rustc_wrapper.rs | 56 + .../crates/rust-analyzer/src/caps.rs | 230 + .../rust-analyzer/src/cargo_target_spec.rs | 241 + .../crates/rust-analyzer/src/cli.rs | 90 + .../rust-analyzer/src/cli/analysis_stats.rs | 1145 ++ .../rust-analyzer/src/cli/diagnostics.rs | 93 + .../crates/rust-analyzer/src/cli/flags.rs | 321 + .../crates/rust-analyzer/src/cli/highlight.rs | 14 + .../crates/rust-analyzer/src/cli/lsif.rs | 319 + .../crates/rust-analyzer/src/cli/parse.rs | 17 + .../rust-analyzer/src/cli/progress_report.rs | 115 + .../crates/rust-analyzer/src/cli/run_tests.rs | 88 + .../rust-analyzer/src/cli/rustc_tests.rs | 306 + .../crates/rust-analyzer/src/cli/scip.rs | 616 + .../crates/rust-analyzer/src/cli/ssr.rs | 84 + .../crates/rust-analyzer/src/cli/symbols.rs | 16 + .../crates/rust-analyzer/src/config.rs | 2815 +++ .../src/config/patch_old_style.rs | 170 + .../crates/rust-analyzer/src/diagnostics.rs | 201 + .../test_data/clippy_pass_by_ref.txt | 301 + .../test_data/handles_macro_location.txt | 64 + .../test_data/macro_compiler_error.txt | 229 + ...easonable_line_numbers_from_empty_file.txt | 64 + .../rustc_incompatible_type_for_trait.txt | 64 + .../test_data/rustc_mismatched_type.txt | 64 + .../rustc_range_map_lsp_position.txt | 184 + .../test_data/rustc_unused_variable.txt | 212 + .../rustc_unused_variable_as_hint.txt | 212 + .../rustc_unused_variable_as_info.txt | 212 + .../rustc_wrong_number_of_parameters.txt | 184 + .../test_data/snap_multi_line_fix.txt | 388 + .../rust-analyzer/src/diagnostics/to_proto.rs | 1855 ++ .../crates/rust-analyzer/src/diff.rs | 53 + .../crates/rust-analyzer/src/dispatch.rs | 364 + .../crates/rust-analyzer/src/global_state.rs | 536 + .../src/hack_recover_crate_name.rs | 25 + .../src/handlers/notification.rs | 382 + .../rust-analyzer/src/handlers/request.rs | 2246 +++ .../src/integrated_benchmarks.rs | 327 + .../crates/rust-analyzer/src/lib.rs | 61 + .../crates/rust-analyzer/src/line_index.rs | 109 + .../crates/rust-analyzer/src/lsp.rs | 29 + .../crates/rust-analyzer/src/lsp/ext.rs | 828 + .../rust-analyzer/src/lsp/from_proto.rs | 144 + .../rust-analyzer/src/lsp/semantic_tokens.rs | 351 + .../crates/rust-analyzer/src/lsp/to_proto.rs | 2742 +++ .../crates/rust-analyzer/src/lsp/utils.rs | 452 + .../crates/rust-analyzer/src/main_loop.rs | 1021 ++ .../crates/rust-analyzer/src/mem_docs.rs | 72 + .../crates/rust-analyzer/src/op_queue.rs | 44 + .../crates/rust-analyzer/src/reload.rs | 818 + .../crates/rust-analyzer/src/task_pool.rs | 53 + .../rust-analyzer/src/tracing/config.rs | 77 + .../crates/rust-analyzer/src/tracing/hprof.rs | 276 + .../crates/rust-analyzer/src/version.rs | 57 + .../crates/rust-analyzer/tests/crate_graph.rs | 118 + .../rust-analyzer/tests/slow-tests/main.rs | 1234 ++ .../tests/slow-tests/sourcegen.rs | 80 + .../rust-analyzer/tests/slow-tests/support.rs | 478 + .../rust-analyzer/tests/slow-tests/testdir.rs | 114 + .../rust-analyzer/tests/slow-tests/tidy.rs | 361 + .../deduplication_crate_graph_A.json | 140 + .../deduplication_crate_graph_B.json | 66 + .../rust-analyzer/crates/salsa/Cargo.toml | 35 + src/tools/rust-analyzer/crates/salsa/FAQ.md | 34 + .../rust-analyzer/crates/salsa/LICENSE-APACHE | 201 + .../rust-analyzer/crates/salsa/LICENSE-MIT | 23 + .../rust-analyzer/crates/salsa/README.md | 42 + .../crates/salsa/salsa-macros/Cargo.toml | 23 + .../crates/salsa/salsa-macros/LICENSE-APACHE | 1 + .../crates/salsa/salsa-macros/LICENSE-MIT | 1 + .../crates/salsa/salsa-macros/README.md | 1 + .../salsa-macros/src/database_storage.rs | 250 + .../crates/salsa/salsa-macros/src/lib.rs | 125 + .../salsa/salsa-macros/src/parenthesized.rs | 13 + .../salsa/salsa-macros/src/query_group.rs | 747 + .../rust-analyzer/crates/salsa/src/debug.rs | 65 + .../rust-analyzer/crates/salsa/src/derived.rs | 234 + .../crates/salsa/src/derived/slot.rs | 849 + .../crates/salsa/src/durability.rs | 50 + .../rust-analyzer/crates/salsa/src/hash.rs | 4 + .../rust-analyzer/crates/salsa/src/input.rs | 372 + .../crates/salsa/src/intern_id.rs | 131 + .../crates/salsa/src/interned.rs | 503 + .../rust-analyzer/crates/salsa/src/lib.rs | 746 + .../rust-analyzer/crates/salsa/src/lru.rs | 325 + .../crates/salsa/src/plumbing.rs | 245 + .../crates/salsa/src/revision.rs | 67 + .../rust-analyzer/crates/salsa/src/runtime.rs | 665 + .../salsa/src/runtime/dependency_graph.rs | 251 + .../crates/salsa/src/runtime/local_state.rs | 213 + .../rust-analyzer/crates/salsa/src/storage.rs | 54 + .../crates/salsa/tests/cycles.rs | 492 + .../crates/salsa/tests/dyn_trait.rs | 28 + .../salsa/tests/incremental/constants.rs | 145 + .../crates/salsa/tests/incremental/counter.rs | 14 + .../salsa/tests/incremental/implementation.rs | 59 + .../crates/salsa/tests/incremental/log.rs | 16 + .../crates/salsa/tests/incremental/main.rs | 9 + .../tests/incremental/memoized_dep_inputs.rs | 60 + .../tests/incremental/memoized_inputs.rs | 76 + .../tests/incremental/memoized_volatile.rs | 77 + .../crates/salsa/tests/interned.rs | 90 + .../rust-analyzer/crates/salsa/tests/lru.rs | 102 + .../crates/salsa/tests/macros.rs | 11 + .../crates/salsa/tests/no_send_sync.rs | 31 + .../crates/salsa/tests/on_demand_inputs.rs | 147 + .../crates/salsa/tests/panic_safely.rs | 93 + .../salsa/tests/parallel/cancellation.rs | 132 + .../crates/salsa/tests/parallel/frozen.rs | 57 + .../salsa/tests/parallel/independent.rs | 29 + .../crates/salsa/tests/parallel/main.rs | 13 + .../parallel/parallel_cycle_all_recover.rs | 109 + .../parallel/parallel_cycle_mid_recover.rs | 109 + .../parallel/parallel_cycle_none_recover.rs | 68 + .../parallel/parallel_cycle_one_recovers.rs | 94 + .../crates/salsa/tests/parallel/race.rs | 37 + .../crates/salsa/tests/parallel/setup.rs | 197 + .../crates/salsa/tests/parallel/signal.rs | 40 + .../crates/salsa/tests/parallel/stress.rs | 168 + .../salsa/tests/parallel/true_parallel.rs | 125 + .../tests/storage_varieties/implementation.rs | 19 + .../salsa/tests/storage_varieties/main.rs | 5 + .../salsa/tests/storage_varieties/queries.rs | 22 + .../salsa/tests/storage_varieties/tests.rs | 49 + .../crates/salsa/tests/transparent.rs | 39 + .../crates/salsa/tests/variadic.rs | 51 + .../rust-analyzer/crates/sourcegen/Cargo.toml | 19 + .../rust-analyzer/crates/sourcegen/src/lib.rs | 203 + .../rust-analyzer/crates/span/Cargo.toml | 24 + .../rust-analyzer/crates/span/src/ast_id.rs | 253 + .../rust-analyzer/crates/span/src/hygiene.rs | 140 + .../rust-analyzer/crates/span/src/lib.rs | 314 + .../rust-analyzer/crates/span/src/map.rs | 162 + .../rust-analyzer/crates/stdx/Cargo.toml | 32 + .../rust-analyzer/crates/stdx/src/anymap.rs | 365 + .../rust-analyzer/crates/stdx/src/lib.rs | 357 + .../rust-analyzer/crates/stdx/src/macros.rs | 67 + .../crates/stdx/src/non_empty_vec.rs | 39 + .../crates/stdx/src/panic_context.rs | 50 + .../rust-analyzer/crates/stdx/src/process.rs | 272 + .../rust-analyzer/crates/stdx/src/rand.rs | 20 + .../rust-analyzer/crates/stdx/src/thread.rs | 102 + .../crates/stdx/src/thread/intent.rs | 287 + .../crates/stdx/src/thread/pool.rs | 92 + .../rust-analyzer/crates/syntax/Cargo.toml | 43 + .../crates/syntax/fuzz/.gitignore | 4 + .../crates/syntax/fuzz/Cargo.toml | 29 + .../crates/syntax/fuzz/fuzz_targets/parser.rs | 11 + .../syntax/fuzz/fuzz_targets/reparse.rs | 11 + .../rust-analyzer/crates/syntax/rust.ungram | 701 + .../rust-analyzer/crates/syntax/src/algo.rs | 659 + .../rust-analyzer/crates/syntax/src/ast.rs | 416 + .../crates/syntax/src/ast/edit.rs | 174 + .../crates/syntax/src/ast/edit_in_place.rs | 1270 ++ .../crates/syntax/src/ast/expr_ext.rs | 434 + .../crates/syntax/src/ast/generated.rs | 41 + .../crates/syntax/src/ast/generated/nodes.rs | 5128 ++++++ .../crates/syntax/src/ast/generated/tokens.rs | 217 + .../crates/syntax/src/ast/make.rs | 1249 ++ .../crates/syntax/src/ast/node_ext.rs | 1127 ++ .../crates/syntax/src/ast/operators.rs | 122 + .../crates/syntax/src/ast/prec.rs | 331 + .../crates/syntax/src/ast/token_ext.rs | 612 + .../crates/syntax/src/ast/traits.rs | 135 + .../rust-analyzer/crates/syntax/src/fuzz.rs | 73 + .../rust-analyzer/crates/syntax/src/hacks.rs | 15 + .../rust-analyzer/crates/syntax/src/lib.rs | 483 + .../crates/syntax/src/parsing.rs | 48 + .../crates/syntax/src/parsing/reparsing.rs | 445 + .../rust-analyzer/crates/syntax/src/ptr.rs | 128 + .../crates/syntax/src/syntax_error.rs | 44 + .../crates/syntax/src/syntax_node.rs | 76 + .../rust-analyzer/crates/syntax/src/ted.rs | 206 + .../rust-analyzer/crates/syntax/src/tests.rs | 199 + .../crates/syntax/src/token_text.rs | 102 + .../rust-analyzer/crates/syntax/src/utils.rs | 8 + .../crates/syntax/src/validation.rs | 404 + .../crates/syntax/src/validation/block.rs | 24 + .../test_data/parser/fuzz-failures/0000.rs | 199 + .../test_data/parser/fuzz-failures/0001.rs | 106 + .../test_data/parser/fuzz-failures/0002.rs | 1 + .../test_data/parser/fuzz-failures/0003.rs | 1 + .../test_data/parser/fuzz-failures/0004.rs | 1 + .../validation/0031_block_inner_attrs.rast | 127 + .../validation/0031_block_inner_attrs.rs | 15 + .../validation/0037_visibility_in_traits.rast | 105 + .../validation/0037_visibility_in_traits.rs | 6 + .../0038_endless_inclusive_range.rast | 30 + .../0038_endless_inclusive_range.rs | 4 + .../0040_illegal_crate_kw_location.rast | 96 + .../0040_illegal_crate_kw_location.rs | 4 + .../0041_illegal_self_keyword_location.rast | 29 + .../0041_illegal_self_keyword_location.rs | 2 + .../0045_ambiguous_trait_object.rast | 196 + .../validation/0045_ambiguous_trait_object.rs | 6 + .../validation/0046_mutable_const_item.rast | 22 + .../validation/0046_mutable_const_item.rs | 1 + .../parser/validation/invalid_let_expr.rast | 216 + .../parser/validation/invalid_let_expr.rs | 14 + .../test_data/reparse/fuzz-failures/0000.rs | 6 + .../test_data/reparse/fuzz-failures/0001.rs | 4 + .../test_data/reparse/fuzz-failures/0002.rs | 4 + .../test_data/reparse/fuzz-failures/0003.rs | Bin 0 -> 8 bytes .../test_data/reparse/fuzz-failures/0004.rs | 4 + .../test_data/reparse/fuzz-failures/0005.rs | 7 + .../crates/test-fixture/Cargo.toml | 21 + .../crates/test-fixture/src/lib.rs | 640 + .../crates/test-utils/Cargo.toml | 25 + .../crates/test-utils/src/assert_linear.rs | 112 + .../crates/test-utils/src/bench_fixture.rs | 45 + .../crates/test-utils/src/fixture.rs | 508 + .../crates/test-utils/src/lib.rs | 500 + .../crates/test-utils/src/minicore.rs | 1603 ++ .../rust-analyzer/crates/text-edit/Cargo.toml | 19 + .../rust-analyzer/crates/text-edit/src/lib.rs | 316 + .../rust-analyzer/crates/toolchain/Cargo.toml | 19 + .../rust-analyzer/crates/toolchain/src/lib.rs | 119 + src/tools/rust-analyzer/crates/tt/Cargo.toml | 21 + .../rust-analyzer/crates/tt/src/buffer.rs | 250 + src/tools/rust-analyzer/crates/tt/src/lib.rs | 401 + .../crates/vfs-notify/Cargo.toml | 25 + .../crates/vfs-notify/src/lib.rs | 260 + src/tools/rust-analyzer/crates/vfs/Cargo.toml | 24 + .../crates/vfs/src/anchored_path.rs | 49 + .../rust-analyzer/crates/vfs/src/file_set.rs | 219 + .../crates/vfs/src/file_set/tests.rs | 42 + src/tools/rust-analyzer/crates/vfs/src/lib.rs | 282 + .../rust-analyzer/crates/vfs/src/loader.rs | 230 + .../crates/vfs/src/path_interner.rs | 43 + .../rust-analyzer/crates/vfs/src/vfs_path.rs | 418 + .../crates/vfs/src/vfs_path/tests.rs | 30 + src/tools/rust-analyzer/docs/dev/README.md | 267 + .../rust-analyzer/docs/dev/architecture.md | 518 + src/tools/rust-analyzer/docs/dev/debugging.md | 99 + src/tools/rust-analyzer/docs/dev/guide.md | 587 + .../rust-analyzer/docs/dev/lsp-extensions.md | 1084 ++ src/tools/rust-analyzer/docs/dev/style.md | 1178 ++ src/tools/rust-analyzer/docs/dev/syntax.md | 533 + src/tools/rust-analyzer/docs/user/.gitignore | 1 + .../docs/user/generated_config.adoc | 966 + src/tools/rust-analyzer/docs/user/manual.adoc | 1026 ++ .../rust-analyzer/editors/code/.eslintignore | 2 + .../rust-analyzer/editors/code/.eslintrc.js | 46 + .../rust-analyzer/editors/code/.gitignore | 7 + .../editors/code/.prettierignore | 3 + .../rust-analyzer/editors/code/.prettierrc.js | 5 + .../rust-analyzer/editors/code/.vscodeignore | 14 + src/tools/rust-analyzer/editors/code/LICENSE | 230 + .../rust-analyzer/editors/code/README.md | 52 + src/tools/rust-analyzer/editors/code/icon.png | Bin 0 -> 15341 bytes .../editors/code/language-configuration.json | 44 + .../editors/code/package-lock.json | 4001 +++++ .../rust-analyzer/editors/code/package.json | 2256 +++ .../code/ra_syntax_tree.tmGrammar.json | 29 + .../editors/code/src/ast_inspector.ts | 217 + .../editors/code/src/bootstrap.ts | 144 + .../rust-analyzer/editors/code/src/client.ts | 449 + .../editors/code/src/commands.ts | 1488 ++ .../rust-analyzer/editors/code/src/config.ts | 511 + .../rust-analyzer/editors/code/src/ctx.ts | 515 + .../rust-analyzer/editors/code/src/debug.ts | 266 + .../editors/code/src/dependencies_provider.ts | 154 + .../editors/code/src/diagnostics.ts | 220 + .../editors/code/src/lang_client.ts | 26 + .../rust-analyzer/editors/code/src/lsp_ext.ts | 267 + .../rust-analyzer/editors/code/src/main.ts | 216 + .../editors/code/src/nullable.ts | 19 + .../editors/code/src/persistent_state.ts | 20 + .../rust-analyzer/editors/code/src/run.ts | 236 + .../editors/code/src/rust_project.ts | 110 + .../editors/code/src/snippets.ts | 143 + .../rust-analyzer/editors/code/src/tasks.ts | 135 + .../editors/code/src/test_explorer.ts | 180 + .../editors/code/src/toolchain.ts | 229 + .../editors/code/src/undefinable.ts | 19 + .../rust-analyzer/editors/code/src/util.ts | 201 + .../editors/code/tests/runTests.ts | 43 + .../editors/code/tests/unit/index.ts | 87 + .../code/tests/unit/launch_config.test.ts | 99 + .../code/tests/unit/runnable_env.test.ts | 121 + .../editors/code/tests/unit/settings.test.ts | 63 + .../editors/code/tsconfig.eslint.json | 11 + .../rust-analyzer/editors/code/tsconfig.json | 19 + src/tools/rust-analyzer/lib/README.md | 14 + .../rust-analyzer/lib/la-arena/Cargo.toml | 13 + .../rust-analyzer/lib/la-arena/src/lib.rs | 524 + .../rust-analyzer/lib/la-arena/src/map.rs | 306 + .../rust-analyzer/lib/line-index/Cargo.toml | 17 + .../rust-analyzer/lib/line-index/README.md | 30 + .../rust-analyzer/lib/line-index/src/lib.rs | 493 + .../rust-analyzer/lib/line-index/src/tests.rs | 197 + .../rust-analyzer/lib/lsp-server/Cargo.toml | 20 + .../lib/lsp-server/LICENSE-APACHE | 1 + .../rust-analyzer/lib/lsp-server/LICENSE-MIT | 1 + .../lib/lsp-server/examples/goto_def.rs | 132 + .../rust-analyzer/lib/lsp-server/src/error.rs | 65 + .../rust-analyzer/lib/lsp-server/src/lib.rs | 441 + .../rust-analyzer/lib/lsp-server/src/msg.rs | 351 + .../lib/lsp-server/src/req_queue.rs | 69 + .../lib/lsp-server/src/socket.rs | 46 + .../rust-analyzer/lib/lsp-server/src/stdio.rs | 76 + src/tools/rust-analyzer/rust-bors.toml | 1 + src/tools/rust-analyzer/rustfmt.toml | 2 + src/tools/rust-analyzer/triagebot.toml | 20 + src/tools/rust-analyzer/xtask/Cargo.toml | 25 + src/tools/rust-analyzer/xtask/src/codegen.rs | 220 + .../xtask/src/codegen/assists_doc_tests.rs | 197 + .../xtask/src/codegen/diagnostics_docs.rs | 77 + .../xtask/src/codegen/grammar.rs | 875 + .../xtask/src/codegen/grammar/ast_src.rs | 273 + .../rust-analyzer/xtask/src/codegen/lints.rs | 342 + src/tools/rust-analyzer/xtask/src/dist.rs | 222 + src/tools/rust-analyzer/xtask/src/flags.rs | 273 + src/tools/rust-analyzer/xtask/src/install.rs | 134 + src/tools/rust-analyzer/xtask/src/main.rs | 87 + src/tools/rust-analyzer/xtask/src/metrics.rs | 222 + src/tools/rust-analyzer/xtask/src/publish.rs | 110 + .../rust-analyzer/xtask/src/publish/notes.rs | 631 + src/tools/rust-analyzer/xtask/src/release.rs | 96 + .../xtask/src/release/changelog.rs | 187 + .../rust-analyzer/xtask/test_data/expected.md | 81 + .../rust-analyzer/xtask/test_data/input.adoc | 90 + 1979 files changed, 491402 insertions(+) create mode 100644 src/tools/rust-analyzer/.cargo/config.toml create mode 100644 src/tools/rust-analyzer/.editorconfig create mode 100644 src/tools/rust-analyzer/.git-blame-ignore-revs create mode 100644 src/tools/rust-analyzer/.gitattributes create mode 100644 src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/critical_nightly_regression.md create mode 100644 src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/feature_request.md create mode 100644 src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/question.md create mode 100644 src/tools/rust-analyzer/.github/actions/github-release/Dockerfile create mode 100644 src/tools/rust-analyzer/.github/actions/github-release/README.md create mode 100644 src/tools/rust-analyzer/.github/actions/github-release/action.yml create mode 100644 src/tools/rust-analyzer/.github/actions/github-release/main.js create mode 100644 src/tools/rust-analyzer/.github/actions/github-release/package.json create mode 100644 src/tools/rust-analyzer/.github/rust.json create mode 100644 src/tools/rust-analyzer/.github/workflows/autopublish.yaml create mode 100644 src/tools/rust-analyzer/.github/workflows/ci.yaml create mode 100644 src/tools/rust-analyzer/.github/workflows/fuzz.yml create mode 100644 src/tools/rust-analyzer/.github/workflows/metrics.yaml create mode 100644 src/tools/rust-analyzer/.github/workflows/publish-libs.yaml create mode 100644 src/tools/rust-analyzer/.github/workflows/release.yaml create mode 100644 src/tools/rust-analyzer/.github/workflows/rustdoc.yaml create mode 100644 src/tools/rust-analyzer/.gitignore create mode 100644 src/tools/rust-analyzer/.typos.toml create mode 100644 src/tools/rust-analyzer/.vscode/extensions.json create mode 100644 src/tools/rust-analyzer/.vscode/launch.json create mode 100644 src/tools/rust-analyzer/.vscode/tasks.json create mode 100644 src/tools/rust-analyzer/Cargo.lock create mode 100644 src/tools/rust-analyzer/Cargo.toml create mode 100644 src/tools/rust-analyzer/LICENSE-APACHE create mode 100644 src/tools/rust-analyzer/LICENSE-MIT create mode 100644 src/tools/rust-analyzer/PRIVACY.md create mode 100644 src/tools/rust-analyzer/README.md create mode 100644 src/tools/rust-analyzer/assets/logo-square.svg create mode 100644 src/tools/rust-analyzer/assets/logo-wide.svg create mode 100644 src/tools/rust-analyzer/bench_data/glorious_old_parser create mode 100644 src/tools/rust-analyzer/bench_data/numerous_macro_rules create mode 100644 src/tools/rust-analyzer/clippy.toml create mode 100644 src/tools/rust-analyzer/crates/base-db/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/base-db/src/change.rs create mode 100644 src/tools/rust-analyzer/crates/base-db/src/input.rs create mode 100644 src/tools/rust-analyzer/crates/base-db/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/cfg/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/cfg/src/cfg_expr.rs create mode 100644 src/tools/rust-analyzer/crates/cfg/src/dnf.rs create mode 100644 src/tools/rust-analyzer/crates/cfg/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/cfg/src/tests.rs create mode 100644 src/tools/rust-analyzer/crates/flycheck/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/flycheck/src/command.rs create mode 100644 src/tools/rust-analyzer/crates/flycheck/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/flycheck/src/test_runner.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/attr.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/attr/builtin.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/attr/tests.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/body.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/body/lower.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/body/pretty.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/body/scope.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/body/tests.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/body/tests/block.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/builtin_type.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/child_by_source.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/data.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/data/adt.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/db.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/dyn_map.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/dyn_map/keys.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/expander.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/find_path.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/generics.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/hir.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/hir/format_args.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/hir/type_ref.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/import_map.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/item_scope.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/item_tree.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/item_tree/lower.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/item_tree/pretty.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/item_tree/tests.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/lang_item.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/lower.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests/builtin_derive_macro.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests/builtin_fn_macro.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests/mbe.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests/mbe/matching.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests/mbe/meta_syntax.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests/mbe/metavar_expr.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests/mbe/regression.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests/mbe/tt_conversion.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests/mod.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests/proc_macros.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/nameres.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/nameres/attr_resolution.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/nameres/collector.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/nameres/diagnostics.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/nameres/mod_resolution.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/nameres/path_resolution.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/nameres/proc_macro.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/nameres/tests.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/nameres/tests/globs.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/nameres/tests/incremental.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/nameres/tests/macros.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/nameres/tests/mod_resolution.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/nameres/tests/primitives.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/path.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/path/lower.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/per_ns.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/pretty.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/resolver.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/src.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/test_db.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/trace.rs create mode 100644 src/tools/rust-analyzer/crates/hir-def/src/visibility.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/attrs.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/builtin_attr_macro.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/builtin_derive_macro.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/builtin_fn_macro.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/cfg_process.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/change.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/db.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/declarative.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/eager.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/files.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/fixup.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/hygiene.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/mod_path.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/name.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/proc_macro.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/quote.rs create mode 100644 src/tools/rust-analyzer/crates/hir-expand/src/span_map.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/autoderef.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/builder.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/chalk_db.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/chalk_ext.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/consteval.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/consteval/tests.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/consteval/tests/intrinsics.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/db.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/diagnostics.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/decl_check.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/decl_check/case_conv.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/expr.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/match_check.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/match_check/pat_util.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/unsafe_check.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/display.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/infer.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/infer/cast.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/infer/closure.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/infer/coerce.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/infer/expr.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/infer/mutability.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/infer/pat.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/infer/path.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/infer/unify.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/inhabitedness.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/interner.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/lang_items.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/layout.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/layout/adt.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/layout/target.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/layout/tests.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/layout/tests/closure.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/lower.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/mapping.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/method_resolution.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/mir.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/mir/borrowck.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/mir/eval.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/mir/eval/shim.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/mir/eval/shim/simd.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/mir/eval/tests.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/mir/lower.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/mir/lower/as_place.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/mir/lower/pattern_matching.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/mir/monomorphization.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/mir/pretty.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/primitive.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/test_db.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/tests.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/tests/coercion.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/tests/diagnostics.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/tests/display_source_code.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/tests/incremental.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/tests/macros.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/tests/method_resolution.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/tests/never_type.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/tests/patterns.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/tests/regression.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/tests/simple.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/tests/traits.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/tls.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/traits.rs create mode 100644 src/tools/rust-analyzer/crates/hir-ty/src/utils.rs create mode 100644 src/tools/rust-analyzer/crates/hir/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/hir/src/attrs.rs create mode 100644 src/tools/rust-analyzer/crates/hir/src/db.rs create mode 100644 src/tools/rust-analyzer/crates/hir/src/diagnostics.rs create mode 100644 src/tools/rust-analyzer/crates/hir/src/display.rs create mode 100644 src/tools/rust-analyzer/crates/hir/src/from_id.rs create mode 100644 src/tools/rust-analyzer/crates/hir/src/has_source.rs create mode 100644 src/tools/rust-analyzer/crates/hir/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/hir/src/semantics.rs create mode 100644 src/tools/rust-analyzer/crates/hir/src/semantics/source_to_def.rs create mode 100644 src/tools/rust-analyzer/crates/hir/src/source_analyzer.rs create mode 100644 src/tools/rust-analyzer/crates/hir/src/symbols.rs create mode 100644 src/tools/rust-analyzer/crates/hir/src/term_search.rs create mode 100644 src/tools/rust-analyzer/crates/hir/src/term_search/expr.rs create mode 100644 src/tools/rust-analyzer/crates/hir/src/term_search/tactics.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/assist_config.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/assist_context.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/add_braces.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/add_explicit_type.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/add_label_to_loop.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/add_lifetime_to_type.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/add_missing_impl_members.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/add_missing_match_arms.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/add_return_type.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/add_turbo_fish.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/apply_demorgan.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/auto_import.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/bind_unused_param.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/bool_to_enum.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/change_visibility.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_bool_then.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_comment_block.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_integer_literal.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_into_to_from.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_iter_for_each_to_for.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_let_else_to_match.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_match_to_let_else.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_named_struct_to_tuple_struct.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_nested_function_to_closure.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_to_guarded_return.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_tuple_return_type_to_struct.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_tuple_struct_to_named_struct.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_two_arm_bool_match_to_matches_macro.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_while_to_loop.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/destructure_struct_binding.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/destructure_tuple_binding.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/desugar_doc_comment.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/expand_glob_import.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/extract_expressions_from_format_string.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/extract_function.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/extract_module.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/extract_type_alias.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/extract_variable.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/fill_record_pattern_fields.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/fix_visibility.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/flip_binexpr.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/flip_comma.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/flip_trait_bound.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_constant.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_default_from_enum_variant.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_default_from_new.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_delegate_methods.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_delegate_trait.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_deref.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_derive.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_documentation_template.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_enum_is_method.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_enum_projection_method.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_enum_variant.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_from_impl_for_enum.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_function.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_getter_or_setter.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_impl.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_is_empty_from_len.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_mut_trait_impl.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_new.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_trait_from_impl.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/inline_call.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/inline_const_as_literal.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/inline_local_variable.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/inline_macro.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/inline_type_alias.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/into_to_qualified_from.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/introduce_named_generic.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/introduce_named_lifetime.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/invert_if.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/merge_imports.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/merge_match_arms.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/merge_nested_if.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/move_bounds.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/move_const_to_impl.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/move_from_mod_rs.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/move_guard.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/move_module_to_file.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/move_to_mod_rs.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/normalize_import.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/number_representation.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/promote_local_to_const.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/pull_assignment_up.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/qualify_method_call.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/qualify_path.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/raw_string.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/remove_dbg.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/remove_mut.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/remove_parentheses.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/remove_unused_imports.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/remove_unused_param.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/reorder_fields.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/reorder_impl_items.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_arith_op.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_if_let_with_match.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_is_method_with_if_let_method.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_let_with_if_let.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_method_eager_lazy.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_named_generic_with_impl.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_qualified_name_with_use.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_string_with_char.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_try_expr_with_match.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_turbofish_with_explicit_type.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/sort_items.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/split_import.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/term_search.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/toggle_ignore.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/unmerge_match_arm.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/unmerge_use.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/unnecessary_async.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/unqualify_method_call.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/unwrap_block.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/unwrap_result_return_type.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/unwrap_tuple.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/handlers/wrap_return_type_in_result.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/tests.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/tests/generated.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/utils.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/utils/gen_trait_fn_body.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/utils/ref_field_expr.rs create mode 100644 src/tools/rust-analyzer/crates/ide-assists/src/utils/suggest_name.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/attribute.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/attribute/cfg.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/attribute/derive.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/attribute/lint.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/attribute/macro_use.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/attribute/repr.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/dot.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/env_vars.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/expr.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/extern_abi.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/extern_crate.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/field.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/flyimport.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/fn_param.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/format_string.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/item_list.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/item_list/trait_impl.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/keyword.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/lifetime.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/mod_.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/pattern.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/postfix.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/postfix/format_like.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/record.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/snippet.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/type.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/use_.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/completions/vis.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/config.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/context.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/context/analysis.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/context/tests.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/item.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/render.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/render/const_.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/render/function.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/render/literal.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/render/macro_.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/render/pattern.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/render/type_alias.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/render/union_literal.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/render/variant.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/snippet.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/tests.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/tests/attribute.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/tests/expression.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/tests/flyimport.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/tests/fn_param.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/tests/item.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/tests/item_list.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/tests/pattern.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/tests/predicate.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/tests/proc_macros.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/tests/record.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/tests/special.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/tests/type_pos.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/tests/use_tree.rs create mode 100644 src/tools/rust-analyzer/crates/ide-completion/src/tests/visibility.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/active_parameter.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/apply_change.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/assists.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/defs.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/documentation.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/famous_defs.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/helpers.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/imports/import_assets.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/imports/insert_use.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/imports/insert_use/tests.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/imports/merge_imports.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/items_locator.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/label.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/path_transform.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/prime_caches.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/prime_caches/topologic_sort.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/rename.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/rust_doc.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/search.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/source_change.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/symbol_index.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/syntax_helpers/format_string.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/syntax_helpers/format_string_exprs.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/syntax_helpers/insert_whitespace_into_node.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/syntax_helpers/node_ext.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/test_data/test_doc_alias.txt create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/test_data/test_symbol_index_collection.txt create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/traits.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/ty_filter.rs create mode 100644 src/tools/rust-analyzer/crates/ide-db/src/use_trivial_constructor.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/break_outside_of_loop.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/expected_function.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/field_shorthand.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/inactive_code.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/incoherent_impl.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/incorrect_case.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/invalid_derive_target.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/json_is_not_rust.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/macro_error.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/malformed_derive.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/missing_fields.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/missing_match_arms.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/missing_unsafe.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/moved_out_of_ref.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/mutability_errors.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/no_such_field.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/non_exhaustive_let.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/private_assoc_item.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/private_field.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/remove_trailing_return.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/remove_unnecessary_else.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/replace_filter_map_next_with_find_map.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/trait_impl_incorrect_safety.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/trait_impl_missing_assoc_item.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/trait_impl_orphan.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/trait_impl_redundant_assoc_item.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/type_mismatch.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/typed_hole.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/undeclared_label.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/unimplemented_builtin_macro.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/unlinked_file.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/unreachable_label.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/unresolved_assoc_item.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/unresolved_extern_crate.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/unresolved_field.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/unresolved_ident.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/unresolved_import.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/unresolved_macro_call.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/unresolved_method.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/unresolved_module.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/unresolved_proc_macro.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/unused_variables.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/useless_braces.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/ide-diagnostics/src/tests.rs create mode 100644 src/tools/rust-analyzer/crates/ide-ssr/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/ide-ssr/src/errors.rs create mode 100644 src/tools/rust-analyzer/crates/ide-ssr/src/fragments.rs create mode 100644 src/tools/rust-analyzer/crates/ide-ssr/src/from_comment.rs create mode 100644 src/tools/rust-analyzer/crates/ide-ssr/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/ide-ssr/src/matching.rs create mode 100644 src/tools/rust-analyzer/crates/ide-ssr/src/nester.rs create mode 100644 src/tools/rust-analyzer/crates/ide-ssr/src/parsing.rs create mode 100644 src/tools/rust-analyzer/crates/ide-ssr/src/replacing.rs create mode 100644 src/tools/rust-analyzer/crates/ide-ssr/src/resolving.rs create mode 100644 src/tools/rust-analyzer/crates/ide-ssr/src/search.rs create mode 100644 src/tools/rust-analyzer/crates/ide-ssr/src/tests.rs create mode 100644 src/tools/rust-analyzer/crates/ide/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/ide/src/annotations.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/annotations/fn_references.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/call_hierarchy.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/doc_links.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/doc_links/intra_doc_links.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/doc_links/tests.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/expand_macro.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/extend_selection.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/fetch_crates.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/file_structure.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/fixture.rs create mode 100755 src/tools/rust-analyzer/crates/ide/src/folding_ranges.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/goto_declaration.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/goto_definition.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/goto_implementation.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/goto_type_definition.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/highlight_related.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/hover.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/hover/render.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/hover/tests.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/inlay_hints.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/inlay_hints/adjustment.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/inlay_hints/bind_pat.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/inlay_hints/binding_mode.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/inlay_hints/chaining.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/inlay_hints/closing_brace.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/inlay_hints/closure_captures.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/inlay_hints/closure_ret.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/inlay_hints/discriminant.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/inlay_hints/fn_lifetime_fn.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/inlay_hints/implicit_drop.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/inlay_hints/implicit_static.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/inlay_hints/param_name.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/inlay_hints/range_exclusive.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/interpret_function.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/join_lines.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/markdown_remove.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/markup.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/matching_brace.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/moniker.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/move_item.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/navigation_target.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/parent_module.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/references.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/rename.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/runnables.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/shuffle_crate_graph.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/signature_help.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/ssr.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/static_index.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/status.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/escape.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/format.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/highlight.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/highlights.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/html.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/inject.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/injector.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/macro_.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/tags.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_assoc_functions.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_attributes.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_block_mod_items.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_const.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_crate_root.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_default_library.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_doctest.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_extern_crate.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_general.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_injection.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_keywords.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_lifetimes.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_macros.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_module_docs_inline.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_module_docs_outline.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_operators.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_rainbow.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_strings.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_unsafe.html create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/tests.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/syntax_tree.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/test_explorer.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/typing.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/typing/on_enter.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/view_crate_graph.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/view_hir.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/view_item_tree.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/view_memory_layout.rs create mode 100644 src/tools/rust-analyzer/crates/ide/src/view_mir.rs create mode 100644 src/tools/rust-analyzer/crates/intern/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/intern/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/limit/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/limit/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/load-cargo/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/load-cargo/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/mbe/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/mbe/src/benchmark.rs create mode 100644 src/tools/rust-analyzer/crates/mbe/src/expander.rs create mode 100644 src/tools/rust-analyzer/crates/mbe/src/expander/matcher.rs create mode 100644 src/tools/rust-analyzer/crates/mbe/src/expander/transcriber.rs create mode 100644 src/tools/rust-analyzer/crates/mbe/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/mbe/src/parser.rs create mode 100644 src/tools/rust-analyzer/crates/mbe/src/syntax_bridge.rs create mode 100644 src/tools/rust-analyzer/crates/mbe/src/syntax_bridge/tests.rs create mode 100644 src/tools/rust-analyzer/crates/mbe/src/to_parser_input.rs create mode 100644 src/tools/rust-analyzer/crates/mbe/src/tt_iter.rs create mode 100644 src/tools/rust-analyzer/crates/parser/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/parser/src/event.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/grammar.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/grammar/attributes.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/grammar/expressions.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/grammar/expressions/atom.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/grammar/generic_args.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/grammar/generic_params.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/grammar/items.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/grammar/items/adt.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/grammar/items/consts.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/grammar/items/traits.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/grammar/items/use_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/grammar/params.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/grammar/paths.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/grammar/patterns.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/grammar/types.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/input.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/lexed_str.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/output.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/parser.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/shortcuts.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/syntax_kind.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/syntax_kind/generated.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/tests.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/tests/prefix_entries.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/tests/sourcegen_inline_tests.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/tests/top_entries.rs create mode 100644 src/tools/rust-analyzer/crates/parser/src/token_set.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/byte_char_literals.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/byte_char_literals.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/byte_strings.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/byte_strings.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/c_strings.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/c_strings.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/char_literals.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/char_literals.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/strings.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/strings.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/block_comment.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/block_comment.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/block_comment.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0000_struct_field_missing_comma.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0000_struct_field_missing_comma.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0001_item_recovery_in_file.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0001_item_recovery_in_file.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0002_duplicate_shebang.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0002_duplicate_shebang.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0003_C++_semicolon.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0003_C++_semicolon.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0004_use_path_bad_segment.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0004_use_path_bad_segment.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0005_attribute_recover.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0005_attribute_recover.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0006_named_field_recovery.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0006_named_field_recovery.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0007_stray_curly_in_file.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0007_stray_curly_in_file.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0008_item_block_recovery.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0008_item_block_recovery.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0009_broken_struct_type_parameter.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0009_broken_struct_type_parameter.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0010_unsafe_lambda_block.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0010_unsafe_lambda_block.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0011_extern_struct.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0011_extern_struct.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0012_broken_lambda.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0013_invalid_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0013_invalid_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0014_where_no_bounds.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0014_where_no_bounds.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0015_curly_in_params.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0015_curly_in_params.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0016_missing_semi.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0016_missing_semi.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0017_incomplete_binexpr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0017_incomplete_binexpr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0018_incomplete_fn.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0018_incomplete_fn.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0019_let_recover.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0019_let_recover.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0020_fn_recover.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0020_fn_recover.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0021_incomplete_param.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0021_incomplete_param.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0022_bad_exprs.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0022_bad_exprs.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0023_mismatched_paren.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0023_mismatched_paren.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0024_many_type_parens.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0024_many_type_parens.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0025_nope.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0025_nope.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0026_imp_recovery.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0026_imp_recovery.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0027_incomplete_where_for.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0027_incomplete_where_for.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0029_field_completion.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0029_field_completion.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0032_match_arms_inner_attrs.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0032_match_arms_inner_attrs.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0033_match_arms_outer_attrs.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0033_match_arms_outer_attrs.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0034_bad_box_pattern.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0034_bad_box_pattern.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0035_use_recover.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0035_use_recover.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0036_partial_use.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0036_partial_use.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0039_lambda_recovery.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0039_lambda_recovery.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0042_weird_blocks.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0042_weird_blocks.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0043_unexpected_for_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0043_unexpected_for_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0044_item_modifiers.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0044_item_modifiers.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0047_repeated_extern_modifier.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0047_repeated_extern_modifier.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0048_double_fish.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0048_double_fish.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0049_let_else_right_curly_brace_for.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0049_let_else_right_curly_brace_for.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0050_let_else_right_curly_brace_loop.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0050_let_else_right_curly_brace_loop.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0051_let_else_right_curly_brace_match.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0051_let_else_right_curly_brace_match.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0052_let_else_right_curly_brace_while.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0052_let_else_right_curly_brace_while.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0053_let_else_right_curly_brace_if.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0053_let_else_right_curly_brace_if.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0054_float_split_scientific_notation.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/err/0054_float_split_scientific_notation.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0001_array_type_missing_semi.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0001_array_type_missing_semi.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0002_misplaced_label_err.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0002_misplaced_label_err.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0003_pointer_type_no_mutability.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0003_pointer_type_no_mutability.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0004_impl_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0004_impl_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0006_unsafe_block_in_mod.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0007_async_without_semicolon.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0007_async_without_semicolon.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0008_pub_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0008_pub_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0013_anonymous_static.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0013_anonymous_static.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0014_record_literal_missing_ellipsis_recovery.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0014_record_literal_missing_ellipsis_recovery.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0014_struct_field_recover.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0014_struct_field_recover.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0015_arg_list_recovery.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0015_arg_list_recovery.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0015_empty_segment.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0015_empty_segment.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0015_missing_fn_param_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0015_missing_fn_param_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0016_angled_path_without_qual.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0016_angled_path_without_qual.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0017_let_else_right_curly_brace.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0017_let_else_right_curly_brace.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0018_crate_visibility_empty_recover.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0018_crate_visibility_empty_recover.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0019_tuple_expr_leading_comma.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0019_tuple_expr_leading_comma.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0020_tuple_pat_leading_comma.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0020_tuple_pat_leading_comma.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0021_recover_from_missing_assoc_item_binding.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0021_recover_from_missing_assoc_item_binding.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0022_recover_from_missing_const_default.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0022_recover_from_missing_const_default.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0023_empty_param_slot.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0023_empty_param_slot.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0024_comma_after_functional_update_syntax.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0024_comma_after_functional_update_syntax.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0024_top_level_let.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0024_top_level_let.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0026_macro_rules_as_macro_name.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0026_macro_rules_as_macro_name.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0026_use_tree_list_err_recovery.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0026_use_tree_list_err_recovery.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0028_method_call_missing_argument_list.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0028_method_call_missing_argument_list.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0029_tuple_field_list_recovery.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0029_tuple_field_list_recovery.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0030_generic_arg_list_recover.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0030_generic_arg_list_recover.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0031_generic_param_list_recover.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0031_generic_param_list_recover.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0032_record_literal_field_eq_recovery.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0032_record_literal_field_eq_recovery.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0033_record_pat_field_eq_recovery.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0033_record_pat_field_eq_recovery.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0034_match_arms_recovery.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0034_match_arms_recovery.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0002_use_tree_list.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0002_use_tree_list.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0003_where_pred_for.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0003_where_pred_for.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0005_function_type_params.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0005_function_type_params.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0006_self_param.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0006_self_param.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0007_type_param_bounds.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0007_type_param_bounds.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0008_path_part.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0008_path_part.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0009_loop_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0009_loop_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0010_extern_block.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0010_extern_block.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0011_field_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0011_field_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0012_type_item_where_clause.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0012_type_item_where_clause.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0013_pointer_type_mut.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0013_pointer_type_mut.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0014_never_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0014_never_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0015_continue_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0015_continue_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0017_array_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0017_array_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0018_arb_self_types.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0018_arb_self_types.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0019_unary_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0019_unary_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0021_assoc_item_list.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0021_assoc_item_list.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0022_crate_visibility.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0022_crate_visibility.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0023_placeholder_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0023_placeholder_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0024_slice_pat.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0024_slice_pat.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0025_slice_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0025_slice_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0026_tuple_pat_fields.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0026_tuple_pat_fields.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0027_ref_pat.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0027_ref_pat.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0028_impl_trait_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0028_impl_trait_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0029_cast_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0029_cast_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0030_let_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0030_let_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0031_while_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0031_while_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0032_fn_pointer_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0032_fn_pointer_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0033_reference_type;.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0033_reference_type;.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0034_break_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0034_break_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0037_qual_paths.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0037_qual_paths.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0038_full_range_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0038_full_range_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0041_trait_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0041_trait_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0042_call_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0042_call_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0044_block_items.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0044_block_items.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0045_param_list_opt_patterns.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0046_singleton_tuple_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0046_singleton_tuple_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0048_path_type_with_bounds.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0048_path_type_with_bounds.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0050_fn_decl.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0050_fn_decl.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0051_unit_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0051_unit_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0052_path_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0052_path_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0053_path_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0053_path_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0054_record_field_attrs.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0054_record_field_attrs.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0055_literal_pattern.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0055_literal_pattern.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0056_where_clause.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0056_where_clause.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0058_range_pat.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0058_range_pat.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0059_match_arms_commas.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0059_match_arms_commas.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0060_extern_crate.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0060_extern_crate.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0061_record_lit.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0061_record_lit.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0062_mod_contents.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0062_mod_contents.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0063_impl_item_neg.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0063_impl_item_neg.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0064_if_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0064_if_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0065_dyn_trait_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0065_dyn_trait_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0066_match_arm.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0066_match_arm.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0067_crate_path.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0067_crate_path.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0071_match_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0071_match_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0072_return_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0072_return_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0073_type_item_type_params.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0073_type_item_type_params.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0075_block.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0075_block.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0076_function_where_clause.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0076_function_where_clause.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0077_try_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0077_try_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0078_type_alias.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0078_type_alias.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0079_impl_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0079_impl_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0080_postfix_range.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0080_postfix_range.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0081_for_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0081_for_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0082_ref_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0082_ref_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0083_struct_items.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0084_paren_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0084_paren_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0085_expr_literals.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0085_expr_literals.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0086_function_ret_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0086_function_ret_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0088_break_ambiguity.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0088_break_ambiguity.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0090_type_param_default.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0090_type_param_default.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0093_index_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0093_index_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0095_placeholder_pat.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0095_placeholder_pat.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0096_no_semi_after_block.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0096_no_semi_after_block.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0099_param_list.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0099_param_list.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0100_for_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0100_for_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0102_record_pat_field_list.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0102_record_pat_field_list.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0103_array_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0103_array_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0104_path_fn_trait_args.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0104_path_fn_trait_args.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0106_lambda_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0106_lambda_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0107_method_call_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0107_method_call_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0108_tuple_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0108_tuple_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0109_label.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0109_label.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0111_tuple_pat.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0111_tuple_pat.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0112_bind_pat.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0112_bind_pat.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0113_nocontentexpr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0113_nocontentexpr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0114_tuple_struct_where.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0114_tuple_struct_where.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0115_tuple_field_attrs.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0115_tuple_field_attrs.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0117_macro_call_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0117_macro_call_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0118_match_guard.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0118_match_guard.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0123_param_list_vararg.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0123_param_list_vararg.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0129_marco_pat.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0129_marco_pat.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0130_let_stmt.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0130_let_stmt.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0130_try_block_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0130_try_block_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0131_existential_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0131_existential_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0137_await_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0137_await_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0138_associated_type_bounds.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0138_associated_type_bounds.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0138_expression_after_block.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0138_expression_after_block.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0138_self_param_outer_attr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0138_self_param_outer_attr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0139_param_outer_arg.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0139_param_outer_arg.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0142_for_range_from.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0142_for_range_from.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0143_box_pat.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0143_box_pat.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0144_dot_dot_pat.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0144_dot_dot_pat.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0145_record_pat_field.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0145_record_pat_field.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0146_as_precedence.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0146_as_precedence.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0147_const_param.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0147_const_param.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0147_macro_def.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0147_macro_def.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0150_array_attrs.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0150_array_attrs.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0150_impl_type_params.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0150_impl_type_params.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0151_fn.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0151_fn.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0151_trait_alias.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0151_trait_alias.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0152_arg_with_attr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0152_arg_with_attr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0153_pub_parens_typepath.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0153_pub_parens_typepath.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0154_no_dyn_trait_leading_for.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0154_no_dyn_trait_leading_for.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0154_tuple_attrs.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0154_tuple_attrs.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0155_closure_params.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0155_closure_params.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0156_const_block_pat.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0156_const_block_pat.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0156_fn_def_param.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0156_fn_def_param.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0156_or_pattern.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0156_or_pattern.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0157_variant_discriminant.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0157_variant_discriminant.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0158_binop_resets_statementness.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0158_binop_resets_statementness.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0158_lambda_ret_block.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0158_lambda_ret_block.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0158_macro_rules_non_brace.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0158_macro_rules_non_brace.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0159_try_macro_fallback.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0159_try_macro_fallback.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0159_yield_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0159_yield_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0160_crate_visibility_in.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0160_crate_visibility_in.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0160_try_macro_rules.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0160_try_macro_rules.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0161_impl_item_const.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0161_impl_item_const.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0161_labeled_block.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0161_labeled_block.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0162_default_async_unsafe_fn.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0162_default_async_unsafe_fn.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0163_default_async_fn.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0163_default_async_fn.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0163_default_unsafe_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0163_default_unsafe_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0164_default_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0164_default_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0164_type_path_in_pattern.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0164_type_path_in_pattern.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0166_half_open_range_pat.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0166_half_open_range_pat.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0168_extern_crate_rename.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0168_extern_crate_rename.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0168_extern_crate_self.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0168_extern_crate_self.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0169_mod_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0169_mod_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0170_mod_item_curly.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0170_mod_item_curly.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0170_tuple_struct.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0170_tuple_struct.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0171_struct_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0171_struct_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0172_const_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0172_const_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0172_record_field_list.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0172_record_field_list.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0173_anonymous_const.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0173_anonymous_const.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0173_macro_def_curly.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0173_macro_def_curly.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0173_union_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0173_union_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0174_trait_item_generic_params.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0174_trait_item_generic_params.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0174_unit_struct.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0174_unit_struct.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0174_use_tree_star.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0174_use_tree_star.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0175_trait_item_bounds.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0175_trait_item_bounds.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0176_trait_item_where_clause.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0176_trait_item_where_clause.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0176_use_tree_alias.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0176_use_tree_alias.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0177_assoc_item_list_inner_attrs.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0177_assoc_item_list_inner_attrs.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0177_trait_alias_where_clause.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0177_trait_alias_where_clause.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0177_use_tree.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0177_use_tree.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0177_use_tree_path.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0177_use_tree_path.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0178_use_tree_path_use_tree.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0178_use_tree_path_use_tree.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0179_use_tree_abs_star.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0179_use_tree_abs_star.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0180_use_tree_path_star.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0180_use_tree_path_star.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0181_generic_param_attribute.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0181_generic_param_attribute.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0181_use_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0181_use_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0182_lifetime_param.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0182_lifetime_param.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0183_const_arg_block.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0183_const_arg_block.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0183_type_param.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0183_type_param.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0184_const_arg.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0184_const_arg.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0184_generic_param_list.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0184_generic_param_list.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0185_assoc_type_bound.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0185_assoc_type_bound.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0186_lifetime_arg.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0186_lifetime_arg.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0187_assoc_type_eq.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0187_assoc_type_eq.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0188_const_param_default_path.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0188_const_param_default_path.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0189_const_arg_literal.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0189_const_arg_literal.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0190_generic_arg.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0190_generic_arg.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0191_const_arg_negative_number.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0191_const_arg_negative_number.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0192_const_arg_bool_literal.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0192_const_arg_bool_literal.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0193_let_stmt_init.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0193_let_stmt_init.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0194_let_else.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0194_let_else.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0194_let_stmt_ascription.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0194_let_stmt_ascription.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0194_macro_inside_generic_arg.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0194_macro_inside_generic_arg.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0196_pub_tuple_field.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0196_pub_tuple_field.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0197_destructuring_assignment_struct_rest_pattern.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0197_destructuring_assignment_struct_rest_pattern.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0198_destructuring_assignment_wildcard_pat.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0198_destructuring_assignment_wildcard_pat.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0199_const_param_default_expression.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0199_const_param_default_expression.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0199_effect_blocks.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0199_effect_blocks.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0199_type_item_where_clause_deprecated.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0199_type_item_where_clause_deprecated.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0200_assoc_const_eq.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0200_assoc_const_eq.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0200_const_param_default_literal.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0200_const_param_default_literal.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0201_question_for_type_trait_bound.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0201_question_for_type_trait_bound.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0202_typepathfn_with_coloncolon.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0202_typepathfn_with_coloncolon.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0203_closure_body_underscore_assignment.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0203_closure_body_underscore_assignment.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0204_yeet_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0204_yeet_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0205_const_closure.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0205_const_closure.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0207_builtin_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0207_builtin_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0207_exclusive_range_pat.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0207_exclusive_range_pat.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0208_associated_return_type_bounds.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0208_associated_return_type_bounds.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0208_bare_dyn_types_with_leading_lifetime.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0208_bare_dyn_types_with_leading_lifetime.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0208_closure_range_method_call.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0208_closure_range_method_call.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0208_macro_rules_as_macro_name.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0208_macro_rules_as_macro_name.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0209_bare_dyn_types_with_paren_as_generic_args.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0209_bare_dyn_types_with_paren_as_generic_args.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0209_become_expr.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0209_become_expr.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0211_async_trait_bound.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0211_async_trait_bound.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0212_const_trait_bound.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0212_const_trait_bound.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0000_empty.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0000_empty.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0001_struct_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0001_struct_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0002_struct_item_field.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0002_struct_item_field.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0004_file_shebang.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0004_file_shebang.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0005_fn_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0005_fn_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0006_inner_attributes.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0006_inner_attributes.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0007_extern_crate.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0007_extern_crate.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0008_mod_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0008_mod_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0009_use_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0009_use_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0010_use_path_segments.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0010_use_path_segments.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0011_outer_attribute.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0011_outer_attribute.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0012_visibility.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0012_visibility.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0013_use_path_self_super.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0013_use_path_self_super.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0014_use_tree.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0014_use_tree.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0015_use_tree.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0015_use_tree.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0016_struct_flavors.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0016_struct_flavors.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0017_attr_trailing_comma.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0017_attr_trailing_comma.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0018_struct_type_params.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0018_struct_type_params.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0019_enums.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0019_enums.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0020_type_param_bounds.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0020_type_param_bounds.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0022_empty_extern_block.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0022_empty_extern_block.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0023_static_items.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0023_static_items.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0024_const_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0024_const_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0025_extern_fn_in_block.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0025_extern_fn_in_block.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0026_const_fn_in_block.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0026_const_fn_in_block.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0027_unsafe_fn_in_block.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0027_unsafe_fn_in_block.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0028_operator_binding_power.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0028_operator_binding_power.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0029_range_forms.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0029_range_forms.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0030_string_suffixes.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0030_string_suffixes.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0030_traits.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0030_traits.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0031_extern.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0031_extern.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0032_where_for.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0032_where_for.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0033_label_break.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0033_label_break.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0034_crate_path_in_call.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0034_crate_path_in_call.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0035_weird_exprs.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0035_weird_exprs.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0036_fully_qualified.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0036_fully_qualified.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0037_mod.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0037_mod.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0038_where_pred_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0038_where_pred_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0039_raw_fn_item.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0039_raw_fn_item.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0040_raw_struct_item_field.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0040_raw_struct_item_field.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0041_raw_keywords.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0041_raw_keywords.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0042_ufcs_call_list.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0042_ufcs_call_list.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0043_complex_assignment.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0043_complex_assignment.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0044_let_attrs.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0044_let_attrs.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0045_block_attrs.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0045_block_attrs.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0046_extern_inner_attributes.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0046_extern_inner_attributes.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0047_minus_in_inner_pattern.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0047_minus_in_inner_pattern.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0048_compound_assignment.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0048_compound_assignment.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0049_async_block.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0049_async_block.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0050_async_block_as_argument.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0050_async_block_as_argument.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0051_parameter_attrs.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0051_parameter_attrs.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0052_for_range_block.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0052_for_range_block.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0053_outer_attribute_on_macro_rules.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0053_outer_attribute_on_macro_rules.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0054_qual_path_in_type_arg.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0054_qual_path_in_type_arg.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0055_dot_dot_dot.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0055_dot_dot_dot.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0056_neq_in_type.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0056_neq_in_type.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0057_loop_in_call.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0057_loop_in_call.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0058_unary_expr_precedence.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0058_unary_expr_precedence.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0059_loops_in_parens.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0059_loops_in_parens.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0060_as_range.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0060_as_range.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0061_match_full_range.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0061_match_full_range.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0062_macro_2.0.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0062_macro_2.0.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0063_trait_fn_patterns.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0063_trait_fn_patterns.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0063_variadic_fun.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0063_variadic_fun.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0064_impl_fn_params.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0064_impl_fn_params.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0065_comment_newline.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0065_comment_newline.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0065_plus_after_fn_trait_bound.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0065_plus_after_fn_trait_bound.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0066_default_modifier.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0066_default_modifier.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0067_where_for_pred.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0067_where_for_pred.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0068_item_modifiers.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0068_item_modifiers.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0069_multi_trait_object.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0069_multi_trait_object.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0070_expr_attr_placement.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0070_expr_attr_placement.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0071_stmt_attr_placement.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0071_stmt_attr_placement.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0072_destructuring_assignment.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0072_destructuring_assignment.rs create mode 100644 src/tools/rust-analyzer/crates/paths/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/paths/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-api/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/proc-macro-api/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-api/src/msg.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-api/src/msg/flat.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-api/src/process.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-api/src/version.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv-cli/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv-cli/src/main.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/build.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/proc-macro-test/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/proc-macro-test/build.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/proc-macro-test/imp/.gitignore create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/proc-macro-test/imp/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/proc-macro-test/imp/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/proc-macro-test/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/src/dylib.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/src/proc_macros.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/src/server.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/src/server/rust_analyzer_span.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/src/server/symbol.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/src/server/token_id.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/src/server/token_stream.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/src/tests/mod.rs create mode 100644 src/tools/rust-analyzer/crates/proc-macro-srv/src/tests/utils.rs create mode 100644 src/tools/rust-analyzer/crates/profile/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/profile/src/google_cpu_profiler.rs create mode 100644 src/tools/rust-analyzer/crates/profile/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/profile/src/memory_usage.rs create mode 100644 src/tools/rust-analyzer/crates/profile/src/stop_watch.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/project-model/src/build_scripts.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/src/cargo_workspace.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/src/cfg_flag.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/src/manifest_path.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/src/project_json.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/src/rustc_cfg.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/src/sysroot.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/src/target_data_layout.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/src/tests.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/src/workspace.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/fake-sysroot/alloc/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/fake-sysroot/core/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/fake-sysroot/panic_abort/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/fake-sysroot/panic_unwind/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/fake-sysroot/proc_macro/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/fake-sysroot/profiler_builtins/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/fake-sysroot/std/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/fake-sysroot/stdarch/crates/std_detect/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/fake-sysroot/term/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/fake-sysroot/test/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/fake-sysroot/unwind/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/hello-world-metadata.json create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/hello-world-project.json create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/is-proc-macro-project.json create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/output/cargo_hello_world_project_model.txt create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/output/cargo_hello_world_project_model_with_selective_overrides.txt create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/output/cargo_hello_world_project_model_with_wildcard_overrides.txt create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/output/rust_project_hello_world_project_model.txt create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/regex-metadata.json create mode 100644 src/tools/rust-analyzer/crates/project-model/test_data/ripgrep-metadata.json create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/build.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/bin/main.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/bin/rustc_wrapper.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/caps.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/cargo_target_spec.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/cli.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/cli/analysis_stats.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/cli/diagnostics.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/cli/flags.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/cli/highlight.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/cli/lsif.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/cli/parse.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/cli/progress_report.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/cli/run_tests.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/cli/rustc_tests.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/cli/ssr.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/cli/symbols.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/config/patch_old_style.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/test_data/clippy_pass_by_ref.txt create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/test_data/handles_macro_location.txt create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/test_data/macro_compiler_error.txt create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/test_data/reasonable_line_numbers_from_empty_file.txt create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/test_data/rustc_incompatible_type_for_trait.txt create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/test_data/rustc_mismatched_type.txt create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/test_data/rustc_range_map_lsp_position.txt create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable.txt create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_hint.txt create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_info.txt create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/test_data/rustc_wrong_number_of_parameters.txt create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/to_proto.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/diff.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/dispatch.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/global_state.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/hack_recover_crate_name.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/notification.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/request.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/integrated_benchmarks.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/line_index.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/lsp.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/lsp/ext.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/lsp/from_proto.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/lsp/semantic_tokens.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/lsp/to_proto.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/lsp/utils.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/mem_docs.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/op_queue.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/task_pool.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/tracing/config.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/tracing/hprof.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/src/version.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/tests/crate_graph.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/tests/slow-tests/main.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/tests/slow-tests/sourcegen.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/tests/slow-tests/support.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/tests/slow-tests/testdir.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/tests/slow-tests/tidy.rs create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/tests/test_data/deduplication_crate_graph_A.json create mode 100644 src/tools/rust-analyzer/crates/rust-analyzer/tests/test_data/deduplication_crate_graph_B.json create mode 100644 src/tools/rust-analyzer/crates/salsa/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/salsa/FAQ.md create mode 100644 src/tools/rust-analyzer/crates/salsa/LICENSE-APACHE create mode 100644 src/tools/rust-analyzer/crates/salsa/LICENSE-MIT create mode 100644 src/tools/rust-analyzer/crates/salsa/README.md create mode 100644 src/tools/rust-analyzer/crates/salsa/salsa-macros/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/salsa/salsa-macros/LICENSE-APACHE create mode 100644 src/tools/rust-analyzer/crates/salsa/salsa-macros/LICENSE-MIT create mode 100644 src/tools/rust-analyzer/crates/salsa/salsa-macros/README.md create mode 100644 src/tools/rust-analyzer/crates/salsa/salsa-macros/src/database_storage.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/salsa-macros/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/salsa-macros/src/parenthesized.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/salsa-macros/src/query_group.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/debug.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/derived.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/derived/slot.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/durability.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/hash.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/input.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/intern_id.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/interned.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/lru.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/plumbing.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/revision.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/runtime.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/runtime/dependency_graph.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/runtime/local_state.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/src/storage.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/cycles.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/dyn_trait.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/incremental/constants.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/incremental/counter.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/incremental/implementation.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/incremental/log.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/incremental/main.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/incremental/memoized_dep_inputs.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/incremental/memoized_inputs.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/incremental/memoized_volatile.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/interned.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/lru.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/macros.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/no_send_sync.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/on_demand_inputs.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/panic_safely.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/parallel/cancellation.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/parallel/frozen.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/parallel/independent.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/parallel/main.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/parallel/parallel_cycle_all_recover.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/parallel/parallel_cycle_mid_recover.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/parallel/parallel_cycle_none_recover.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/parallel/parallel_cycle_one_recovers.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/parallel/race.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/parallel/setup.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/parallel/signal.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/parallel/stress.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/parallel/true_parallel.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/storage_varieties/implementation.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/storage_varieties/main.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/storage_varieties/queries.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/storage_varieties/tests.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/transparent.rs create mode 100644 src/tools/rust-analyzer/crates/salsa/tests/variadic.rs create mode 100644 src/tools/rust-analyzer/crates/sourcegen/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/sourcegen/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/span/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/span/src/ast_id.rs create mode 100644 src/tools/rust-analyzer/crates/span/src/hygiene.rs create mode 100644 src/tools/rust-analyzer/crates/span/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/span/src/map.rs create mode 100644 src/tools/rust-analyzer/crates/stdx/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/stdx/src/anymap.rs create mode 100644 src/tools/rust-analyzer/crates/stdx/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/stdx/src/macros.rs create mode 100644 src/tools/rust-analyzer/crates/stdx/src/non_empty_vec.rs create mode 100644 src/tools/rust-analyzer/crates/stdx/src/panic_context.rs create mode 100644 src/tools/rust-analyzer/crates/stdx/src/process.rs create mode 100644 src/tools/rust-analyzer/crates/stdx/src/rand.rs create mode 100644 src/tools/rust-analyzer/crates/stdx/src/thread.rs create mode 100644 src/tools/rust-analyzer/crates/stdx/src/thread/intent.rs create mode 100644 src/tools/rust-analyzer/crates/stdx/src/thread/pool.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/syntax/fuzz/.gitignore create mode 100644 src/tools/rust-analyzer/crates/syntax/fuzz/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/syntax/fuzz/fuzz_targets/parser.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/fuzz/fuzz_targets/reparse.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/rust.ungram create mode 100644 src/tools/rust-analyzer/crates/syntax/src/algo.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/ast.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/ast/edit.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/ast/edit_in_place.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/ast/expr_ext.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/ast/generated.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/ast/generated/nodes.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/ast/generated/tokens.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/ast/make.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/ast/node_ext.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/ast/operators.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/ast/prec.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/ast/token_ext.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/ast/traits.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/fuzz.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/hacks.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/parsing.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/parsing/reparsing.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/ptr.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/syntax_error.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/syntax_node.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/ted.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/tests.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/token_text.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/utils.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/validation.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/src/validation/block.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/fuzz-failures/0000.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/fuzz-failures/0001.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/fuzz-failures/0002.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/fuzz-failures/0003.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/fuzz-failures/0004.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0031_block_inner_attrs.rast create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0031_block_inner_attrs.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0037_visibility_in_traits.rast create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0037_visibility_in_traits.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0038_endless_inclusive_range.rast create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0038_endless_inclusive_range.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0040_illegal_crate_kw_location.rast create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0040_illegal_crate_kw_location.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0041_illegal_self_keyword_location.rast create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0041_illegal_self_keyword_location.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0045_ambiguous_trait_object.rast create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0045_ambiguous_trait_object.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0046_mutable_const_item.rast create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0046_mutable_const_item.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/invalid_let_expr.rast create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/invalid_let_expr.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/reparse/fuzz-failures/0000.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/reparse/fuzz-failures/0001.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/reparse/fuzz-failures/0002.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/reparse/fuzz-failures/0003.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/reparse/fuzz-failures/0004.rs create mode 100644 src/tools/rust-analyzer/crates/syntax/test_data/reparse/fuzz-failures/0005.rs create mode 100644 src/tools/rust-analyzer/crates/test-fixture/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/test-fixture/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/test-utils/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/test-utils/src/assert_linear.rs create mode 100644 src/tools/rust-analyzer/crates/test-utils/src/bench_fixture.rs create mode 100644 src/tools/rust-analyzer/crates/test-utils/src/fixture.rs create mode 100644 src/tools/rust-analyzer/crates/test-utils/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/test-utils/src/minicore.rs create mode 100644 src/tools/rust-analyzer/crates/text-edit/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/text-edit/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/toolchain/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/toolchain/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/tt/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/tt/src/buffer.rs create mode 100644 src/tools/rust-analyzer/crates/tt/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/vfs-notify/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/vfs-notify/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/vfs/Cargo.toml create mode 100644 src/tools/rust-analyzer/crates/vfs/src/anchored_path.rs create mode 100644 src/tools/rust-analyzer/crates/vfs/src/file_set.rs create mode 100644 src/tools/rust-analyzer/crates/vfs/src/file_set/tests.rs create mode 100644 src/tools/rust-analyzer/crates/vfs/src/lib.rs create mode 100644 src/tools/rust-analyzer/crates/vfs/src/loader.rs create mode 100644 src/tools/rust-analyzer/crates/vfs/src/path_interner.rs create mode 100644 src/tools/rust-analyzer/crates/vfs/src/vfs_path.rs create mode 100644 src/tools/rust-analyzer/crates/vfs/src/vfs_path/tests.rs create mode 100644 src/tools/rust-analyzer/docs/dev/README.md create mode 100644 src/tools/rust-analyzer/docs/dev/architecture.md create mode 100644 src/tools/rust-analyzer/docs/dev/debugging.md create mode 100644 src/tools/rust-analyzer/docs/dev/guide.md create mode 100644 src/tools/rust-analyzer/docs/dev/lsp-extensions.md create mode 100644 src/tools/rust-analyzer/docs/dev/style.md create mode 100644 src/tools/rust-analyzer/docs/dev/syntax.md create mode 100644 src/tools/rust-analyzer/docs/user/.gitignore create mode 100644 src/tools/rust-analyzer/docs/user/generated_config.adoc create mode 100644 src/tools/rust-analyzer/docs/user/manual.adoc create mode 100644 src/tools/rust-analyzer/editors/code/.eslintignore create mode 100644 src/tools/rust-analyzer/editors/code/.eslintrc.js create mode 100644 src/tools/rust-analyzer/editors/code/.gitignore create mode 100644 src/tools/rust-analyzer/editors/code/.prettierignore create mode 100644 src/tools/rust-analyzer/editors/code/.prettierrc.js create mode 100644 src/tools/rust-analyzer/editors/code/.vscodeignore create mode 100644 src/tools/rust-analyzer/editors/code/LICENSE create mode 100644 src/tools/rust-analyzer/editors/code/README.md create mode 100644 src/tools/rust-analyzer/editors/code/icon.png create mode 100644 src/tools/rust-analyzer/editors/code/language-configuration.json create mode 100644 src/tools/rust-analyzer/editors/code/package-lock.json create mode 100644 src/tools/rust-analyzer/editors/code/package.json create mode 100644 src/tools/rust-analyzer/editors/code/ra_syntax_tree.tmGrammar.json create mode 100644 src/tools/rust-analyzer/editors/code/src/ast_inspector.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/bootstrap.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/client.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/commands.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/config.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/ctx.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/debug.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/dependencies_provider.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/diagnostics.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/lang_client.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/lsp_ext.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/main.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/nullable.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/persistent_state.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/run.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/rust_project.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/snippets.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/tasks.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/test_explorer.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/toolchain.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/undefinable.ts create mode 100644 src/tools/rust-analyzer/editors/code/src/util.ts create mode 100644 src/tools/rust-analyzer/editors/code/tests/runTests.ts create mode 100644 src/tools/rust-analyzer/editors/code/tests/unit/index.ts create mode 100644 src/tools/rust-analyzer/editors/code/tests/unit/launch_config.test.ts create mode 100644 src/tools/rust-analyzer/editors/code/tests/unit/runnable_env.test.ts create mode 100644 src/tools/rust-analyzer/editors/code/tests/unit/settings.test.ts create mode 100644 src/tools/rust-analyzer/editors/code/tsconfig.eslint.json create mode 100644 src/tools/rust-analyzer/editors/code/tsconfig.json create mode 100644 src/tools/rust-analyzer/lib/README.md create mode 100644 src/tools/rust-analyzer/lib/la-arena/Cargo.toml create mode 100644 src/tools/rust-analyzer/lib/la-arena/src/lib.rs create mode 100644 src/tools/rust-analyzer/lib/la-arena/src/map.rs create mode 100644 src/tools/rust-analyzer/lib/line-index/Cargo.toml create mode 100644 src/tools/rust-analyzer/lib/line-index/README.md create mode 100644 src/tools/rust-analyzer/lib/line-index/src/lib.rs create mode 100644 src/tools/rust-analyzer/lib/line-index/src/tests.rs create mode 100644 src/tools/rust-analyzer/lib/lsp-server/Cargo.toml create mode 120000 src/tools/rust-analyzer/lib/lsp-server/LICENSE-APACHE create mode 120000 src/tools/rust-analyzer/lib/lsp-server/LICENSE-MIT create mode 100644 src/tools/rust-analyzer/lib/lsp-server/examples/goto_def.rs create mode 100644 src/tools/rust-analyzer/lib/lsp-server/src/error.rs create mode 100644 src/tools/rust-analyzer/lib/lsp-server/src/lib.rs create mode 100644 src/tools/rust-analyzer/lib/lsp-server/src/msg.rs create mode 100644 src/tools/rust-analyzer/lib/lsp-server/src/req_queue.rs create mode 100644 src/tools/rust-analyzer/lib/lsp-server/src/socket.rs create mode 100644 src/tools/rust-analyzer/lib/lsp-server/src/stdio.rs create mode 100644 src/tools/rust-analyzer/rust-bors.toml create mode 100644 src/tools/rust-analyzer/rustfmt.toml create mode 100644 src/tools/rust-analyzer/triagebot.toml create mode 100644 src/tools/rust-analyzer/xtask/Cargo.toml create mode 100644 src/tools/rust-analyzer/xtask/src/codegen.rs create mode 100644 src/tools/rust-analyzer/xtask/src/codegen/assists_doc_tests.rs create mode 100644 src/tools/rust-analyzer/xtask/src/codegen/diagnostics_docs.rs create mode 100644 src/tools/rust-analyzer/xtask/src/codegen/grammar.rs create mode 100644 src/tools/rust-analyzer/xtask/src/codegen/grammar/ast_src.rs create mode 100644 src/tools/rust-analyzer/xtask/src/codegen/lints.rs create mode 100644 src/tools/rust-analyzer/xtask/src/dist.rs create mode 100644 src/tools/rust-analyzer/xtask/src/flags.rs create mode 100644 src/tools/rust-analyzer/xtask/src/install.rs create mode 100644 src/tools/rust-analyzer/xtask/src/main.rs create mode 100644 src/tools/rust-analyzer/xtask/src/metrics.rs create mode 100644 src/tools/rust-analyzer/xtask/src/publish.rs create mode 100644 src/tools/rust-analyzer/xtask/src/publish/notes.rs create mode 100644 src/tools/rust-analyzer/xtask/src/release.rs create mode 100644 src/tools/rust-analyzer/xtask/src/release/changelog.rs create mode 100644 src/tools/rust-analyzer/xtask/test_data/expected.md create mode 100644 src/tools/rust-analyzer/xtask/test_data/input.adoc diff --git a/src/tools/rust-analyzer/.cargo/config.toml b/src/tools/rust-analyzer/.cargo/config.toml new file mode 100644 index 00000000000..070560dfbc3 --- /dev/null +++ b/src/tools/rust-analyzer/.cargo/config.toml @@ -0,0 +1,12 @@ +[alias] +xtask = "run --package xtask --bin xtask --" +tq = "test -- -q" +qt = "tq" +lint = "clippy --all-targets -- --cap-lints warn" +codegen = "run --package xtask --bin xtask -- codegen" + +[target.x86_64-pc-windows-msvc] +linker = "rust-lld" + +[env] +CARGO_WORKSPACE_DIR = { value = "", relative = true } diff --git a/src/tools/rust-analyzer/.editorconfig b/src/tools/rust-analyzer/.editorconfig new file mode 100644 index 00000000000..e337066f7ea --- /dev/null +++ b/src/tools/rust-analyzer/.editorconfig @@ -0,0 +1,17 @@ +# https://EditorConfig.org +root = true + +[*] +charset = utf-8 +trim_trailing_whitespace = true +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 +max_line_length = 100 + +[*.md] +indent_size = 2 + +[*.{yml, yaml}] +indent_size = 2 diff --git a/src/tools/rust-analyzer/.git-blame-ignore-revs b/src/tools/rust-analyzer/.git-blame-ignore-revs new file mode 100644 index 00000000000..a302e23781a --- /dev/null +++ b/src/tools/rust-analyzer/.git-blame-ignore-revs @@ -0,0 +1,8 @@ +# for this file to take effect make sure you use git ^2.23 and +# add ignoreFile to your git configuration: +# ``` +# git config --global blame.ignoreRevsFile .git-blame-ignore-revs +# ``` + +# prettier format +f247090558c9ba3c551566eae5882b7ca865225f diff --git a/src/tools/rust-analyzer/.gitattributes b/src/tools/rust-analyzer/.gitattributes new file mode 100644 index 00000000000..cb87b5d0138 --- /dev/null +++ b/src/tools/rust-analyzer/.gitattributes @@ -0,0 +1,9 @@ +* text=auto eol=lf + +# git grep shouldn't match entries in this benchmark data +bench_data/** binary + +# Older git versions try to fix line endings on images, this prevents it. +*.png binary +*.jpg binary +*.ico binary diff --git a/src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/bug_report.md b/src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000000..97c1b64494d --- /dev/null +++ b/src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Create a bug report for rust-analyzer. +title: '' +labels: 'C-bug' +assignees: '' + +--- + + + +**rust-analyzer version**: (eg. output of "rust-analyzer: Show RA Version" command, accessible in VSCode via Ctrl/⌘+Shift+P) + +**rustc version**: (eg. output of `rustc -V`) + +**relevant settings**: (eg. client settings, or environment variables like `CARGO`, `RUSTC`, `RUSTUP_HOME` or `CARGO_HOME`) + +**repository link (if public, optional)**: (eg. [rust-analyzer](https://github.com/rust-lang/rust-analyzer)) + +**code snippet to reproduce**: +```rust +// add your code here + +``` diff --git a/src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/critical_nightly_regression.md b/src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/critical_nightly_regression.md new file mode 100644 index 00000000000..ad220ff65ca --- /dev/null +++ b/src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/critical_nightly_regression.md @@ -0,0 +1,16 @@ +--- +name: Critical Nightly Regression +about: You are using nightly rust-analyzer and the latest version is unusable. +title: '' +labels: 'Broken Window' +assignees: '' + +--- + + + +This is a serious regression in nightly and it's important to fix it before the next release. diff --git a/src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/feature_request.md b/src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000000..5207957c459 --- /dev/null +++ b/src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,8 @@ +--- +name: Feature Request +about: Create a feature request for rust-analyzer. +title: '' +labels: 'C-feature' +assignees: '' + +--- diff --git a/src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/question.md b/src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 00000000000..a90ade882bd --- /dev/null +++ b/src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,8 @@ +--- +name: Support Question +about: A question regarding functionality of rust-analyzer. +title: '' +labels: 'C-support' +assignees: '' + +--- diff --git a/src/tools/rust-analyzer/.github/actions/github-release/Dockerfile b/src/tools/rust-analyzer/.github/actions/github-release/Dockerfile new file mode 100644 index 00000000000..5849eac7d24 --- /dev/null +++ b/src/tools/rust-analyzer/.github/actions/github-release/Dockerfile @@ -0,0 +1,8 @@ +FROM node:slim + +COPY . /action +WORKDIR /action + +RUN npm install --production + +ENTRYPOINT ["node", "/action/main.js"] diff --git a/src/tools/rust-analyzer/.github/actions/github-release/README.md b/src/tools/rust-analyzer/.github/actions/github-release/README.md new file mode 100644 index 00000000000..c8ff3ec6e52 --- /dev/null +++ b/src/tools/rust-analyzer/.github/actions/github-release/README.md @@ -0,0 +1,21 @@ +# github-release + +Copy-pasted from +https://github.com/bytecodealliance/wasmtime/tree/8acfdbdd8aa550d1b84e0ce1e6222a6605d14e38/.github/actions/github-release + +An action used to publish GitHub releases for `wasmtime`. + +As of the time of this writing there's a few actions floating around which +perform github releases but they all tend to have their set of drawbacks. +Additionally nothing handles deleting releases which we need for our rolling +`dev` release. + +To handle all this, this action rolls its own implementation using the +actions/toolkit repository and packages published there. These run in a Docker +container and take various inputs to orchestrate the release from the build. + +More comments can be found in `main.js`. + +Testing this is really hard. If you want to try though run `npm install` and +then `node main.js`. You'll have to configure a bunch of env vars though to get +anything reasonably working. diff --git a/src/tools/rust-analyzer/.github/actions/github-release/action.yml b/src/tools/rust-analyzer/.github/actions/github-release/action.yml new file mode 100644 index 00000000000..51a074adfaa --- /dev/null +++ b/src/tools/rust-analyzer/.github/actions/github-release/action.yml @@ -0,0 +1,15 @@ +name: 'wasmtime github releases' +description: 'wasmtime github releases' +inputs: + token: + description: '' + required: true + name: + description: '' + required: true + files: + description: '' + required: true +runs: + using: 'docker' + image: 'Dockerfile' diff --git a/src/tools/rust-analyzer/.github/actions/github-release/main.js b/src/tools/rust-analyzer/.github/actions/github-release/main.js new file mode 100644 index 00000000000..e8dba398733 --- /dev/null +++ b/src/tools/rust-analyzer/.github/actions/github-release/main.js @@ -0,0 +1,144 @@ +const core = require('@actions/core'); +const path = require("path"); +const fs = require("fs"); +const github = require('@actions/github'); +const glob = require('glob'); + +function sleep(milliseconds) { + return new Promise(resolve => setTimeout(resolve, milliseconds)); +} + +async function runOnce() { + // Load all our inputs and env vars. Note that `getInput` reads from `INPUT_*` + const files = core.getInput('files'); + const name = core.getInput('name'); + const token = core.getInput('token'); + const slug = process.env.GITHUB_REPOSITORY; + const owner = slug.split('/')[0]; + const repo = slug.split('/')[1]; + const sha = process.env.HEAD_SHA; + + core.info(`files: ${files}`); + core.info(`name: ${name}`); + + const options = { + request: { + timeout: 30000, + } + }; + const octokit = github.getOctokit(token, options); + + // Delete the previous release since we can't overwrite one. This may happen + // due to retrying an upload or it may happen because we're doing the dev + // release. + const releases = await octokit.paginate("GET /repos/:owner/:repo/releases", { owner, repo }); + for (const release of releases) { + if (release.tag_name !== name) { + continue; + } + const release_id = release.id; + core.info(`deleting release ${release_id}`); + await octokit.rest.repos.deleteRelease({ owner, repo, release_id }); + } + + // We also need to update the `dev` tag while we're at it on the `dev` branch. + if (name == 'nightly') { + try { + core.info(`updating nightly tag`); + await octokit.rest.git.updateRef({ + owner, + repo, + ref: 'tags/nightly', + sha, + force: true, + }); + } catch (e) { + core.error(e); + core.info(`creating nightly tag`); + await octokit.rest.git.createTag({ + owner, + repo, + tag: 'nightly', + message: 'nightly release', + object: sha, + type: 'commit', + }); + } + } + + // Creates an official GitHub release for this `tag`, and if this is `dev` + // then we know that from the previous block this should be a fresh release. + core.info(`creating a release`); + const release = await octokit.rest.repos.createRelease({ + owner, + repo, + name, + tag_name: name, + target_commitish: sha, + prerelease: name === 'nightly', + }); + const release_id = release.data.id; + + // Upload all the relevant assets for this release as just general blobs. + for (const file of glob.sync(files)) { + const size = fs.statSync(file).size; + const name = path.basename(file); + + await runWithRetry(async function () { + // We can't overwrite assets, so remove existing ones from a previous try. + let assets = await octokit.rest.repos.listReleaseAssets({ + owner, + repo, + release_id + }); + for (const asset of assets.data) { + if (asset.name === name) { + core.info(`delete asset ${name}`); + const asset_id = asset.id; + await octokit.rest.repos.deleteReleaseAsset({ owner, repo, asset_id }); + } + } + + core.info(`upload ${file}`); + const headers = { 'content-length': size, 'content-type': 'application/octet-stream' }; + const data = fs.createReadStream(file); + await octokit.rest.repos.uploadReleaseAsset({ + data, + headers, + name, + url: release.data.upload_url, + }); + }); + } +} + +async function runWithRetry(f) { + const retries = 10; + const maxDelay = 4000; + let delay = 1000; + + for (let i = 0; i < retries; i++) { + try { + await f(); + break; + } catch (e) { + if (i === retries - 1) + throw e; + + core.error(e); + const currentDelay = Math.round(Math.random() * delay); + core.info(`sleeping ${currentDelay} ms`); + await sleep(currentDelay); + delay = Math.min(delay * 2, maxDelay); + } + } +} + +async function run() { + await runWithRetry(runOnce); +} + +run().catch(err => { + core.error(err); + core.setFailed(err.message); +}); diff --git a/src/tools/rust-analyzer/.github/actions/github-release/package.json b/src/tools/rust-analyzer/.github/actions/github-release/package.json new file mode 100644 index 00000000000..af4bf074d2d --- /dev/null +++ b/src/tools/rust-analyzer/.github/actions/github-release/package.json @@ -0,0 +1,10 @@ +{ + "name": "wasmtime-github-release", + "version": "0.0.0", + "main": "main.js", + "dependencies": { + "@actions/core": "^1.6", + "@actions/github": "^5.0", + "glob": "^7.1.5" + } +} diff --git a/src/tools/rust-analyzer/.github/rust.json b/src/tools/rust-analyzer/.github/rust.json new file mode 100644 index 00000000000..ddaa1b0824b --- /dev/null +++ b/src/tools/rust-analyzer/.github/rust.json @@ -0,0 +1,33 @@ +{ + "problemMatcher": [ + { + "owner": "rustfmt", + "severity": "warning", + "pattern": [ + { + "regexp": "^(Diff in (.+)) at line (\\d+):$", + "message": 1, + "file": 2, + "line": 3 + } + ] + }, + { + "owner": "clippy", + "pattern": [ + { + "regexp": "^(?:\\x1b\\[[\\d;]+m)*(warning|warn|error)(?:\\x1b\\[[\\d;]+m)*(\\[(.*)\\])?(?:\\x1b\\[[\\d;]+m)*:(?:\\x1b\\[[\\d;]+m)* ([^\\x1b]*)(?:\\x1b\\[[\\d;]+m)*$", + "severity": 1, + "message": 4, + "code": 3 + }, + { + "regexp": "^(?:\\x1b\\[[\\d;]+m)*\\s*(?:\\x1b\\[[\\d;]+m)*\\s*--> (?:\\x1b\\[[\\d;]+m)*(.*):(\\d*):(\\d*)(?:\\x1b\\[[\\d;]+m)*$", + "file": 1, + "line": 2, + "column": 3 + } + ] + } + ] +} diff --git a/src/tools/rust-analyzer/.github/workflows/autopublish.yaml b/src/tools/rust-analyzer/.github/workflows/autopublish.yaml new file mode 100644 index 00000000000..4b97637088c --- /dev/null +++ b/src/tools/rust-analyzer/.github/workflows/autopublish.yaml @@ -0,0 +1,60 @@ +name: autopublish +on: + workflow_dispatch: # We can add version input when 1.0 is released and scheduled releases are removed + + # schedule: + # - cron: "0 0 * * *" # midnight UTC + + push: + branches: + - release + +jobs: + publish: + name: publish + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # https://github.com/jlumbroso/free-disk-space/blob/main/action.yml + - name: Free up some disk space + run: sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /usr/local/.ghcup + + - name: Install Rust toolchain + run: rustup update --no-self-update stable + + - name: Install cargo-workspaces + run: cargo install cargo-workspaces + + - name: Publish Crates + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + RUN_NUMBER: ${{ github.run_number }} + shell: bash + run: | + git config --global user.email "runner@gha.local" + git config --global user.name "GitHub Action" + rm Cargo.lock + # Fix names for crates that were published before switch to kebab-case. + cargo workspaces rename --from base-db base_db + cargo workspaces rename --from hir-def hir_def + cargo workspaces rename --from hir-expand hir_expand + cargo workspaces rename --from hir-ty hir_ty + cargo workspaces rename --from ide-assists ide_assists + cargo workspaces rename --from ide-completion ide_completion + cargo workspaces rename --from ide-db ide_db + cargo workspaces rename --from ide-diagnostics ide_diagnostics + cargo workspaces rename --from ide-ssr ide_ssr + cargo workspaces rename --from proc-macro-api proc_macro_api + cargo workspaces rename --from proc-macro-srv proc_macro_srv + cargo workspaces rename --from project-model project_model + cargo workspaces rename --from test-utils test_utils + cargo workspaces rename --from text-edit text_edit + # Remove library crates from the workspaces so we don't auto-publish them as well + sed -i 's/ "lib\/\*",//' ./Cargo.toml + cargo workspaces rename ra_ap_%n + find crates/rust-analyzer -type f -name '*.rs' -exec sed -i 's/rust_analyzer/ra_ap_rust_analyzer/g' {} + + cargo workspaces publish --yes --force '*' --exact --no-git-commit --allow-dirty --skip-published custom 0.0.$(($RUN_NUMBER + 133)) diff --git a/src/tools/rust-analyzer/.github/workflows/ci.yaml b/src/tools/rust-analyzer/.github/workflows/ci.yaml new file mode 100644 index 00000000000..08ad10c2971 --- /dev/null +++ b/src/tools/rust-analyzer/.github/workflows/ci.yaml @@ -0,0 +1,256 @@ +# Please make sure that the `needs` fields for both `end-success` and `end-failure` +# are updated when adding new jobs! + +name: CI +on: + pull_request: + push: + branches: + - auto + - try + - automation/bors/try + +env: + CARGO_INCREMENTAL: 0 + CARGO_NET_RETRY: 10 + CI: 1 + RUST_BACKTRACE: short + RUSTFLAGS: "-D warnings -W unreachable-pub -W bare-trait-objects" + RUSTUP_MAX_RETRIES: 10 + +jobs: + changes: + runs-on: ubuntu-latest + permissions: + pull-requests: read + outputs: + typescript: ${{ steps.filter.outputs.typescript }} + proc_macros: ${{ steps.filter.outputs.proc_macros }} + steps: + - uses: actions/checkout@v4 + - uses: dorny/paths-filter@1441771bbfdd59dcd748680ee64ebd8faab1a242 + id: filter + with: + filters: | + typescript: + - 'editors/code/**' + proc_macros: + - 'crates/proc-macro-api/**' + - 'crates/proc-macro-srv/**' + - 'crates/proc-macro-srv-cli/**' + + rust: + needs: changes + if: github.repository == 'rust-lang/rust-analyzer' + name: Rust + runs-on: ${{ matrix.os }} + env: + CC: deny_c + RUST_CHANNEL: "${{ needs.changes.outputs.proc_macros == 'true' && 'nightly' || 'stable' }}" + USE_SYSROOT_ABI: "${{ needs.changes.outputs.proc_macros == 'true' && '--features sysroot-abi' || '' }}" + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Install Rust toolchain + run: | + rustup update --no-self-update ${{ env.RUST_CHANNEL }} + rustup component add --toolchain ${{ env.RUST_CHANNEL }} rustfmt rust-src + rustup default ${{ env.RUST_CHANNEL }} + # https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/rust.json + - name: Install Rust Problem Matcher + if: matrix.os == 'ubuntu-latest' + run: echo "::add-matcher::.github/rust.json" + + - name: Cache Dependencies + uses: Swatinem/rust-cache@640a22190e7a783d4c409684cea558f081f92012 + with: + key: ${{ env.RUST_CHANNEL }} + + - name: Bump opt-level + if: matrix.os == 'ubuntu-latest' + run: sed -i '/\[profile.dev]/a opt-level=1' Cargo.toml + + - name: Codegen checks (rust-analyzer) + run: cargo codegen --check + + - name: Compile (tests) + run: cargo test --no-run --locked ${{ env.USE_SYSROOT_ABI }} + + # It's faster to `test` before `build` ¯\_(ツ)_/¯ + - name: Compile (rust-analyzer) + if: matrix.os == 'ubuntu-latest' + run: cargo build --quiet ${{ env.USE_SYSROOT_ABI }} + + - name: Test + if: matrix.os == 'ubuntu-latest' || github.event_name == 'push' + run: cargo test ${{ env.USE_SYSROOT_ABI }} -- --nocapture --quiet + + - name: Switch to stable toolchain + run: | + rustup update --no-self-update stable + rustup component add --toolchain stable rust-src clippy + rustup default stable + + - name: Run analysis-stats on rust-analyzer + if: matrix.os == 'ubuntu-latest' + run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats . + + - name: Run analysis-stats on rust std library + if: matrix.os == 'ubuntu-latest' + env: + RUSTC_BOOTSTRAP: 1 + run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats --with-deps $(rustc --print sysroot)/lib/rustlib/src/rust/library/std + + - name: clippy + if: matrix.os == 'windows-latest' + run: cargo clippy --all-targets -- -D clippy::disallowed_macros -D clippy::dbg_macro -D clippy::todo -D clippy::print_stdout -D clippy::print_stderr + + - name: rustfmt + if: matrix.os == 'ubuntu-latest' + run: cargo fmt -- --check + + # Weird targets to catch non-portable code + rust-cross: + if: github.repository == 'rust-lang/rust-analyzer' + name: Rust Cross + runs-on: ubuntu-latest + + env: + targets: "powerpc-unknown-linux-gnu x86_64-unknown-linux-musl" + # The rust-analyzer binary is not expected to compile on WASM, but the IDE + # crate should + targets_ide: "wasm32-unknown-unknown" + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + run: | + rustup update --no-self-update stable + rustup target add ${{ env.targets }} ${{ env.targets_ide }} + + - name: Cache Dependencies + uses: Swatinem/rust-cache@640a22190e7a783d4c409684cea558f081f92012 + + - name: Check + run: | + for target in ${{ env.targets }}; do + cargo check --target=$target --all-targets + done + for target in ${{ env.targets_ide }}; do + cargo check -p ide --target=$target --all-targets + done + + typescript: + needs: changes + if: github.repository == 'rust-lang/rust-analyzer' + name: TypeScript + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + if: needs.changes.outputs.typescript == 'true' + + - name: Install Nodejs + uses: actions/setup-node@v4 + with: + node-version: 18 + if: needs.changes.outputs.typescript == 'true' + + - name: Install xvfb + if: matrix.os == 'ubuntu-latest' && needs.changes.outputs.typescript == 'true' + run: sudo apt-get install -y xvfb + + - run: npm ci + working-directory: ./editors/code + if: needs.changes.outputs.typescript == 'true' + + # - run: npm audit || { sleep 10 && npm audit; } || { sleep 30 && npm audit; } + # if: runner.os == 'Linux' + # working-directory: ./editors/code + + # If this steps fails, your code's type integrity might be wrong at some places at TypeScript level. + - run: npm run typecheck + working-directory: ./editors/code + if: needs.changes.outputs.typescript == 'true' + + # You may fix the code automatically by running `npm run lint:fix` if this steps fails. + - run: npm run lint + working-directory: ./editors/code + if: needs.changes.outputs.typescript == 'true' + + # To fix this steps, please run `npm run format`. + - run: npm run format:check + working-directory: ./editors/code + if: needs.changes.outputs.typescript == 'true' + + - name: Run VS Code tests (Linux) + if: matrix.os == 'ubuntu-latest' && needs.changes.outputs.typescript == 'true' + env: + VSCODE_CLI: 1 + run: xvfb-run npm test + working-directory: ./editors/code + + - name: Run VS Code tests (Windows) + if: matrix.os == 'windows-latest' && needs.changes.outputs.typescript == 'true' + env: + VSCODE_CLI: 1 + run: npm test + working-directory: ./editors/code + + - run: npm run package --scripts-prepend-node-path + working-directory: ./editors/code + if: needs.changes.outputs.typescript == 'true' + + typo-check: + name: Typo Check + runs-on: ubuntu-latest + timeout-minutes: 10 + env: + FORCE_COLOR: 1 + TYPOS_VERSION: v1.18.0 + steps: + - name: download typos + run: curl -LsSf https://github.com/crate-ci/typos/releases/download/$TYPOS_VERSION/typos-$TYPOS_VERSION-x86_64-unknown-linux-musl.tar.gz | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin + + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: check for typos + run: typos + + end-success: + name: bors build finished + if: github.event.pusher.name == 'bors' && success() + runs-on: ubuntu-latest + needs: [rust, rust-cross, typescript, typo-check] + steps: + - name: Mark the job as successful + run: exit 0 + + end-failure: + name: bors build finished + if: github.event.pusher.name == 'bors' && !success() + runs-on: ubuntu-latest + needs: [rust, rust-cross, typescript, typo-check] + steps: + - name: Mark the job as a failure + run: exit 1 diff --git a/src/tools/rust-analyzer/.github/workflows/fuzz.yml b/src/tools/rust-analyzer/.github/workflows/fuzz.yml new file mode 100644 index 00000000000..f88c7f95d5c --- /dev/null +++ b/src/tools/rust-analyzer/.github/workflows/fuzz.yml @@ -0,0 +1,43 @@ +name: Fuzz +on: + schedule: + # Once a week + - cron: '0 0 * * 0' + push: + paths: + - '.github/workflows/fuzz.yml' + # Allow manual trigger + workflow_dispatch: + +env: + CARGO_INCREMENTAL: 0 + CARGO_NET_RETRY: 10 + CI: 1 + RUST_BACKTRACE: short + RUSTFLAGS: "-D warnings -W unreachable-pub -W bare-trait-objects" + RUSTUP_MAX_RETRIES: 10 + +jobs: + rust: + if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }} + name: Rust + runs-on: ubuntu-latest + env: + CC: deny_c + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 1 + + - name: Install Rust toolchain + run: | + rustup install --profile minimal nightly + + - name: Build fuzzers + run: | + cargo install cargo-fuzz + cd crates/syntax + cargo +nightly fuzz build diff --git a/src/tools/rust-analyzer/.github/workflows/metrics.yaml b/src/tools/rust-analyzer/.github/workflows/metrics.yaml new file mode 100644 index 00000000000..de61b2389ae --- /dev/null +++ b/src/tools/rust-analyzer/.github/workflows/metrics.yaml @@ -0,0 +1,153 @@ +name: metrics +on: + push: + branches: + - master + +env: + CARGO_INCREMENTAL: 0 + CARGO_NET_RETRY: 10 + RUSTFLAGS: "-D warnings -W unreachable-pub" + RUSTUP_MAX_RETRIES: 10 + +jobs: + setup_cargo: + if: github.repository == 'rust-lang/rust-analyzer' + runs-on: ubuntu-latest + steps: + - name: Install Rust toolchain + run: | + rustup update --no-self-update stable + rustup component add rustfmt rust-src + rustup default stable + - name: Cache cargo + uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-${{ github.sha }} + + build_metrics: + runs-on: ubuntu-latest + needs: setup_cargo + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Restore cargo cache + uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-${{ github.sha }} + + - name: Collect build metrics + run: cargo xtask metrics build + + - name: Cache target + uses: actions/cache@v4 + with: + path: target/ + key: ${{ runner.os }}-target-${{ github.sha }} + + - name: Upload build metrics + uses: actions/upload-artifact@v3 + with: + name: build-${{ github.sha }} + path: target/build.json + if-no-files-found: error + + other_metrics: + strategy: + matrix: + names: [self, ripgrep-13.0.0, webrender-2022, diesel-1.4.8, hyper-0.14.18] + runs-on: ubuntu-latest + needs: [setup_cargo, build_metrics] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Restore cargo cache + uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-${{ github.sha }} + + - name: Restore target cache + uses: actions/cache@v4 + with: + path: target/ + key: ${{ runner.os }}-target-${{ github.sha }} + + - name: Collect metrics + run: cargo xtask metrics "${{ matrix.names }}" + + - name: Upload metrics + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.names }}-${{ github.sha }} + path: target/${{ matrix.names }}.json + if-no-files-found: error + + generate_final_metrics: + runs-on: ubuntu-latest + needs: [build_metrics, other_metrics] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Download build metrics + uses: actions/download-artifact@v3 + with: + name: build-${{ github.sha }} + + - name: Download self metrics + uses: actions/download-artifact@v3 + with: + name: self-${{ github.sha }} + + - name: Download ripgrep-13.0.0 metrics + uses: actions/download-artifact@v3 + with: + name: ripgrep-13.0.0-${{ github.sha }} + + - name: Download webrender-2022 metrics + uses: actions/download-artifact@v3 + with: + name: webrender-2022-${{ github.sha }} + + - name: Download diesel-1.4.8 metrics + uses: actions/download-artifact@v3 + with: + name: diesel-1.4.8-${{ github.sha }} + + - name: Download hyper-0.14.18 metrics + uses: actions/download-artifact@v3 + with: + name: hyper-0.14.18-${{ github.sha }} + + - name: Combine json + run: | + mkdir ~/.ssh + echo "${{ secrets.METRICS_DEPLOY_KEY }}" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + chmod 700 ~/.ssh + + git clone --depth 1 git@github.com:rust-analyzer/metrics.git + jq -s ".[0] * .[1] * .[2] * .[3] * .[4] * .[5]" build.json self.json ripgrep-13.0.0.json webrender-2022.json diesel-1.4.8.json hyper-0.14.18.json -c >> metrics/metrics.json + cd metrics + git add . + git -c user.name=Bot -c user.email=dummy@example.com commit --message 📈 + git push origin master diff --git a/src/tools/rust-analyzer/.github/workflows/publish-libs.yaml b/src/tools/rust-analyzer/.github/workflows/publish-libs.yaml new file mode 100644 index 00000000000..34ca53e2e53 --- /dev/null +++ b/src/tools/rust-analyzer/.github/workflows/publish-libs.yaml @@ -0,0 +1,36 @@ +name: publish-libs +on: + workflow_dispatch: + push: + branches: + - master + paths: + - "lib/**" + +jobs: + publish-libs: + name: publish + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install Rust toolchain + run: rustup update --no-self-update stable + + - name: Install cargo-workspaces + run: cargo install cargo-workspaces + + - name: Publish Crates + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + shell: bash + run: | + git config --global user.email "runner@gha.local" + git config --global user.name "GitHub Action" + # Remove r-a crates from the workspaces so we don't auto-publish them as well + sed -i 's/ "crates\/\*"//' ./Cargo.toml + sed -i 's/ "xtask\/"//' ./Cargo.toml + cargo workspaces publish --yes --exact --from-git --no-git-commit --allow-dirty diff --git a/src/tools/rust-analyzer/.github/workflows/release.yaml b/src/tools/rust-analyzer/.github/workflows/release.yaml new file mode 100644 index 00000000000..11014338d72 --- /dev/null +++ b/src/tools/rust-analyzer/.github/workflows/release.yaml @@ -0,0 +1,280 @@ +name: release +on: + schedule: + - cron: "0 0 * * *" # midnight UTC + + workflow_dispatch: + + push: + branches: + - release + - trigger-nightly + +env: + CARGO_INCREMENTAL: 0 + CARGO_NET_RETRY: 10 + RUSTFLAGS: "-D warnings -W unreachable-pub" + RUSTUP_MAX_RETRIES: 10 + FETCH_DEPTH: 0 # pull in the tags for the version string + MACOSX_DEPLOYMENT_TARGET: 10.15 + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc + CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc + +jobs: + dist: + strategy: + matrix: + include: + - os: windows-latest + target: x86_64-pc-windows-msvc + code-target: win32-x64 + - os: windows-latest + target: i686-pc-windows-msvc + - os: windows-latest + target: aarch64-pc-windows-msvc + code-target: win32-arm64 + - os: ubuntu-20.04 + target: x86_64-unknown-linux-gnu + code-target: linux-x64 + container: rockylinux:8 + - os: ubuntu-20.04 + target: aarch64-unknown-linux-gnu + code-target: linux-arm64 + - os: ubuntu-20.04 + target: arm-unknown-linux-gnueabihf + code-target: linux-armhf + - os: macos-12 + target: x86_64-apple-darwin + code-target: darwin-x64 + - os: macos-12 + target: aarch64-apple-darwin + code-target: darwin-arm64 + + name: dist (${{ matrix.target }}) + runs-on: ${{ matrix.os }} + container: ${{ matrix.container }} + + env: + RA_TARGET: ${{ matrix.target }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: ${{ env.FETCH_DEPTH }} + + - name: Install toolchain dependencies + if: matrix.container == 'rockylinux:8' + shell: bash + run: | + dnf install -y gcc + curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y + echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH + + - name: Install Rust toolchain + run: | + rustup update --no-self-update stable + rustup target add ${{ matrix.target }} + rustup component add rust-src + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Update apt repositories + if: matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'arm-unknown-linux-gnueabihf' + run: sudo apt-get update + + - name: Install AArch64 target toolchain + if: matrix.target == 'aarch64-unknown-linux-gnu' + run: sudo apt-get install gcc-aarch64-linux-gnu + + - name: Install ARM target toolchain + if: matrix.target == 'arm-unknown-linux-gnueabihf' + run: sudo apt-get install gcc-arm-linux-gnueabihf + + - name: Dist + run: cargo xtask dist --client-patch-version ${{ github.run_number }} + + - run: npm ci + working-directory: editors/code + + - name: Package Extension (release) + if: github.ref == 'refs/heads/release' && matrix.code-target + run: npx vsce package -o "../../dist/rust-analyzer-${{ matrix.code-target }}.vsix" --target ${{ matrix.code-target }} + working-directory: editors/code + + - name: Package Extension (nightly) + if: github.ref != 'refs/heads/release' && matrix.code-target + run: npx vsce package -o "../../dist/rust-analyzer-${{ matrix.code-target }}.vsix" --target ${{ matrix.code-target }} --pre-release + working-directory: editors/code + + - if: matrix.target == 'x86_64-unknown-linux-gnu' + run: rm -rf editors/code/server + + - if: matrix.target == 'x86_64-unknown-linux-gnu' && github.ref == 'refs/heads/release' + run: npx vsce package -o ../../dist/rust-analyzer-no-server.vsix + working-directory: editors/code + + - if: matrix.target == 'x86_64-unknown-linux-gnu' && github.ref != 'refs/heads/release' + run: npx vsce package -o ../../dist/rust-analyzer-no-server.vsix --pre-release + working-directory: editors/code + + - name: Run analysis-stats on rust-analyzer + if: matrix.target == 'x86_64-unknown-linux-gnu' + run: target/${{ matrix.target }}/release/rust-analyzer analysis-stats . + + - name: Run analysis-stats on rust std library + if: matrix.target == 'x86_64-unknown-linux-gnu' + env: + RUSTC_BOOTSTRAP: 1 + run: target/${{ matrix.target }}/release/rust-analyzer analysis-stats --with-deps $(rustc --print sysroot)/lib/rustlib/src/rust/library/std + + - name: Upload artifacts + uses: actions/upload-artifact@v1 + with: + name: dist-${{ matrix.target }} + path: ./dist + + dist-x86_64-unknown-linux-musl: + name: dist (x86_64-unknown-linux-musl) + runs-on: ubuntu-latest + env: + RA_TARGET: x86_64-unknown-linux-musl + # For some reason `-crt-static` is not working for clang without lld + RUSTFLAGS: "-C link-arg=-fuse-ld=lld -C target-feature=-crt-static" + container: + image: rust:alpine + volumes: + - /usr/local/cargo/registry:/usr/local/cargo/registry + + steps: + - name: Install dependencies + run: apk add --no-cache git clang lld musl-dev nodejs npm + + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: ${{ env.FETCH_DEPTH }} + + - name: Dist + run: cargo xtask dist --client-patch-version ${{ github.run_number }} + + - run: npm ci + working-directory: editors/code + + - name: Package Extension (release) + if: github.ref == 'refs/heads/release' + run: npx vsce package -o "../../dist/rust-analyzer-alpine-x64.vsix" --target alpine-x64 + working-directory: editors/code + + - name: Package Extension (nightly) + if: github.ref != 'refs/heads/release' + run: npx vsce package -o "../../dist/rust-analyzer-alpine-x64.vsix" --target alpine-x64 --pre-release + working-directory: editors/code + + - run: rm -rf editors/code/server + + - name: Upload artifacts + uses: actions/upload-artifact@v1 + with: + name: dist-x86_64-unknown-linux-musl + path: ./dist + + publish: + name: publish + runs-on: ubuntu-latest + needs: ["dist", "dist-x86_64-unknown-linux-musl"] + steps: + - name: Install Nodejs + uses: actions/setup-node@v4 + with: + node-version: 20 + + - run: echo "TAG=$(date --iso -u)" >> $GITHUB_ENV + if: github.ref == 'refs/heads/release' + - run: echo "TAG=nightly" >> $GITHUB_ENV + if: github.ref != 'refs/heads/release' + - run: 'echo "TAG: $TAG"' + + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: ${{ env.FETCH_DEPTH }} + + - run: echo "HEAD_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV + - run: 'echo "HEAD_SHA: $HEAD_SHA"' + + - uses: actions/download-artifact@v1 + with: + name: dist-aarch64-apple-darwin + path: dist + - uses: actions/download-artifact@v1 + with: + name: dist-x86_64-apple-darwin + path: dist + - uses: actions/download-artifact@v1 + with: + name: dist-x86_64-unknown-linux-gnu + path: dist + - uses: actions/download-artifact@v1 + with: + name: dist-x86_64-unknown-linux-musl + path: dist + - uses: actions/download-artifact@v1 + with: + name: dist-aarch64-unknown-linux-gnu + path: dist + - uses: actions/download-artifact@v1 + with: + name: dist-arm-unknown-linux-gnueabihf + path: dist + - uses: actions/download-artifact@v1 + with: + name: dist-x86_64-pc-windows-msvc + path: dist + - uses: actions/download-artifact@v1 + with: + name: dist-i686-pc-windows-msvc + path: dist + - uses: actions/download-artifact@v1 + with: + name: dist-aarch64-pc-windows-msvc + path: dist + - run: ls -al ./dist + + - name: Publish Release + uses: ./.github/actions/github-release + with: + files: "dist/*" + name: ${{ env.TAG }} + token: ${{ secrets.GITHUB_TOKEN }} + + - run: rm dist/rust-analyzer-no-server.vsix + + - run: npm ci + working-directory: ./editors/code + + - name: Publish Extension (Code Marketplace, release) + if: github.ref == 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer') + working-directory: ./editors/code + # token from https://dev.azure.com/rust-analyzer/ + run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix + + - name: Publish Extension (OpenVSX, release) + if: github.ref == 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer') + working-directory: ./editors/code + run: npx ovsx publish --pat ${{ secrets.OPENVSX_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix + timeout-minutes: 2 + + - name: Publish Extension (Code Marketplace, nightly) + if: github.ref != 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer') + working-directory: ./editors/code + run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix --pre-release + + - name: Publish Extension (OpenVSX, nightly) + if: github.ref != 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer') + working-directory: ./editors/code + run: npx ovsx publish --pat ${{ secrets.OPENVSX_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix + timeout-minutes: 2 diff --git a/src/tools/rust-analyzer/.github/workflows/rustdoc.yaml b/src/tools/rust-analyzer/.github/workflows/rustdoc.yaml new file mode 100644 index 00000000000..12a1a791fda --- /dev/null +++ b/src/tools/rust-analyzer/.github/workflows/rustdoc.yaml @@ -0,0 +1,34 @@ +name: rustdoc +on: + push: + branches: + - master + +env: + CARGO_INCREMENTAL: 0 + CARGO_NET_RETRY: 10 + RUSTFLAGS: "-D warnings -W unreachable-pub" + RUSTUP_MAX_RETRIES: 10 + +jobs: + rustdoc: + if: github.repository == 'rust-lang/rust-analyzer' + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + run: rustup update --no-self-update stable + + - name: Build Documentation + run: cargo doc --all --no-deps + + - name: Deploy Docs + uses: peaceiris/actions-gh-pages@364c31d33bb99327c77b3a5438a83a357a6729ad # v3.4.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: gh-pages + publish_dir: ./target/doc + force_orphan: true diff --git a/src/tools/rust-analyzer/.gitignore b/src/tools/rust-analyzer/.gitignore new file mode 100644 index 00000000000..68c87a6b1ed --- /dev/null +++ b/src/tools/rust-analyzer/.gitignore @@ -0,0 +1,16 @@ +/target/ +/dist/ +crates/*/target +**/*.rs.bk +**/*.rs.pending-snap +.idea/* +*.log +*.iml +.vscode/settings.json +generated_assists.adoc +generated_features.adoc +generated_diagnostic.adoc +.DS_Store +/out/ +/dump.lsif +.envrc diff --git a/src/tools/rust-analyzer/.typos.toml b/src/tools/rust-analyzer/.typos.toml new file mode 100644 index 00000000000..c2e8b265218 --- /dev/null +++ b/src/tools/rust-analyzer/.typos.toml @@ -0,0 +1,30 @@ +[files] +extend-exclude = [ + "*.rast", + "bench_data/", + "crates/parser/test_data/lexer/err/", + "crates/project-model/test_data/", +] + +[default] +extend-ignore-re = [ + # ignore string which contains $0, which is used widely in tests + ".*\\$0.*", + # ignore generated content like `boxed....nner()`, `Defaul...efault` + "\\w*\\.{3,4}\\w*", + '"flate2"', + "raison d'être", +] + +[default.extend-words] +anser = "anser" +ba = "ba" +fo = "fo" +ket = "ket" +makro = "makro" +trivias = "trivias" + +[default.extend-identifiers] +datas = "datas" +impl_froms = "impl_froms" +selfs = "selfs" diff --git a/src/tools/rust-analyzer/.vscode/extensions.json b/src/tools/rust-analyzer/.vscode/extensions.json new file mode 100644 index 00000000000..027eeabc4c3 --- /dev/null +++ b/src/tools/rust-analyzer/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. + // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp + + // List of extensions which should be recommended for users of this workspace. + "recommendations": ["vadimcn.vscode-lldb"], + // List of extensions recommended by VS Code that should not be recommended for users of this workspace. + "unwantedRecommendations": [] +} diff --git a/src/tools/rust-analyzer/.vscode/launch.json b/src/tools/rust-analyzer/.vscode/launch.json new file mode 100644 index 00000000000..c353737a35a --- /dev/null +++ b/src/tools/rust-analyzer/.vscode/launch.json @@ -0,0 +1,131 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + + // NOTE: --disable-extensions + // Disable all installed extensions to increase performance of the debug instance + // and prevent potential conflicts with other installed extensions. + + "version": "0.2.0", + "configurations": [ + { + // Used for testing the extension with the installed LSP server. + "name": "Run Installed Extension", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": [ + // "--user-data-dir=${workspaceFolder}/target/code", + "--disable-extensions", + "--extensionDevelopmentPath=${workspaceFolder}/editors/code" + ], + "outFiles": [ + "${workspaceFolder}/editors/code/out/**/*.js" + ], + "preLaunchTask": "Build Extension", + "skipFiles": [ + "/**/*.js" + ] + }, + { + // Used for testing the extension with a local build of the LSP server (in `target/debug`). + "name": "Run Extension (Debug Build)", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": [ + "--disable-extensions", + "--extensionDevelopmentPath=${workspaceFolder}/editors/code" + ], + "outFiles": [ + "${workspaceFolder}/editors/code/out/**/*.js" + ], + "preLaunchTask": "Build Server and Extension", + "skipFiles": [ + "/**/*.js" + ], + "env": { + "__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/debug/rust-analyzer" + } + }, + { + // Used for testing the extension with a local build of the LSP server (in `target/release`). + "name": "Run Extension (Release Build)", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": [ + "--disable-extensions", + "--extensionDevelopmentPath=${workspaceFolder}/editors/code" + ], + "outFiles": [ + "${workspaceFolder}/editors/code/out/**/*.js" + ], + "preLaunchTask": "Build Server (Release) and Extension", + "skipFiles": [ + "/**/*.js" + ], + "env": { + "__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/release/rust-analyzer" + } + }, + { + // Used for testing the extension with a local build of the LSP server (in `target/release`) + // with all other extensions loaded. + "name": "Run With Extensions", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": [ + "--disable-extension", "rust-lang.rust-analyzer", + "--extensionDevelopmentPath=${workspaceFolder}/editors/code" + ], + "outFiles": [ + "${workspaceFolder}/editors/code/out/**/*.js" + ], + "preLaunchTask": "Build Server (Release) and Extension", + "skipFiles": [ + "/**/*.js" + ], + "env": { + "__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/release/rust-analyzer" + } + }, + { + // Used to attach LLDB to a running LSP server. + // NOTE: Might require root permissions. For this run: + // + // `echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope` + // + // Don't forget to set `debug = 2` in `Cargo.toml` before building the server + + "name": "Attach To Server", + "type": "lldb", + "request": "attach", + "program": "${workspaceFolder}/target/debug/rust-analyzer", + "pid": "${command:pickMyProcess}", + "sourceLanguages": [ + "rust" + ] + }, + { + "name": "Run Unit Tests", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}/editors/code", + "--extensionTestsPath=${workspaceFolder}/editors/code/out/tests/unit" ], + "sourceMaps": true, + "outFiles": [ "${workspaceFolder}/editors/code/out/tests/unit/**/*.js" ], + "preLaunchTask": "Pretest" + }, + { + "name": "Win Attach to Server", + "type": "cppvsdbg", + "processId":"${command:pickProcess}", + "request": "attach" + } + ] +} diff --git a/src/tools/rust-analyzer/.vscode/tasks.json b/src/tools/rust-analyzer/.vscode/tasks.json new file mode 100644 index 00000000000..a25dff19e41 --- /dev/null +++ b/src/tools/rust-analyzer/.vscode/tasks.json @@ -0,0 +1,67 @@ +// See https://go.microsoft.com/fwlink/?LinkId=733558 +// for the documentation about the tasks.json format +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Build Extension in Background", + "group": "build", + "type": "npm", + "script": "watch", + "path": "editors/code/", + "problemMatcher": { + "base": "$tsc-watch", + "fileLocation": ["relative", "${workspaceFolder}/editors/code/"] + }, + "isBackground": true, + }, + { + "label": "Build Extension", + "group": "build", + "type": "npm", + "script": "build", + "path": "editors/code/", + "problemMatcher": { + "base": "$tsc", + "fileLocation": ["relative", "${workspaceFolder}/editors/code/"] + }, + }, + { + "label": "Build Server", + "group": "build", + "type": "shell", + "command": "cargo build --package rust-analyzer", + "problemMatcher": "$rustc" + }, + { + "label": "Build Server (Release)", + "group": "build", + "type": "shell", + "command": "cargo build --release --package rust-analyzer", + "problemMatcher": "$rustc" + }, + { + "label": "Pretest", + "group": "build", + "isBackground": false, + "type": "npm", + "script": "pretest", + "path": "editors/code/", + "problemMatcher": { + "base": "$tsc", + "fileLocation": ["relative", "${workspaceFolder}/editors/code/"] + } + }, + + { + "label": "Build Server and Extension", + "dependsOn": ["Build Server", "Build Extension"], + "problemMatcher": "$rustc" + }, + { + "label": "Build Server (Release) and Extension", + "dependsOn": ["Build Server (Release)", "Build Extension"], + "problemMatcher": "$rustc" + } + ] +} diff --git a/src/tools/rust-analyzer/Cargo.lock b/src/tools/rust-analyzer/Cargo.lock new file mode 100644 index 00000000000..c7cf4479b33 --- /dev/null +++ b/src/tools/rust-analyzer/Cargo.lock @@ -0,0 +1,2469 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "always-assert" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1078fa1ce1e34b1872d8611ad921196d76bdd7027e949fbe31231abde201892" +dependencies = [ + "tracing", +] + +[[package]] +name = "anyhow" +version = "1.0.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object 0.32.2", + "rustc-demangle", +] + +[[package]] +name = "base-db" +version = "0.0.0" +dependencies = [ + "cfg", + "la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lz4_flex", + "rustc-hash", + "salsa", + "semver", + "span", + "stdx", + "syntax", + "tracing", + "triomphe", + "vfs", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "camino" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.0.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" + +[[package]] +name = "cfg" +version = "0.0.0" +dependencies = [ + "arbitrary", + "derive_arbitrary", + "expect-test", + "mbe", + "oorandom", + "rustc-hash", + "syntax", + "tt", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chalk-derive" +version = "0.96.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5676cea088c32290fe65c82895be9d06dd21e0fa49bb97ca840529e9417ab71a" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "chalk-ir" +version = "0.96.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff550c2cdd63ff74394214dce03d06386928a641c0f08837535f04af573a966d" +dependencies = [ + "bitflags 2.4.2", + "chalk-derive", + "lazy_static", +] + +[[package]] +name = "chalk-recursive" +version = "0.96.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c4559e5c9b200240453b07d893f9c3c74413b53b0d33cbe272c68b0b77aa1c3" +dependencies = [ + "chalk-derive", + "chalk-ir", + "chalk-solve", + "rustc-hash", + "tracing", +] + +[[package]] +name = "chalk-solve" +version = "0.96.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0882e68ce9eb5a0a2413806538494d19df6ee520ab17d1faf489e952f32e98b8" +dependencies = [ + "chalk-derive", + "chalk-ir", + "ena", + "indexmap", + "itertools", + "petgraph", + "rustc-hash", + "tracing", +] + +[[package]] +name = "command-group" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5080df6b0f0ecb76cab30808f00d937ba725cebe266a3da8cd89dff92f2a9916" +dependencies = [ + "nix 0.26.4", + "winapi", +] + +[[package]] +name = "countme" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636" +dependencies = [ + "dashmap", + "once_cell", + "rustc-hash", +] + +[[package]] +name = "cov-mark" +version = "2.0.0-pre.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d48d8f76bd9331f19fe2aaf3821a9f9fb32c3963e1e3d6ce82a8c09cef7444a" + +[[package]] +name = "crc32fast" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "ctrlc" +version = "3.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b467862cc8610ca6fc9a1532d7777cee0804e678ab45410897b9396495994a0b" +dependencies = [ + "nix 0.27.1", + "windows-sys 0.52.0", +] + +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dissimilar" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86e3bdc80eee6e16b2b6b0f87fbc98c04bee3455e35174c0de1a125d0688c632" + +[[package]] +name = "dot" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a74b6c4d4a1cff5f454164363c16b72fa12463ca6b31f4b5f2035a65fa3d5906" + +[[package]] +name = "drop_bomb" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bda8e21c04aca2ae33ffc2fd8c23134f3cac46db123ba97bd9d3f3b8a4a85e1" + +[[package]] +name = "either" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" + +[[package]] +name = "ena" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" +dependencies = [ + "log", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "expect-test" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d9eafeadd538e68fb28016364c9732d78e420b9ff8853fa5e4058861e9f8d3" +dependencies = [ + "dissimilar", + "once_cell", +] + +[[package]] +name = "filetime" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "windows-sys 0.52.0", +] + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "flycheck" +version = "0.0.0" +dependencies = [ + "cargo_metadata", + "command-group", + "crossbeam-channel", + "paths", + "rustc-hash", + "serde", + "serde_json", + "stdx", + "toolchain", + "tracing", +] + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fsevent-sys" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" +dependencies = [ + "libc", +] + +[[package]] +name = "fst" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ab85b9b05e3978cc9a9cf8fea7f01b494e1a09ed3037e16ba39edc7a29eb61a" + +[[package]] +name = "getrandom" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hir" +version = "0.0.0" +dependencies = [ + "arrayvec", + "base-db", + "cfg", + "either", + "hir-def", + "hir-expand", + "hir-ty", + "itertools", + "once_cell", + "rustc-hash", + "smallvec", + "span", + "stdx", + "syntax", + "tracing", + "triomphe", + "tt", +] + +[[package]] +name = "hir-def" +version = "0.0.0" +dependencies = [ + "arrayvec", + "base-db", + "bitflags 2.4.2", + "cfg", + "cov-mark", + "dashmap", + "drop_bomb", + "either", + "expect-test", + "fst", + "hashbrown", + "hir-expand", + "indexmap", + "intern", + "itertools", + "la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "limit", + "mbe", + "once_cell", + "profile", + "ra-ap-rustc_abi", + "ra-ap-rustc_parse_format", + "rustc-hash", + "smallvec", + "span", + "stdx", + "syntax", + "test-fixture", + "test-utils", + "tracing", + "triomphe", + "tt", +] + +[[package]] +name = "hir-expand" +version = "0.0.0" +dependencies = [ + "base-db", + "cfg", + "cov-mark", + "either", + "expect-test", + "hashbrown", + "intern", + "itertools", + "la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "limit", + "mbe", + "rustc-hash", + "smallvec", + "span", + "stdx", + "syntax", + "tracing", + "triomphe", + "tt", +] + +[[package]] +name = "hir-ty" +version = "0.0.0" +dependencies = [ + "arrayvec", + "base-db", + "bitflags 2.4.2", + "chalk-derive", + "chalk-ir", + "chalk-recursive", + "chalk-solve", + "cov-mark", + "either", + "ena", + "expect-test", + "hir-def", + "hir-expand", + "indexmap", + "intern", + "itertools", + "la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "limit", + "nohash-hasher", + "once_cell", + "oorandom", + "project-model", + "ra-ap-rustc_abi", + "ra-ap-rustc_index", + "ra-ap-rustc_pattern_analysis", + "rustc-hash", + "scoped-tls", + "smallvec", + "span", + "stdx", + "syntax", + "test-fixture", + "test-utils", + "tracing", + "tracing-subscriber", + "tracing-tree", + "triomphe", + "typed-arena", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "ide" +version = "0.0.0" +dependencies = [ + "arrayvec", + "cfg", + "cov-mark", + "dot", + "either", + "expect-test", + "hir", + "ide-assists", + "ide-completion", + "ide-db", + "ide-diagnostics", + "ide-ssr", + "itertools", + "nohash-hasher", + "oorandom", + "profile", + "pulldown-cmark", + "pulldown-cmark-to-cmark", + "smallvec", + "span", + "stdx", + "syntax", + "test-fixture", + "test-utils", + "text-edit", + "toolchain", + "tracing", + "triomphe", + "url", +] + +[[package]] +name = "ide-assists" +version = "0.0.0" +dependencies = [ + "cov-mark", + "either", + "expect-test", + "hir", + "ide-db", + "itertools", + "smallvec", + "stdx", + "syntax", + "test-fixture", + "test-utils", + "text-edit", + "tracing", +] + +[[package]] +name = "ide-completion" +version = "0.0.0" +dependencies = [ + "base-db", + "cov-mark", + "expect-test", + "hir", + "ide-db", + "itertools", + "once_cell", + "smallvec", + "stdx", + "syntax", + "test-fixture", + "test-utils", + "text-edit", + "tracing", +] + +[[package]] +name = "ide-db" +version = "0.0.0" +dependencies = [ + "arrayvec", + "base-db", + "cov-mark", + "crossbeam-channel", + "either", + "expect-test", + "fst", + "hir", + "indexmap", + "itertools", + "limit", + "line-index 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", + "nohash-hasher", + "once_cell", + "parser", + "profile", + "rayon", + "rustc-hash", + "span", + "stdx", + "syntax", + "test-fixture", + "test-utils", + "text-edit", + "tracing", + "triomphe", +] + +[[package]] +name = "ide-diagnostics" +version = "0.0.0" +dependencies = [ + "cfg", + "cov-mark", + "either", + "expect-test", + "hir", + "ide-db", + "itertools", + "once_cell", + "paths", + "serde_json", + "stdx", + "syntax", + "test-fixture", + "test-utils", + "text-edit", + "tracing", +] + +[[package]] +name = "ide-ssr" +version = "0.0.0" +dependencies = [ + "cov-mark", + "expect-test", + "hir", + "ide-db", + "itertools", + "nohash-hasher", + "parser", + "stdx", + "syntax", + "test-fixture", + "test-utils", + "text-edit", + "triomphe", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "2.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "inotify" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" +dependencies = [ + "bitflags 1.3.2", + "inotify-sys", + "libc", +] + +[[package]] +name = "inotify-sys" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" +dependencies = [ + "libc", +] + +[[package]] +name = "intern" +version = "0.0.0" +dependencies = [ + "dashmap", + "hashbrown", + "rustc-hash", + "triomphe", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + +[[package]] +name = "jod-thread" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b23360e99b8717f20aaa4598f5a6541efbe30630039fbc7706cf954a87947ae" + +[[package]] +name = "kqueue" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" +dependencies = [ + "kqueue-sys", + "libc", +] + +[[package]] +name = "kqueue-sys" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" +dependencies = [ + "bitflags 1.3.2", + "libc", +] + +[[package]] +name = "la-arena" +version = "0.3.1" + +[[package]] +name = "la-arena" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3752f229dcc5a481d60f385fa479ff46818033d881d2d801aa27dffcfb5e8306" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.153" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + +[[package]] +name = "libloading" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +dependencies = [ + "cfg-if", + "windows-targets 0.52.4", +] + +[[package]] +name = "libmimalloc-sys" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3979b5c37ece694f1f5e51e7ecc871fdb0f517ed04ee45f88d15d6d553cb9664" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "limit" +version = "0.0.0" + +[[package]] +name = "line-index" +version = "0.1.1" +dependencies = [ + "nohash-hasher", + "oorandom", + "text-size", +] + +[[package]] +name = "line-index" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67d61795376ae2683928c218fda7d7d7db136fd38c06b7552904667f0d55580a" +dependencies = [ + "nohash-hasher", + "text-size", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "load-cargo" +version = "0.0.0" +dependencies = [ + "anyhow", + "crossbeam-channel", + "hir-expand", + "ide-db", + "itertools", + "paths", + "proc-macro-api", + "project-model", + "span", + "tracing", + "tt", + "vfs", + "vfs-notify", +] + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "lsp-server" +version = "0.7.6" +dependencies = [ + "crossbeam-channel", + "ctrlc", + "log", + "lsp-types", + "serde", + "serde_json", +] + +[[package]] +name = "lsp-server" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248f65b78f6db5d8e1b1604b4098a28b43d21a8eb1deeca22b1c421b276c7095" +dependencies = [ + "crossbeam-channel", + "log", + "serde", + "serde_json", +] + +[[package]] +name = "lsp-types" +version = "0.95.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "158c1911354ef73e8fe42da6b10c0484cb65c7f1007f28022e847706c1ab6984" +dependencies = [ + "bitflags 1.3.2", + "serde", + "serde_json", + "serde_repr", + "url", +] + +[[package]] +name = "lz4_flex" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "912b45c753ff5f7f5208307e8ace7d2a2e30d024e26d3509f3dce546c044ce15" + +[[package]] +name = "mbe" +version = "0.0.0" +dependencies = [ + "cov-mark", + "parser", + "rustc-hash", + "smallvec", + "span", + "stdx", + "syntax", + "test-utils", + "tracing", + "tt", +] + +[[package]] +name = "memchr" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mimalloc" +version = "0.1.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa01922b5ea280a911e323e4d2fd24b7fe5cc4042e0d2cda3c40775cdc4bdc9c" +dependencies = [ + "libmimalloc-sys", +] + +[[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "miow" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "359f76430b20a79f9e20e115b3428614e654f04fab314482fc0fda0ebd3c6044" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", +] + +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.4.2", + "cfg-if", + "libc", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "notify" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" +dependencies = [ + "bitflags 2.4.2", + "crossbeam-channel", + "filetime", + "fsevent-sys", + "inotify", + "kqueue", + "libc", + "log", + "mio", + "walkdir", + "windows-sys 0.48.0", +] + +[[package]] +name = "nu-ansi-term" +version = "0.49.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c073d3c1930d0751774acf49e66653acecb416c3a54c6ec095a9b11caddb5a68" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "object" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8dd6c0cdf9429bce006e1362bfce61fa1bfd8c898a643ed8d2b471934701d3d" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "oorandom" +version = "11.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "parser" +version = "0.0.0" +dependencies = [ + "drop_bomb", + "expect-test", + "limit", + "ra-ap-rustc_lexer", + "sourcegen", + "stdx", + "tracing", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "paths" +version = "0.0.0" +dependencies = [ + "camino", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "perf-event" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5396562cd2eaa828445d6d34258ae21ee1eb9d40fe626ca7f51c8dccb4af9d66" +dependencies = [ + "libc", + "perf-event-open-sys", +] + +[[package]] +name = "perf-event-open-sys" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce9bedf5da2c234fdf2391ede2b90fabf585355f33100689bc364a3ea558561a" +dependencies = [ + "libc", +] + +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-api" +version = "0.0.0" +dependencies = [ + "base-db", + "indexmap", + "la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memmap2", + "object 0.33.0", + "paths", + "rustc-hash", + "serde", + "serde_json", + "snap", + "span", + "stdx", + "text-size", + "tracing", + "triomphe", + "tt", +] + +[[package]] +name = "proc-macro-srv" +version = "0.0.0" +dependencies = [ + "base-db", + "expect-test", + "libloading", + "mbe", + "memmap2", + "object 0.33.0", + "paths", + "proc-macro-api", + "proc-macro-test", + "ra-ap-rustc_lexer", + "span", + "stdx", + "tt", +] + +[[package]] +name = "proc-macro-srv-cli" +version = "0.0.0" +dependencies = [ + "proc-macro-api", + "proc-macro-srv", +] + +[[package]] +name = "proc-macro-test" +version = "0.0.0" +dependencies = [ + "cargo_metadata", +] + +[[package]] +name = "proc-macro2" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "profile" +version = "0.0.0" +dependencies = [ + "cfg-if", + "countme", + "la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "once_cell", + "perf-event", + "tikv-jemalloc-ctl", + "tracing", + "winapi", +] + +[[package]] +name = "project-model" +version = "0.0.0" +dependencies = [ + "anyhow", + "base-db", + "cargo_metadata", + "cfg", + "expect-test", + "itertools", + "la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "paths", + "rustc-hash", + "semver", + "serde", + "serde_json", + "span", + "stdx", + "toolchain", + "tracing", + "triomphe", +] + +[[package]] +name = "protobuf" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55bad9126f378a853655831eb7363b7b01b81d19f8cb1218861086ca4a1a61e" +dependencies = [ + "once_cell", + "protobuf-support", + "thiserror", +] + +[[package]] +name = "protobuf-support" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d4d7b8601c814cfb36bcebb79f0e61e45e1e93640cf778837833bbed05c372" +dependencies = [ + "thiserror", +] + +[[package]] +name = "pulldown-cmark" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" +dependencies = [ + "bitflags 2.4.2", + "memchr", + "unicase", +] + +[[package]] +name = "pulldown-cmark-to-cmark" +version = "10.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0194e6e1966c23cc5fd988714f85b18d548d773e81965413555d96569931833d" +dependencies = [ + "pulldown-cmark", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "ra-ap-rustc_abi" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8709df2a746f055316bc0c62bd30948695a25e734863bf6e1f9755403e010ab" +dependencies = [ + "bitflags 2.4.2", + "ra-ap-rustc_index", + "tracing", +] + +[[package]] +name = "ra-ap-rustc_index" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ad68bacffb87dcdbb23a3ce11261375078aaa06b85d348c49f39ffd5510dc20" +dependencies = [ + "arrayvec", + "ra-ap-rustc_index_macros", + "smallvec", +] + +[[package]] +name = "ra-ap-rustc_index_macros" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8782aaf3a113837c533dfb1c45df91cd17e1fdd1d2f9a20c2e0d1976025c4f1f" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "ra-ap-rustc_lexer" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aab683fc8579d09eb72033bd5dc9ba6d701aa9645b5fed087ef19af71184dff3" +dependencies = [ + "unicode-properties", + "unicode-xid", +] + +[[package]] +name = "ra-ap-rustc_parse_format" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bcf9ff5edbf784b67b8ad5e03a068f1300fcc24062c0d476b3018965135d933" +dependencies = [ + "ra-ap-rustc_index", + "ra-ap-rustc_lexer", +] + +[[package]] +name = "ra-ap-rustc_pattern_analysis" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d63d1e1d5b2a13273cee1a10011147418f40e12b70f70578ce1dee0f1cafc334" +dependencies = [ + "ra-ap-rustc_index", + "rustc-hash", + "rustc_apfloat", + "smallvec", + "tracing", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rayon" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "rowan" +version = "0.15.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a58fa8a7ccff2aec4f39cc45bf5f985cec7125ab271cf681c279fd00192b49" +dependencies = [ + "countme", + "hashbrown", + "memoffset", + "rustc-hash", + "text-size", +] + +[[package]] +name = "rust-analyzer" +version = "0.0.0" +dependencies = [ + "always-assert", + "anyhow", + "cfg", + "crossbeam-channel", + "dissimilar", + "expect-test", + "flycheck", + "hir", + "hir-def", + "hir-ty", + "ide", + "ide-db", + "ide-ssr", + "itertools", + "load-cargo", + "lsp-server 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lsp-types", + "mbe", + "memchr", + "mimalloc", + "nohash-hasher", + "num_cpus", + "oorandom", + "parking_lot", + "parser", + "paths", + "proc-macro-api", + "profile", + "project-model", + "rayon", + "rustc-hash", + "scip", + "semver", + "serde", + "serde_json", + "sourcegen", + "stdx", + "syntax", + "test-fixture", + "test-utils", + "tikv-jemallocator", + "toolchain", + "tracing", + "tracing-subscriber", + "tracing-tree", + "triomphe", + "vfs", + "vfs-notify", + "walkdir", + "winapi", + "xflags", + "xshell", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_apfloat" +version = "0.2.0+llvm-462a31f5a5ab" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465187772033a5ee566f69fe008df03628fce549a0899aae76f0a0c2e34696be" +dependencies = [ + "bitflags 1.3.2", + "smallvec", +] + +[[package]] +name = "ryu" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" + +[[package]] +name = "salsa" +version = "0.0.0" +dependencies = [ + "dissimilar", + "expect-test", + "indexmap", + "itertools", + "linked-hash-map", + "lock_api", + "oorandom", + "parking_lot", + "rand", + "rustc-hash", + "salsa-macros", + "smallvec", + "tracing", + "triomphe", +] + +[[package]] +name = "salsa-macros" +version = "0.0.0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scip" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5dc1bd66649133af84ab62436ddd2856c2605182b02dec2cd197f684dfe15ef" +dependencies = [ + "protobuf", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +dependencies = [ + "serde", +] + +[[package]] +name = "serde" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "smallvec" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" + +[[package]] +name = "smol_str" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6845563ada680337a52d43bb0b29f396f2d911616f6573012645b9e3d048a49" +dependencies = [ + "serde", +] + +[[package]] +name = "snap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" + +[[package]] +name = "sourcegen" +version = "0.0.0" +dependencies = [ + "xshell", +] + +[[package]] +name = "span" +version = "0.0.0" +dependencies = [ + "hashbrown", + "la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hash", + "salsa", + "stdx", + "syntax", + "vfs", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "stdx" +version = "0.0.0" +dependencies = [ + "always-assert", + "backtrace", + "crossbeam-channel", + "itertools", + "jod-thread", + "libc", + "miow", + "winapi", +] + +[[package]] +name = "syn" +version = "2.0.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "syntax" +version = "0.0.0" +dependencies = [ + "cov-mark", + "either", + "expect-test", + "indexmap", + "itertools", + "once_cell", + "parser", + "ra-ap-rustc_lexer", + "rayon", + "rowan", + "rustc-hash", + "smol_str", + "stdx", + "test-utils", + "text-edit", + "tracing", + "triomphe", +] + +[[package]] +name = "test-fixture" +version = "0.0.0" +dependencies = [ + "base-db", + "cfg", + "hir-expand", + "rustc-hash", + "span", + "stdx", + "test-utils", + "tt", +] + +[[package]] +name = "test-utils" +version = "0.0.0" +dependencies = [ + "dissimilar", + "profile", + "rustc-hash", + "stdx", + "text-size", + "tracing", +] + +[[package]] +name = "text-edit" +version = "0.0.0" +dependencies = [ + "itertools", + "text-size", +] + +[[package]] +name = "text-size" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f18aa187839b2bdb1ad2fa35ead8c4c2976b64e4363c386d45ac0f7ee85c9233" + +[[package]] +name = "thiserror" +version = "1.0.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tikv-jemalloc-ctl" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "619bfed27d807b54f7f776b9430d4f8060e66ee138a28632ca898584d462c31c" +dependencies = [ + "libc", + "paste", + "tikv-jemalloc-sys", +] + +[[package]] +name = "tikv-jemalloc-sys" +version = "0.5.4+5.3.0-patched" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "tikv-jemallocator" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965fe0c26be5c56c94e38ba547249074803efd52adfb66de62107d95aab3eaca" +dependencies = [ + "libc", + "tikv-jemalloc-sys", +] + +[[package]] +name = "time" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde", + "time-core", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toolchain" +version = "0.0.0" +dependencies = [ + "camino", + "home", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "sharded-slab", + "thread_local", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "tracing-tree" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65139ecd2c3f6484c3b99bc01c77afe21e95473630747c7aca525e78b0666675" +dependencies = [ + "nu-ansi-term", + "tracing-core", + "tracing-log", + "tracing-subscriber", +] + +[[package]] +name = "triomphe" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" +dependencies = [ + "serde", + "stable_deref_trait", +] + +[[package]] +name = "tt" +version = "0.0.0" +dependencies = [ + "smol_str", + "stdx", + "text-size", +] + +[[package]] +name = "typed-arena" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + +[[package]] +name = "ungrammar" +version = "1.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e5df347f0bf3ec1d670aad6ca5c6a1859cd9ea61d2113125794654ccced68f" + +[[package]] +name = "unicase" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-properties" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "vfs" +version = "0.0.0" +dependencies = [ + "fst", + "indexmap", + "nohash-hasher", + "paths", + "rustc-hash", + "stdx", +] + +[[package]] +name = "vfs-notify" +version = "0.0.0" +dependencies = [ + "crossbeam-channel", + "notify", + "paths", + "stdx", + "tracing", + "vfs", + "walkdir", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.4", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +dependencies = [ + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" + +[[package]] +name = "write-json" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f6174b2566cc4a74f95e1367ec343e7fa80c93cc8087f5c4a3d6a1088b2118" + +[[package]] +name = "xflags" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d9e15fbb3de55454b0106e314b28e671279009b363e6f1d8e39fdc3bf048944" +dependencies = [ + "xflags-macros", +] + +[[package]] +name = "xflags-macros" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "672423d4fea7ffa2f6c25ba60031ea13dc6258070556f125cc4d790007d4a155" + +[[package]] +name = "xshell" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce2107fe03e558353b4c71ad7626d58ed82efaf56c54134228608893c77023ad" +dependencies = [ + "xshell-macros", +] + +[[package]] +name = "xshell-macros" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e2c411759b501fb9501aac2b1b2d287a6e93e5bdcf13c25306b23e1b716dd0e" + +[[package]] +name = "xtask" +version = "0.1.0" +dependencies = [ + "anyhow", + "flate2", + "itertools", + "proc-macro2", + "quote", + "stdx", + "time", + "ungrammar", + "write-json", + "xflags", + "xshell", + "zip", +] + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "byteorder", + "crc32fast", + "crossbeam-utils", + "flate2", + "time", +] diff --git a/src/tools/rust-analyzer/Cargo.toml b/src/tools/rust-analyzer/Cargo.toml new file mode 100644 index 00000000000..d9343d2b963 --- /dev/null +++ b/src/tools/rust-analyzer/Cargo.toml @@ -0,0 +1,205 @@ +[workspace] +members = ["xtask/", "lib/*", "crates/*"] +exclude = ["crates/proc-macro-srv/proc-macro-test/imp"] +resolver = "2" + +[workspace.package] +rust-version = "1.76" +edition = "2021" +license = "MIT OR Apache-2.0" +authors = ["rust-analyzer team"] + +[profile.dev] +# Disabling debug info speeds up builds a bunch, +# and we don't rely on it for debugging that much. +debug = 0 + +[profile.dev.package] +# These speed up local tests. +rowan.opt-level = 3 +rustc-hash.opt-level = 3 +smol_str.opt-level = 3 +text-size.opt-level = 3 +# This speeds up `cargo xtask dist`. +miniz_oxide.opt-level = 3 + +[profile.release] +incremental = true +# Set this to 1 or 2 to get more useful backtraces in debugger. +debug = 0 + +[profile.dev-rel] +inherits = "release" +debug = 2 + +[patch.'crates-io'] +# rowan = { path = "../rowan" } + +# chalk-solve = { path = "../chalk/chalk-solve" } +# chalk-ir = { path = "../chalk/chalk-ir" } +# chalk-recursive = { path = "../chalk/chalk-recursive" } +# chalk-derive = { path = "../chalk/chalk-derive" } +# line-index = { path = "lib/line-index" } +# la-arena = { path = "lib/la-arena" } +# lsp-server = { path = "lib/lsp-server" } + + +# ungrammar = { path = "../ungrammar" } + +# rust-analyzer-salsa = { path = "../salsa" } + +[workspace.dependencies] +# local crates +base-db = { path = "./crates/base-db", version = "0.0.0" } +cfg = { path = "./crates/cfg", version = "0.0.0" } +flycheck = { path = "./crates/flycheck", version = "0.0.0" } +hir = { path = "./crates/hir", version = "0.0.0" } +hir-def = { path = "./crates/hir-def", version = "0.0.0" } +hir-expand = { path = "./crates/hir-expand", version = "0.0.0" } +hir-ty = { path = "./crates/hir-ty", version = "0.0.0" } +ide = { path = "./crates/ide", version = "0.0.0" } +ide-assists = { path = "./crates/ide-assists", version = "0.0.0" } +ide-completion = { path = "./crates/ide-completion", version = "0.0.0" } +ide-db = { path = "./crates/ide-db", version = "0.0.0" } +ide-diagnostics = { path = "./crates/ide-diagnostics", version = "0.0.0" } +ide-ssr = { path = "./crates/ide-ssr", version = "0.0.0" } +intern = { path = "./crates/intern", version = "0.0.0" } +limit = { path = "./crates/limit", version = "0.0.0" } +load-cargo = { path = "./crates/load-cargo", version = "0.0.0" } +mbe = { path = "./crates/mbe", version = "0.0.0" } +parser = { path = "./crates/parser", version = "0.0.0" } +paths = { path = "./crates/paths", version = "0.0.0" } +proc-macro-api = { path = "./crates/proc-macro-api", version = "0.0.0" } +proc-macro-srv = { path = "./crates/proc-macro-srv", version = "0.0.0" } +proc-macro-srv-cli = { path = "./crates/proc-macro-srv-cli", version = "0.0.0" } +profile = { path = "./crates/profile", version = "0.0.0" } +project-model = { path = "./crates/project-model", version = "0.0.0" } +salsa = { path = "./crates/salsa", version = "0.0.0" } +span = { path = "./crates/span", version = "0.0.0" } +stdx = { path = "./crates/stdx", version = "0.0.0" } +syntax = { path = "./crates/syntax", version = "0.0.0" } +text-edit = { path = "./crates/text-edit", version = "0.0.0" } +toolchain = { path = "./crates/toolchain", version = "0.0.0" } +tt = { path = "./crates/tt", version = "0.0.0" } +vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" } +vfs = { path = "./crates/vfs", version = "0.0.0" } + +ra-ap-rustc_lexer = { version = "0.44.0", default-features = false } +ra-ap-rustc_parse_format = { version = "0.44.0", default-features = false } +ra-ap-rustc_index = { version = "0.44.0", default-features = false } +ra-ap-rustc_abi = { version = "0.44.0", default-features = false } +ra-ap-rustc_pattern_analysis = { version = "0.44.0", default-features = false } + +# local crates that aren't published to crates.io. These should not have versions. +sourcegen = { path = "./crates/sourcegen" } +test-fixture = { path = "./crates/test-fixture" } +test-utils = { path = "./crates/test-utils" } + +# In-tree crates that are published separately and follow semver. See lib/README.md +line-index = { version = "0.1.1" } +la-arena = { version = "0.3.1" } +lsp-server = { version = "0.7.6" } + +# non-local crates +anyhow = "1.0.75" +arrayvec = "0.7.4" +bitflags = "2.4.1" +cargo_metadata = "0.18.1" +camino = "1.1.6" +chalk-solve = { version = "0.96.0", default-features = false } +chalk-ir = "0.96.0" +chalk-recursive = { version = "0.96.0", default-features = false } +chalk-derive = "0.96.0" +command-group = "2.0.1" +crossbeam-channel = "0.5.8" +dissimilar = "1.0.7" +dot = "0.1.4" +either = "1.9.0" +expect-test = "1.4.0" +hashbrown = { version = "0.14", features = [ + "inline-more", +], default-features = false } +indexmap = "2.1.0" +itertools = "0.12.0" +libc = "0.2.150" +nohash-hasher = "0.2.0" +oorandom = "11.1.3" +object = { version = "0.33.0", default-features = false, features = [ + "std", + "read_core", + "elf", + "macho", + "pe", +] } +pulldown-cmark-to-cmark = "10.0.4" +pulldown-cmark = { version = "0.9.0", default-features = false } +rayon = "1.8.0" +rustc-hash = "1.1.0" +semver = "1.0.14" +serde = { version = "1.0.192", features = ["derive"] } +serde_json = "1.0.108" +smallvec = { version = "1.10.0", features = [ + "const_new", + "union", + "const_generics", +] } +smol_str = "0.2.1" +text-size = "1.1.1" +tracing = "0.1.40" +tracing-tree = "0.3.0" +tracing-subscriber = { version = "0.3.18", default-features = false, features = [ + "registry", + "fmt", + "tracing-log", +] } +triomphe = { version = "0.1.10", default-features = false, features = ["std"] } +url = "2.3.1" +xshell = "0.2.5" + + +# We need to freeze the version of the crate, as the raw-api feature is considered unstable +dashmap = { version = "=5.5.3", features = ["raw-api"] } + +[workspace.lints.rust] +rust_2018_idioms = "warn" +unused_lifetimes = "warn" +unreachable_pub = "warn" +semicolon_in_expressions_from_macros = "warn" + +[workspace.lints.clippy] +# FIXME Remove the tidy test once the lint table is stable + +## lint groups +complexity = { level = "warn", priority = -1 } +correctness = { level = "deny", priority = -1 } +perf = { level = "deny", priority = -1 } +restriction = { level = "allow", priority = -1 } +style = { level = "warn", priority = -1 } +suspicious = { level = "warn", priority = -1 } + +## allow following lints +# () makes a fine error in most cases +result_unit_err = "allow" +# We don't expose public APIs that matter like this +len_without_is_empty = "allow" +# We have macros that rely on this currently +enum_variant_names = "allow" +# Builder pattern disagrees +new_ret_no_self = "allow" +# Has a bunch of false positives +useless_asref = "allow" + +## Following lints should be tackled at some point +too_many_arguments = "allow" +type_complexity = "allow" +wrong_self_convention = "allow" + +## warn at following lints +# CI raises these to deny +dbg_macro = "warn" +todo = "warn" +print_stdout = "warn" +print_stderr = "warn" + +rc_buffer = "warn" +str_to_string = "warn" diff --git a/src/tools/rust-analyzer/LICENSE-APACHE b/src/tools/rust-analyzer/LICENSE-APACHE new file mode 100644 index 00000000000..16fe87b06e8 --- /dev/null +++ b/src/tools/rust-analyzer/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/src/tools/rust-analyzer/LICENSE-MIT b/src/tools/rust-analyzer/LICENSE-MIT new file mode 100644 index 00000000000..31aa79387f2 --- /dev/null +++ b/src/tools/rust-analyzer/LICENSE-MIT @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/src/tools/rust-analyzer/PRIVACY.md b/src/tools/rust-analyzer/PRIVACY.md new file mode 100644 index 00000000000..89e252be731 --- /dev/null +++ b/src/tools/rust-analyzer/PRIVACY.md @@ -0,0 +1 @@ +See the [Privacy](https://rust-analyzer.github.io/manual.html#privacy) section of the user manual. diff --git a/src/tools/rust-analyzer/README.md b/src/tools/rust-analyzer/README.md new file mode 100644 index 00000000000..8c3f6f8468b --- /dev/null +++ b/src/tools/rust-analyzer/README.md @@ -0,0 +1,49 @@ +

+ rust-analyzer logo +

+ +rust-analyzer is a modular compiler frontend for the Rust language. +It is a part of a larger rls-2.0 effort to create excellent IDE support for Rust. + +## Quick Start + +https://rust-analyzer.github.io/manual.html#installation + +## Documentation + +If you want to **contribute** to rust-analyzer or are just curious about how +things work under the hood, check the [./docs/dev](./docs/dev) folder. + +If you want to **use** rust-analyzer's language server with your editor of +choice, check [the manual](https://rust-analyzer.github.io/manual.html) folder. +It also contains some tips & tricks to help you be more productive when using rust-analyzer. + +## Security and Privacy + +See the corresponding sections of [the manual](https://rust-analyzer.github.io/manual.html#security). + +## Communication + +For usage and troubleshooting requests, please use "IDEs and Editors" category of the Rust forum: + +https://users.rust-lang.org/c/ide/14 + +For questions about development and implementation, join rust-analyzer working group on Zulip: + +https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer + +## Quick Links + +* Website: https://rust-analyzer.github.io/ +* Metrics: https://rust-analyzer.github.io/metrics/ +* API docs: https://rust-lang.github.io/rust-analyzer/ide/ +* Changelog: https://rust-analyzer.github.io/thisweek + +## License + +rust-analyzer is primarily distributed under the terms of both the MIT +license and the Apache License (Version 2.0). + +See LICENSE-APACHE and LICENSE-MIT for details. diff --git a/src/tools/rust-analyzer/assets/logo-square.svg b/src/tools/rust-analyzer/assets/logo-square.svg new file mode 100644 index 00000000000..fe1c1fa0227 --- /dev/null +++ b/src/tools/rust-analyzer/assets/logo-square.svg @@ -0,0 +1,88 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/src/tools/rust-analyzer/assets/logo-wide.svg b/src/tools/rust-analyzer/assets/logo-wide.svg new file mode 100644 index 00000000000..c5fb55b36a8 --- /dev/null +++ b/src/tools/rust-analyzer/assets/logo-wide.svg @@ -0,0 +1,142 @@ + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/tools/rust-analyzer/bench_data/glorious_old_parser b/src/tools/rust-analyzer/bench_data/glorious_old_parser new file mode 100644 index 00000000000..f593f2b2955 --- /dev/null +++ b/src/tools/rust-analyzer/bench_data/glorious_old_parser @@ -0,0 +1,8562 @@ +use crate::ast::{AngleBracketedArgs, ParenthesizedArgs, AttrStyle, BareFnTy}; +use crate::ast::{GenericBound, TraitBoundModifier}; +use crate::ast::Unsafety; +use crate::ast::{Mod, AnonConst, Arg, Arm, Guard, Attribute, BindingMode, TraitItemKind}; +use crate::ast::Block; +use crate::ast::{BlockCheckMode, CaptureBy, Movability}; +use crate::ast::{Constness, Crate}; +use crate::ast::Defaultness; +use crate::ast::EnumDef; +use crate::ast::{Expr, ExprKind, RangeLimits}; +use crate::ast::{Field, FnDecl, FnHeader}; +use crate::ast::{ForeignItem, ForeignItemKind, FunctionRetTy}; +use crate::ast::{GenericParam, GenericParamKind}; +use crate::ast::GenericArg; +use crate::ast::{Ident, ImplItem, IsAsync, IsAuto, Item, ItemKind}; +use crate::ast::{Label, Lifetime, Lit, LitKind}; +use crate::ast::Local; +use crate::ast::MacStmtStyle; +use crate::ast::{Mac, Mac_, MacDelimiter}; +use crate::ast::{MutTy, Mutability}; +use crate::ast::{Pat, PatKind, PathSegment}; +use crate::ast::{PolyTraitRef, QSelf}; +use crate::ast::{Stmt, StmtKind}; +use crate::ast::{VariantData, StructField}; +use crate::ast::StrStyle; +use crate::ast::SelfKind; +use crate::ast::{TraitItem, TraitRef, TraitObjectSyntax}; +use crate::ast::{Ty, TyKind, TypeBinding, GenericBounds}; +use crate::ast::{Visibility, VisibilityKind, WhereClause, CrateSugar}; +use crate::ast::{UseTree, UseTreeKind}; +use crate::ast::{BinOpKind, UnOp}; +use crate::ast::{RangeEnd, RangeSyntax}; +use crate::{ast, attr}; +use crate::ext::base::DummyResult; +use crate::source_map::{self, SourceMap, Spanned, respan}; +use crate::parse::{self, SeqSep, classify, token}; +use crate::parse::lexer::{TokenAndSpan, UnmatchedBrace}; +use crate::parse::lexer::comments::{doc_comment_style, strip_doc_comment_decoration}; +use crate::parse::token::DelimToken; +use crate::parse::{new_sub_parser_from_file, ParseSess, Directory, DirectoryOwnership}; +use crate::util::parser::{AssocOp, Fixity}; +use crate::print::pprust; +use crate::ptr::P; +use crate::parse::PResult; +use crate::ThinVec; +use crate::tokenstream::{self, DelimSpan, TokenTree, TokenStream, TreeAndJoint}; +use crate::symbol::{Symbol, keywords}; + +use errors::{Applicability, DiagnosticBuilder, DiagnosticId}; +use rustc_target::spec::abi::{self, Abi}; +use syntax_pos::{Span, MultiSpan, BytePos, FileName}; +use log::{debug, trace}; + +use std::borrow::Cow; +use std::cmp; +use std::mem; +use std::path::{self, Path, PathBuf}; +use std::slice; + +#[derive(Debug)] +/// Whether the type alias or associated type is a concrete type or an existential type +pub enum AliasKind { + /// Just a new name for the same type + Weak(P), + /// Only trait impls of the type will be usable, not the actual type itself + Existential(GenericBounds), +} + +bitflags::bitflags! { + struct Restrictions: u8 { + const STMT_EXPR = 1 << 0; + const NO_STRUCT_LITERAL = 1 << 1; + } +} + +type ItemInfo = (Ident, ItemKind, Option>); + +/// Specifies how to parse a path. +#[derive(Copy, Clone, PartialEq)] +pub enum PathStyle { + /// In some contexts, notably in expressions, paths with generic arguments are ambiguous + /// with something else. For example, in expressions `segment < ....` can be interpreted + /// as a comparison and `segment ( ....` can be interpreted as a function call. + /// In all such contexts the non-path interpretation is preferred by default for practical + /// reasons, but the path interpretation can be forced by the disambiguator `::`, e.g. + /// `x` - comparisons, `x::` - unambiguously a path. + Expr, + /// In other contexts, notably in types, no ambiguity exists and paths can be written + /// without the disambiguator, e.g., `x` - unambiguously a path. + /// Paths with disambiguators are still accepted, `x::` - unambiguously a path too. + Type, + /// A path with generic arguments disallowed, e.g., `foo::bar::Baz`, used in imports, + /// visibilities or attributes. + /// Technically, this variant is unnecessary and e.g., `Expr` can be used instead + /// (paths in "mod" contexts have to be checked later for absence of generic arguments + /// anyway, due to macros), but it is used to avoid weird suggestions about expected + /// tokens when something goes wrong. + Mod, +} + +#[derive(Clone, Copy, PartialEq, Debug)] +enum SemiColonMode { + Break, + Ignore, + Comma, +} + +#[derive(Clone, Copy, PartialEq, Debug)] +enum BlockMode { + Break, + Ignore, +} + +/// Possibly accepts an `token::Interpolated` expression (a pre-parsed expression +/// dropped into the token stream, which happens while parsing the result of +/// macro expansion). Placement of these is not as complex as I feared it would +/// be. The important thing is to make sure that lookahead doesn't balk at +/// `token::Interpolated` tokens. +macro_rules! maybe_whole_expr { + ($p:expr) => { + if let token::Interpolated(nt) = $p.token.clone() { + match *nt { + token::NtExpr(ref e) | token::NtLiteral(ref e) => { + $p.bump(); + return Ok((*e).clone()); + } + token::NtPath(ref path) => { + $p.bump(); + let span = $p.span; + let kind = ExprKind::Path(None, (*path).clone()); + return Ok($p.mk_expr(span, kind, ThinVec::new())); + } + token::NtBlock(ref block) => { + $p.bump(); + let span = $p.span; + let kind = ExprKind::Block((*block).clone(), None); + return Ok($p.mk_expr(span, kind, ThinVec::new())); + } + _ => {}, + }; + } + } +} + +/// As maybe_whole_expr, but for things other than expressions +macro_rules! maybe_whole { + ($p:expr, $constructor:ident, |$x:ident| $e:expr) => { + if let token::Interpolated(nt) = $p.token.clone() { + if let token::$constructor($x) = (*nt).clone() { + $p.bump(); + return Ok($e); + } + } + }; +} + +fn maybe_append(mut lhs: Vec, mut rhs: Option>) -> Vec { + if let Some(ref mut rhs) = rhs { + lhs.append(rhs); + } + lhs +} + +#[derive(Debug, Clone, Copy, PartialEq)] +enum PrevTokenKind { + DocComment, + Comma, + Plus, + Interpolated, + Eof, + Ident, + Other, +} + +trait RecoverQPath: Sized { + const PATH_STYLE: PathStyle = PathStyle::Expr; + fn to_ty(&self) -> Option>; + fn to_recovered(&self, qself: Option, path: ast::Path) -> Self; + fn to_string(&self) -> String; +} + +impl RecoverQPath for Ty { + const PATH_STYLE: PathStyle = PathStyle::Type; + fn to_ty(&self) -> Option> { + Some(P(self.clone())) + } + fn to_recovered(&self, qself: Option, path: ast::Path) -> Self { + Self { span: path.span, node: TyKind::Path(qself, path), id: self.id } + } + fn to_string(&self) -> String { + pprust::ty_to_string(self) + } +} + +impl RecoverQPath for Pat { + fn to_ty(&self) -> Option> { + self.to_ty() + } + fn to_recovered(&self, qself: Option, path: ast::Path) -> Self { + Self { span: path.span, node: PatKind::Path(qself, path), id: self.id } + } + fn to_string(&self) -> String { + pprust::pat_to_string(self) + } +} + +impl RecoverQPath for Expr { + fn to_ty(&self) -> Option> { + self.to_ty() + } + fn to_recovered(&self, qself: Option, path: ast::Path) -> Self { + Self { span: path.span, node: ExprKind::Path(qself, path), + id: self.id, attrs: self.attrs.clone() } + } + fn to_string(&self) -> String { + pprust::expr_to_string(self) + } +} + +/* ident is handled by common.rs */ + +#[derive(Clone)] +pub struct Parser<'a> { + pub sess: &'a ParseSess, + /// the current token: + pub token: token::Token, + /// the span of the current token: + pub span: Span, + /// the span of the previous token: + meta_var_span: Option, + pub prev_span: Span, + /// the previous token kind + prev_token_kind: PrevTokenKind, + restrictions: Restrictions, + /// Used to determine the path to externally loaded source files + crate directory: Directory<'a>, + /// Whether to parse sub-modules in other files. + pub recurse_into_file_modules: bool, + /// Name of the root module this parser originated from. If `None`, then the + /// name is not known. This does not change while the parser is descending + /// into modules, and sub-parsers have new values for this name. + pub root_module_name: Option, + crate expected_tokens: Vec, + token_cursor: TokenCursor, + desugar_doc_comments: bool, + /// Whether we should configure out of line modules as we parse. + pub cfg_mods: bool, + /// This field is used to keep track of how many left angle brackets we have seen. This is + /// required in order to detect extra leading left angle brackets (`<` characters) and error + /// appropriately. + /// + /// See the comments in the `parse_path_segment` function for more details. + crate unmatched_angle_bracket_count: u32, + crate max_angle_bracket_count: u32, + /// List of all unclosed delimiters found by the lexer. If an entry is used for error recovery + /// it gets removed from here. Every entry left at the end gets emitted as an independent + /// error. + crate unclosed_delims: Vec, +} + + +#[derive(Clone)] +struct TokenCursor { + frame: TokenCursorFrame, + stack: Vec, +} + +#[derive(Clone)] +struct TokenCursorFrame { + delim: token::DelimToken, + span: DelimSpan, + open_delim: bool, + tree_cursor: tokenstream::Cursor, + close_delim: bool, + last_token: LastToken, +} + +/// This is used in `TokenCursorFrame` above to track tokens that are consumed +/// by the parser, and then that's transitively used to record the tokens that +/// each parse AST item is created with. +/// +/// Right now this has two states, either collecting tokens or not collecting +/// tokens. If we're collecting tokens we just save everything off into a local +/// `Vec`. This should eventually though likely save tokens from the original +/// token stream and just use slicing of token streams to avoid creation of a +/// whole new vector. +/// +/// The second state is where we're passively not recording tokens, but the last +/// token is still tracked for when we want to start recording tokens. This +/// "last token" means that when we start recording tokens we'll want to ensure +/// that this, the first token, is included in the output. +/// +/// You can find some more example usage of this in the `collect_tokens` method +/// on the parser. +#[derive(Clone)] +enum LastToken { + Collecting(Vec), + Was(Option), +} + +impl TokenCursorFrame { + fn new(sp: DelimSpan, delim: DelimToken, tts: &TokenStream) -> Self { + TokenCursorFrame { + delim: delim, + span: sp, + open_delim: delim == token::NoDelim, + tree_cursor: tts.clone().into_trees(), + close_delim: delim == token::NoDelim, + last_token: LastToken::Was(None), + } + } +} + +impl TokenCursor { + fn next(&mut self) -> TokenAndSpan { + loop { + let tree = if !self.frame.open_delim { + self.frame.open_delim = true; + TokenTree::open_tt(self.frame.span.open, self.frame.delim) + } else if let Some(tree) = self.frame.tree_cursor.next() { + tree + } else if !self.frame.close_delim { + self.frame.close_delim = true; + TokenTree::close_tt(self.frame.span.close, self.frame.delim) + } else if let Some(frame) = self.stack.pop() { + self.frame = frame; + continue + } else { + return TokenAndSpan { tok: token::Eof, sp: syntax_pos::DUMMY_SP } + }; + + match self.frame.last_token { + LastToken::Collecting(ref mut v) => v.push(tree.clone().into()), + LastToken::Was(ref mut t) => *t = Some(tree.clone().into()), + } + + match tree { + TokenTree::Token(sp, tok) => return TokenAndSpan { tok: tok, sp: sp }, + TokenTree::Delimited(sp, delim, tts) => { + let frame = TokenCursorFrame::new(sp, delim, &tts); + self.stack.push(mem::replace(&mut self.frame, frame)); + } + } + } + } + + fn next_desugared(&mut self) -> TokenAndSpan { + let (sp, name) = match self.next() { + TokenAndSpan { sp, tok: token::DocComment(name) } => (sp, name), + tok => return tok, + }; + + let stripped = strip_doc_comment_decoration(&name.as_str()); + + // Searches for the occurrences of `"#*` and returns the minimum number of `#`s + // required to wrap the text. + let mut num_of_hashes = 0; + let mut count = 0; + for ch in stripped.chars() { + count = match ch { + '"' => 1, + '#' if count > 0 => count + 1, + _ => 0, + }; + num_of_hashes = cmp::max(num_of_hashes, count); + } + + let delim_span = DelimSpan::from_single(sp); + let body = TokenTree::Delimited( + delim_span, + token::Bracket, + [TokenTree::Token(sp, token::Ident(ast::Ident::from_str("doc"), false)), + TokenTree::Token(sp, token::Eq), + TokenTree::Token(sp, token::Literal( + token::StrRaw(Symbol::intern(&stripped), num_of_hashes), None)) + ] + .iter().cloned().collect::().into(), + ); + + self.stack.push(mem::replace(&mut self.frame, TokenCursorFrame::new( + delim_span, + token::NoDelim, + &if doc_comment_style(&name.as_str()) == AttrStyle::Inner { + [TokenTree::Token(sp, token::Pound), TokenTree::Token(sp, token::Not), body] + .iter().cloned().collect::().into() + } else { + [TokenTree::Token(sp, token::Pound), body] + .iter().cloned().collect::().into() + }, + ))); + + self.next() + } +} + +#[derive(Clone, PartialEq)] +crate enum TokenType { + Token(token::Token), + Keyword(keywords::Keyword), + Operator, + Lifetime, + Ident, + Path, + Type, + Const, +} + +impl TokenType { + fn to_string(&self) -> String { + match *self { + TokenType::Token(ref t) => format!("`{}`", pprust::token_to_string(t)), + TokenType::Keyword(kw) => format!("`{}`", kw.name()), + TokenType::Operator => "an operator".to_string(), + TokenType::Lifetime => "lifetime".to_string(), + TokenType::Ident => "identifier".to_string(), + TokenType::Path => "path".to_string(), + TokenType::Type => "type".to_string(), + TokenType::Const => "const".to_string(), + } + } +} + +/// Returns `true` if `IDENT t` can start a type -- `IDENT::a::b`, `IDENT`, +/// `IDENT<::AssocTy>`. +/// +/// Types can also be of the form `IDENT(u8, u8) -> u8`, however this assumes +/// that `IDENT` is not the ident of a fn trait. +fn can_continue_type_after_non_fn_ident(t: &token::Token) -> bool { + t == &token::ModSep || t == &token::Lt || + t == &token::BinOp(token::Shl) +} + +/// Information about the path to a module. +pub struct ModulePath { + name: String, + path_exists: bool, + pub result: Result, +} + +pub struct ModulePathSuccess { + pub path: PathBuf, + pub directory_ownership: DirectoryOwnership, + warn: bool, +} + +pub enum Error { + FileNotFoundForModule { + mod_name: String, + default_path: String, + secondary_path: String, + dir_path: String, + }, + DuplicatePaths { + mod_name: String, + default_path: String, + secondary_path: String, + }, + UselessDocComment, + InclusiveRangeWithNoEnd, +} + +impl Error { + fn span_err>(self, + sp: S, + handler: &errors::Handler) -> DiagnosticBuilder<'_> { + match self { + Error::FileNotFoundForModule { ref mod_name, + ref default_path, + ref secondary_path, + ref dir_path } => { + let mut err = struct_span_err!(handler, sp, E0583, + "file not found for module `{}`", mod_name); + err.help(&format!("name the file either {} or {} inside the directory \"{}\"", + default_path, + secondary_path, + dir_path)); + err + } + Error::DuplicatePaths { ref mod_name, ref default_path, ref secondary_path } => { + let mut err = struct_span_err!(handler, sp, E0584, + "file for module `{}` found at both {} and {}", + mod_name, + default_path, + secondary_path); + err.help("delete or rename one of them to remove the ambiguity"); + err + } + Error::UselessDocComment => { + let mut err = struct_span_err!(handler, sp, E0585, + "found a documentation comment that doesn't document anything"); + err.help("doc comments must come before what they document, maybe a comment was \ + intended with `//`?"); + err + } + Error::InclusiveRangeWithNoEnd => { + let mut err = struct_span_err!(handler, sp, E0586, + "inclusive range with no end"); + err.help("inclusive ranges must be bounded at the end (`..=b` or `a..=b`)"); + err + } + } + } +} + +#[derive(Debug)] +enum LhsExpr { + NotYetParsed, + AttributesParsed(ThinVec), + AlreadyParsed(P), +} + +impl From>> for LhsExpr { + fn from(o: Option>) -> Self { + if let Some(attrs) = o { + LhsExpr::AttributesParsed(attrs) + } else { + LhsExpr::NotYetParsed + } + } +} + +impl From> for LhsExpr { + fn from(expr: P) -> Self { + LhsExpr::AlreadyParsed(expr) + } +} + +/// Creates a placeholder argument. +fn dummy_arg(span: Span) -> Arg { + let ident = Ident::new(keywords::Invalid.name(), span); + let pat = P(Pat { + id: ast::DUMMY_NODE_ID, + node: PatKind::Ident(BindingMode::ByValue(Mutability::Immutable), ident, None), + span, + }); + let ty = Ty { + node: TyKind::Err, + span, + id: ast::DUMMY_NODE_ID + }; + Arg { ty: P(ty), pat: pat, id: ast::DUMMY_NODE_ID } +} + +#[derive(Copy, Clone, Debug)] +enum TokenExpectType { + Expect, + NoExpect, +} + +impl<'a> Parser<'a> { + pub fn new(sess: &'a ParseSess, + tokens: TokenStream, + directory: Option>, + recurse_into_file_modules: bool, + desugar_doc_comments: bool) + -> Self { + let mut parser = Parser { + sess, + token: token::Whitespace, + span: syntax_pos::DUMMY_SP, + prev_span: syntax_pos::DUMMY_SP, + meta_var_span: None, + prev_token_kind: PrevTokenKind::Other, + restrictions: Restrictions::empty(), + recurse_into_file_modules, + directory: Directory { + path: Cow::from(PathBuf::new()), + ownership: DirectoryOwnership::Owned { relative: None } + }, + root_module_name: None, + expected_tokens: Vec::new(), + token_cursor: TokenCursor { + frame: TokenCursorFrame::new( + DelimSpan::dummy(), + token::NoDelim, + &tokens.into(), + ), + stack: Vec::new(), + }, + desugar_doc_comments, + cfg_mods: true, + unmatched_angle_bracket_count: 0, + max_angle_bracket_count: 0, + unclosed_delims: Vec::new(), + }; + + let tok = parser.next_tok(); + parser.token = tok.tok; + parser.span = tok.sp; + + if let Some(directory) = directory { + parser.directory = directory; + } else if !parser.span.is_dummy() { + if let FileName::Real(mut path) = sess.source_map().span_to_unmapped_path(parser.span) { + path.pop(); + parser.directory.path = Cow::from(path); + } + } + + parser.process_potential_macro_variable(); + parser + } + + fn next_tok(&mut self) -> TokenAndSpan { + let mut next = if self.desugar_doc_comments { + self.token_cursor.next_desugared() + } else { + self.token_cursor.next() + }; + if next.sp.is_dummy() { + // Tweak the location for better diagnostics, but keep syntactic context intact. + next.sp = self.prev_span.with_ctxt(next.sp.ctxt()); + } + next + } + + /// Converts the current token to a string using `self`'s reader. + pub fn this_token_to_string(&self) -> String { + pprust::token_to_string(&self.token) + } + + fn token_descr(&self) -> Option<&'static str> { + Some(match &self.token { + t if t.is_special_ident() => "reserved identifier", + t if t.is_used_keyword() => "keyword", + t if t.is_unused_keyword() => "reserved keyword", + token::DocComment(..) => "doc comment", + _ => return None, + }) + } + + fn this_token_descr(&self) -> String { + if let Some(prefix) = self.token_descr() { + format!("{} `{}`", prefix, self.this_token_to_string()) + } else { + format!("`{}`", self.this_token_to_string()) + } + } + + fn unexpected_last(&self, t: &token::Token) -> PResult<'a, T> { + let token_str = pprust::token_to_string(t); + Err(self.span_fatal(self.prev_span, &format!("unexpected token: `{}`", token_str))) + } + + crate fn unexpected(&mut self) -> PResult<'a, T> { + match self.expect_one_of(&[], &[]) { + Err(e) => Err(e), + Ok(_) => unreachable!(), + } + } + + /// Expects and consumes the token `t`. Signals an error if the next token is not `t`. + pub fn expect(&mut self, t: &token::Token) -> PResult<'a, bool /* recovered */> { + if self.expected_tokens.is_empty() { + if self.token == *t { + self.bump(); + Ok(false) + } else { + let token_str = pprust::token_to_string(t); + let this_token_str = self.this_token_descr(); + let mut err = self.fatal(&format!("expected `{}`, found {}", + token_str, + this_token_str)); + + let sp = if self.token == token::Token::Eof { + // EOF, don't want to point at the following char, but rather the last token + self.prev_span + } else { + self.sess.source_map().next_point(self.prev_span) + }; + let label_exp = format!("expected `{}`", token_str); + match self.recover_closing_delimiter(&[t.clone()], err) { + Err(e) => err = e, + Ok(recovered) => { + return Ok(recovered); + } + } + let cm = self.sess.source_map(); + match (cm.lookup_line(self.span.lo()), cm.lookup_line(sp.lo())) { + (Ok(ref a), Ok(ref b)) if a.line == b.line => { + // When the spans are in the same line, it means that the only content + // between them is whitespace, point only at the found token. + err.span_label(self.span, label_exp); + } + _ => { + err.span_label(sp, label_exp); + err.span_label(self.span, "unexpected token"); + } + } + Err(err) + } + } else { + self.expect_one_of(slice::from_ref(t), &[]) + } + } + + fn recover_closing_delimiter( + &mut self, + tokens: &[token::Token], + mut err: DiagnosticBuilder<'a>, + ) -> PResult<'a, bool> { + let mut pos = None; + // we want to use the last closing delim that would apply + for (i, unmatched) in self.unclosed_delims.iter().enumerate().rev() { + if tokens.contains(&token::CloseDelim(unmatched.expected_delim)) + && Some(self.span) > unmatched.unclosed_span + { + pos = Some(i); + } + } + match pos { + Some(pos) => { + // Recover and assume that the detected unclosed delimiter was meant for + // this location. Emit the diagnostic and act as if the delimiter was + // present for the parser's sake. + + // Don't attempt to recover from this unclosed delimiter more than once. + let unmatched = self.unclosed_delims.remove(pos); + let delim = TokenType::Token(token::CloseDelim(unmatched.expected_delim)); + + // We want to suggest the inclusion of the closing delimiter where it makes + // the most sense, which is immediately after the last token: + // + // {foo(bar {}} + // - ^ + // | | + // | help: `)` may belong here (FIXME: #58270) + // | + // unclosed delimiter + if let Some(sp) = unmatched.unclosed_span { + err.span_label(sp, "unclosed delimiter"); + } + err.span_suggestion_short( + self.sess.source_map().next_point(self.prev_span), + &format!("{} may belong here", delim.to_string()), + delim.to_string(), + Applicability::MaybeIncorrect, + ); + err.emit(); + self.expected_tokens.clear(); // reduce errors + Ok(true) + } + _ => Err(err), + } + } + + /// Expect next token to be edible or inedible token. If edible, + /// then consume it; if inedible, then return without consuming + /// anything. Signal a fatal error if next token is unexpected. + pub fn expect_one_of( + &mut self, + edible: &[token::Token], + inedible: &[token::Token], + ) -> PResult<'a, bool /* recovered */> { + fn tokens_to_string(tokens: &[TokenType]) -> String { + let mut i = tokens.iter(); + // This might be a sign we need a connect method on Iterator. + let b = i.next() + .map_or(String::new(), |t| t.to_string()); + i.enumerate().fold(b, |mut b, (i, a)| { + if tokens.len() > 2 && i == tokens.len() - 2 { + b.push_str(", or "); + } else if tokens.len() == 2 && i == tokens.len() - 2 { + b.push_str(" or "); + } else { + b.push_str(", "); + } + b.push_str(&a.to_string()); + b + }) + } + if edible.contains(&self.token) { + self.bump(); + Ok(false) + } else if inedible.contains(&self.token) { + // leave it in the input + Ok(false) + } else { + let mut expected = edible.iter() + .map(|x| TokenType::Token(x.clone())) + .chain(inedible.iter().map(|x| TokenType::Token(x.clone()))) + .chain(self.expected_tokens.iter().cloned()) + .collect::>(); + expected.sort_by_cached_key(|x| x.to_string()); + expected.dedup(); + let expect = tokens_to_string(&expected[..]); + let actual = self.this_token_to_string(); + let (msg_exp, (label_sp, label_exp)) = if expected.len() > 1 { + let short_expect = if expected.len() > 6 { + format!("{} possible tokens", expected.len()) + } else { + expect.clone() + }; + (format!("expected one of {}, found `{}`", expect, actual), + (self.sess.source_map().next_point(self.prev_span), + format!("expected one of {} here", short_expect))) + } else if expected.is_empty() { + (format!("unexpected token: `{}`", actual), + (self.prev_span, "unexpected token after this".to_string())) + } else { + (format!("expected {}, found `{}`", expect, actual), + (self.sess.source_map().next_point(self.prev_span), + format!("expected {} here", expect))) + }; + let mut err = self.fatal(&msg_exp); + if self.token.is_ident_named("and") { + err.span_suggestion_short( + self.span, + "use `&&` instead of `and` for the boolean operator", + "&&".to_string(), + Applicability::MaybeIncorrect, + ); + } + if self.token.is_ident_named("or") { + err.span_suggestion_short( + self.span, + "use `||` instead of `or` for the boolean operator", + "||".to_string(), + Applicability::MaybeIncorrect, + ); + } + let sp = if self.token == token::Token::Eof { + // This is EOF, don't want to point at the following char, but rather the last token + self.prev_span + } else { + label_sp + }; + match self.recover_closing_delimiter(&expected.iter().filter_map(|tt| match tt { + TokenType::Token(t) => Some(t.clone()), + _ => None, + }).collect::>(), err) { + Err(e) => err = e, + Ok(recovered) => { + return Ok(recovered); + } + } + + let cm = self.sess.source_map(); + match (cm.lookup_line(self.span.lo()), cm.lookup_line(sp.lo())) { + (Ok(ref a), Ok(ref b)) if a.line == b.line => { + // When the spans are in the same line, it means that the only content between + // them is whitespace, point at the found token in that case: + // + // X | () => { syntax error }; + // | ^^^^^ expected one of 8 possible tokens here + // + // instead of having: + // + // X | () => { syntax error }; + // | -^^^^^ unexpected token + // | | + // | expected one of 8 possible tokens here + err.span_label(self.span, label_exp); + } + _ if self.prev_span == syntax_pos::DUMMY_SP => { + // Account for macro context where the previous span might not be + // available to avoid incorrect output (#54841). + err.span_label(self.span, "unexpected token"); + } + _ => { + err.span_label(sp, label_exp); + err.span_label(self.span, "unexpected token"); + } + } + Err(err) + } + } + + /// Returns the span of expr, if it was not interpolated or the span of the interpolated token. + fn interpolated_or_expr_span(&self, + expr: PResult<'a, P>) + -> PResult<'a, (Span, P)> { + expr.map(|e| { + if self.prev_token_kind == PrevTokenKind::Interpolated { + (self.prev_span, e) + } else { + (e.span, e) + } + }) + } + + fn expected_ident_found(&self) -> DiagnosticBuilder<'a> { + let mut err = self.struct_span_err(self.span, + &format!("expected identifier, found {}", + self.this_token_descr())); + if let token::Ident(ident, false) = &self.token { + if ident.is_reserved() && !ident.is_path_segment_keyword() && + ident.name != keywords::Underscore.name() + { + err.span_suggestion( + self.span, + "you can escape reserved keywords to use them as identifiers", + format!("r#{}", ident), + Applicability::MaybeIncorrect, + ); + } + } + if let Some(token_descr) = self.token_descr() { + err.span_label(self.span, format!("expected identifier, found {}", token_descr)); + } else { + err.span_label(self.span, "expected identifier"); + if self.token == token::Comma && self.look_ahead(1, |t| t.is_ident()) { + err.span_suggestion( + self.span, + "remove this comma", + String::new(), + Applicability::MachineApplicable, + ); + } + } + err + } + + pub fn parse_ident(&mut self) -> PResult<'a, ast::Ident> { + self.parse_ident_common(true) + } + + fn parse_ident_common(&mut self, recover: bool) -> PResult<'a, ast::Ident> { + match self.token { + token::Ident(ident, _) => { + if self.token.is_reserved_ident() { + let mut err = self.expected_ident_found(); + if recover { + err.emit(); + } else { + return Err(err); + } + } + let span = self.span; + self.bump(); + Ok(Ident::new(ident.name, span)) + } + _ => { + Err(if self.prev_token_kind == PrevTokenKind::DocComment { + self.span_fatal_err(self.prev_span, Error::UselessDocComment) + } else { + self.expected_ident_found() + }) + } + } + } + + /// Checks if the next token is `tok`, and returns `true` if so. + /// + /// This method will automatically add `tok` to `expected_tokens` if `tok` is not + /// encountered. + crate fn check(&mut self, tok: &token::Token) -> bool { + let is_present = self.token == *tok; + if !is_present { self.expected_tokens.push(TokenType::Token(tok.clone())); } + is_present + } + + /// Consumes a token 'tok' if it exists. Returns whether the given token was present. + pub fn eat(&mut self, tok: &token::Token) -> bool { + let is_present = self.check(tok); + if is_present { self.bump() } + is_present + } + + fn check_keyword(&mut self, kw: keywords::Keyword) -> bool { + self.expected_tokens.push(TokenType::Keyword(kw)); + self.token.is_keyword(kw) + } + + /// If the next token is the given keyword, eats it and returns + /// `true`. Otherwise, returns `false`. + pub fn eat_keyword(&mut self, kw: keywords::Keyword) -> bool { + if self.check_keyword(kw) { + self.bump(); + true + } else { + false + } + } + + fn eat_keyword_noexpect(&mut self, kw: keywords::Keyword) -> bool { + if self.token.is_keyword(kw) { + self.bump(); + true + } else { + false + } + } + + /// If the given word is not a keyword, signals an error. + /// If the next token is not the given word, signals an error. + /// Otherwise, eats it. + fn expect_keyword(&mut self, kw: keywords::Keyword) -> PResult<'a, ()> { + if !self.eat_keyword(kw) { + self.unexpected() + } else { + Ok(()) + } + } + + fn check_ident(&mut self) -> bool { + if self.token.is_ident() { + true + } else { + self.expected_tokens.push(TokenType::Ident); + false + } + } + + fn check_path(&mut self) -> bool { + if self.token.is_path_start() { + true + } else { + self.expected_tokens.push(TokenType::Path); + false + } + } + + fn check_type(&mut self) -> bool { + if self.token.can_begin_type() { + true + } else { + self.expected_tokens.push(TokenType::Type); + false + } + } + + fn check_const_arg(&mut self) -> bool { + if self.token.can_begin_const_arg() { + true + } else { + self.expected_tokens.push(TokenType::Const); + false + } + } + + /// Expects and consumes a `+`. if `+=` is seen, replaces it with a `=` + /// and continues. If a `+` is not seen, returns `false`. + /// + /// This is used when token-splitting `+=` into `+`. + /// See issue #47856 for an example of when this may occur. + fn eat_plus(&mut self) -> bool { + self.expected_tokens.push(TokenType::Token(token::BinOp(token::Plus))); + match self.token { + token::BinOp(token::Plus) => { + self.bump(); + true + } + token::BinOpEq(token::Plus) => { + let span = self.span.with_lo(self.span.lo() + BytePos(1)); + self.bump_with(token::Eq, span); + true + } + _ => false, + } + } + + + /// Checks to see if the next token is either `+` or `+=`. + /// Otherwise returns `false`. + fn check_plus(&mut self) -> bool { + if self.token.is_like_plus() { + true + } + else { + self.expected_tokens.push(TokenType::Token(token::BinOp(token::Plus))); + false + } + } + + /// Expects and consumes an `&`. If `&&` is seen, replaces it with a single + /// `&` and continues. If an `&` is not seen, signals an error. + fn expect_and(&mut self) -> PResult<'a, ()> { + self.expected_tokens.push(TokenType::Token(token::BinOp(token::And))); + match self.token { + token::BinOp(token::And) => { + self.bump(); + Ok(()) + } + token::AndAnd => { + let span = self.span.with_lo(self.span.lo() + BytePos(1)); + Ok(self.bump_with(token::BinOp(token::And), span)) + } + _ => self.unexpected() + } + } + + /// Expects and consumes an `|`. If `||` is seen, replaces it with a single + /// `|` and continues. If an `|` is not seen, signals an error. + fn expect_or(&mut self) -> PResult<'a, ()> { + self.expected_tokens.push(TokenType::Token(token::BinOp(token::Or))); + match self.token { + token::BinOp(token::Or) => { + self.bump(); + Ok(()) + } + token::OrOr => { + let span = self.span.with_lo(self.span.lo() + BytePos(1)); + Ok(self.bump_with(token::BinOp(token::Or), span)) + } + _ => self.unexpected() + } + } + + fn expect_no_suffix(&self, sp: Span, kind: &str, suffix: Option) { + match suffix { + None => {/* everything ok */} + Some(suf) => { + let text = suf.as_str(); + if text.is_empty() { + self.span_bug(sp, "found empty literal suffix in Some") + } + let msg = format!("{} with a suffix is invalid", kind); + self.struct_span_err(sp, &msg) + .span_label(sp, msg) + .emit(); + } + } + } + + /// Attempts to consume a `<`. If `<<` is seen, replaces it with a single + /// `<` and continue. If `<-` is seen, replaces it with a single `<` + /// and continue. If a `<` is not seen, returns false. + /// + /// This is meant to be used when parsing generics on a path to get the + /// starting token. + fn eat_lt(&mut self) -> bool { + self.expected_tokens.push(TokenType::Token(token::Lt)); + let ate = match self.token { + token::Lt => { + self.bump(); + true + } + token::BinOp(token::Shl) => { + let span = self.span.with_lo(self.span.lo() + BytePos(1)); + self.bump_with(token::Lt, span); + true + } + token::LArrow => { + let span = self.span.with_lo(self.span.lo() + BytePos(1)); + self.bump_with(token::BinOp(token::Minus), span); + true + } + _ => false, + }; + + if ate { + // See doc comment for `unmatched_angle_bracket_count`. + self.unmatched_angle_bracket_count += 1; + self.max_angle_bracket_count += 1; + debug!("eat_lt: (increment) count={:?}", self.unmatched_angle_bracket_count); + } + + ate + } + + fn expect_lt(&mut self) -> PResult<'a, ()> { + if !self.eat_lt() { + self.unexpected() + } else { + Ok(()) + } + } + + /// Expects and consumes a single `>` token. if a `>>` is seen, replaces it + /// with a single `>` and continues. If a `>` is not seen, signals an error. + fn expect_gt(&mut self) -> PResult<'a, ()> { + self.expected_tokens.push(TokenType::Token(token::Gt)); + let ate = match self.token { + token::Gt => { + self.bump(); + Some(()) + } + token::BinOp(token::Shr) => { + let span = self.span.with_lo(self.span.lo() + BytePos(1)); + Some(self.bump_with(token::Gt, span)) + } + token::BinOpEq(token::Shr) => { + let span = self.span.with_lo(self.span.lo() + BytePos(1)); + Some(self.bump_with(token::Ge, span)) + } + token::Ge => { + let span = self.span.with_lo(self.span.lo() + BytePos(1)); + Some(self.bump_with(token::Eq, span)) + } + _ => None, + }; + + match ate { + Some(_) => { + // See doc comment for `unmatched_angle_bracket_count`. + if self.unmatched_angle_bracket_count > 0 { + self.unmatched_angle_bracket_count -= 1; + debug!("expect_gt: (decrement) count={:?}", self.unmatched_angle_bracket_count); + } + + Ok(()) + }, + None => self.unexpected(), + } + } + + /// Eats and discards tokens until one of `kets` is encountered. Respects token trees, + /// passes through any errors encountered. Used for error recovery. + fn eat_to_tokens(&mut self, kets: &[&token::Token]) { + let handler = self.diagnostic(); + + if let Err(ref mut err) = self.parse_seq_to_before_tokens(kets, + SeqSep::none(), + TokenExpectType::Expect, + |p| Ok(p.parse_token_tree())) { + handler.cancel(err); + } + } + + /// Parses a sequence, including the closing delimiter. The function + /// `f` must consume tokens until reaching the next separator or + /// closing bracket. + pub fn parse_seq_to_end(&mut self, + ket: &token::Token, + sep: SeqSep, + f: F) + -> PResult<'a, Vec> where + F: FnMut(&mut Parser<'a>) -> PResult<'a, T>, + { + let (val, recovered) = self.parse_seq_to_before_end(ket, sep, f)?; + if !recovered { + self.bump(); + } + Ok(val) + } + + /// Parses a sequence, not including the closing delimiter. The function + /// `f` must consume tokens until reaching the next separator or + /// closing bracket. + pub fn parse_seq_to_before_end( + &mut self, + ket: &token::Token, + sep: SeqSep, + f: F, + ) -> PResult<'a, (Vec, bool)> + where F: FnMut(&mut Parser<'a>) -> PResult<'a, T> + { + self.parse_seq_to_before_tokens(&[ket], sep, TokenExpectType::Expect, f) + } + + fn parse_seq_to_before_tokens( + &mut self, + kets: &[&token::Token], + sep: SeqSep, + expect: TokenExpectType, + mut f: F, + ) -> PResult<'a, (Vec, bool /* recovered */)> + where F: FnMut(&mut Parser<'a>) -> PResult<'a, T> + { + let mut first = true; + let mut recovered = false; + let mut v = vec![]; + while !kets.iter().any(|k| { + match expect { + TokenExpectType::Expect => self.check(k), + TokenExpectType::NoExpect => self.token == **k, + } + }) { + match self.token { + token::CloseDelim(..) | token::Eof => break, + _ => {} + }; + if let Some(ref t) = sep.sep { + if first { + first = false; + } else { + match self.expect(t) { + Ok(false) => {} + Ok(true) => { + recovered = true; + break; + } + Err(mut e) => { + // Attempt to keep parsing if it was a similar separator + if let Some(ref tokens) = t.similar_tokens() { + if tokens.contains(&self.token) { + self.bump(); + } + } + e.emit(); + // Attempt to keep parsing if it was an omitted separator + match f(self) { + Ok(t) => { + v.push(t); + continue; + }, + Err(mut e) => { + e.cancel(); + break; + } + } + } + } + } + } + if sep.trailing_sep_allowed && kets.iter().any(|k| { + match expect { + TokenExpectType::Expect => self.check(k), + TokenExpectType::NoExpect => self.token == **k, + } + }) { + break; + } + + let t = f(self)?; + v.push(t); + } + + Ok((v, recovered)) + } + + /// Parses a sequence, including the closing delimiter. The function + /// `f` must consume tokens until reaching the next separator or + /// closing bracket. + fn parse_unspanned_seq( + &mut self, + bra: &token::Token, + ket: &token::Token, + sep: SeqSep, + f: F, + ) -> PResult<'a, Vec> where + F: FnMut(&mut Parser<'a>) -> PResult<'a, T>, + { + self.expect(bra)?; + let (result, recovered) = self.parse_seq_to_before_end(ket, sep, f)?; + if !recovered { + self.eat(ket); + } + Ok(result) + } + + /// Advance the parser by one token + pub fn bump(&mut self) { + if self.prev_token_kind == PrevTokenKind::Eof { + // Bumping after EOF is a bad sign, usually an infinite loop. + self.bug("attempted to bump the parser past EOF (may be stuck in a loop)"); + } + + self.prev_span = self.meta_var_span.take().unwrap_or(self.span); + + // Record last token kind for possible error recovery. + self.prev_token_kind = match self.token { + token::DocComment(..) => PrevTokenKind::DocComment, + token::Comma => PrevTokenKind::Comma, + token::BinOp(token::Plus) => PrevTokenKind::Plus, + token::Interpolated(..) => PrevTokenKind::Interpolated, + token::Eof => PrevTokenKind::Eof, + token::Ident(..) => PrevTokenKind::Ident, + _ => PrevTokenKind::Other, + }; + + let next = self.next_tok(); + self.span = next.sp; + self.token = next.tok; + self.expected_tokens.clear(); + // check after each token + self.process_potential_macro_variable(); + } + + /// Advance the parser using provided token as a next one. Use this when + /// consuming a part of a token. For example a single `<` from `<<`. + fn bump_with(&mut self, next: token::Token, span: Span) { + self.prev_span = self.span.with_hi(span.lo()); + // It would be incorrect to record the kind of the current token, but + // fortunately for tokens currently using `bump_with`, the + // prev_token_kind will be of no use anyway. + self.prev_token_kind = PrevTokenKind::Other; + self.span = span; + self.token = next; + self.expected_tokens.clear(); + } + + pub fn look_ahead(&self, dist: usize, f: F) -> R where + F: FnOnce(&token::Token) -> R, + { + if dist == 0 { + return f(&self.token) + } + + f(&match self.token_cursor.frame.tree_cursor.look_ahead(dist - 1) { + Some(tree) => match tree { + TokenTree::Token(_, tok) => tok, + TokenTree::Delimited(_, delim, _) => token::OpenDelim(delim), + }, + None => token::CloseDelim(self.token_cursor.frame.delim), + }) + } + + fn look_ahead_span(&self, dist: usize) -> Span { + if dist == 0 { + return self.span + } + + match self.token_cursor.frame.tree_cursor.look_ahead(dist - 1) { + Some(TokenTree::Token(span, _)) => span, + Some(TokenTree::Delimited(span, ..)) => span.entire(), + None => self.look_ahead_span(dist - 1), + } + } + pub fn fatal(&self, m: &str) -> DiagnosticBuilder<'a> { + self.sess.span_diagnostic.struct_span_fatal(self.span, m) + } + pub fn span_fatal>(&self, sp: S, m: &str) -> DiagnosticBuilder<'a> { + self.sess.span_diagnostic.struct_span_fatal(sp, m) + } + fn span_fatal_err>(&self, sp: S, err: Error) -> DiagnosticBuilder<'a> { + err.span_err(sp, self.diagnostic()) + } + fn bug(&self, m: &str) -> ! { + self.sess.span_diagnostic.span_bug(self.span, m) + } + fn span_err>(&self, sp: S, m: &str) { + self.sess.span_diagnostic.span_err(sp, m) + } + fn struct_span_err>(&self, sp: S, m: &str) -> DiagnosticBuilder<'a> { + self.sess.span_diagnostic.struct_span_err(sp, m) + } + crate fn span_bug>(&self, sp: S, m: &str) -> ! { + self.sess.span_diagnostic.span_bug(sp, m) + } + + fn cancel(&self, err: &mut DiagnosticBuilder<'_>) { + self.sess.span_diagnostic.cancel(err) + } + + crate fn diagnostic(&self) -> &'a errors::Handler { + &self.sess.span_diagnostic + } + + /// Is the current token one of the keywords that signals a bare function type? + fn token_is_bare_fn_keyword(&mut self) -> bool { + self.check_keyword(keywords::Fn) || + self.check_keyword(keywords::Unsafe) || + self.check_keyword(keywords::Extern) + } + + /// Parses a `TyKind::BareFn` type. + fn parse_ty_bare_fn(&mut self, generic_params: Vec) -> PResult<'a, TyKind> { + /* + + [unsafe] [extern "ABI"] fn (S) -> T + ^~~~^ ^~~~^ ^~^ ^ + | | | | + | | | Return type + | | Argument types + | | + | ABI + Function Style + */ + + let unsafety = self.parse_unsafety(); + let abi = if self.eat_keyword(keywords::Extern) { + self.parse_opt_abi()?.unwrap_or(Abi::C) + } else { + Abi::Rust + }; + + self.expect_keyword(keywords::Fn)?; + let (inputs, variadic) = self.parse_fn_args(false, true)?; + let ret_ty = self.parse_ret_ty(false)?; + let decl = P(FnDecl { + inputs, + output: ret_ty, + variadic, + }); + Ok(TyKind::BareFn(P(BareFnTy { + abi, + unsafety, + generic_params, + decl, + }))) + } + + /// Parses asyncness: `async` or nothing. + fn parse_asyncness(&mut self) -> IsAsync { + if self.eat_keyword(keywords::Async) { + IsAsync::Async { + closure_id: ast::DUMMY_NODE_ID, + return_impl_trait_id: ast::DUMMY_NODE_ID, + } + } else { + IsAsync::NotAsync + } + } + + /// Parses unsafety: `unsafe` or nothing. + fn parse_unsafety(&mut self) -> Unsafety { + if self.eat_keyword(keywords::Unsafe) { + Unsafety::Unsafe + } else { + Unsafety::Normal + } + } + + /// Parses the items in a trait declaration. + pub fn parse_trait_item(&mut self, at_end: &mut bool) -> PResult<'a, TraitItem> { + maybe_whole!(self, NtTraitItem, |x| x); + let attrs = self.parse_outer_attributes()?; + let (mut item, tokens) = self.collect_tokens(|this| { + this.parse_trait_item_(at_end, attrs) + })?; + // See `parse_item` for why this clause is here. + if !item.attrs.iter().any(|attr| attr.style == AttrStyle::Inner) { + item.tokens = Some(tokens); + } + Ok(item) + } + + fn parse_trait_item_(&mut self, + at_end: &mut bool, + mut attrs: Vec) -> PResult<'a, TraitItem> { + let lo = self.span; + + let (name, node, generics) = if self.eat_keyword(keywords::Type) { + self.parse_trait_item_assoc_ty()? + } else if self.is_const_item() { + self.expect_keyword(keywords::Const)?; + let ident = self.parse_ident()?; + self.expect(&token::Colon)?; + let ty = self.parse_ty()?; + let default = if self.eat(&token::Eq) { + let expr = self.parse_expr()?; + self.expect(&token::Semi)?; + Some(expr) + } else { + self.expect(&token::Semi)?; + None + }; + (ident, TraitItemKind::Const(ty, default), ast::Generics::default()) + } else if let Some(mac) = self.parse_assoc_macro_invoc("trait", None, &mut false)? { + // trait item macro. + (keywords::Invalid.ident(), ast::TraitItemKind::Macro(mac), ast::Generics::default()) + } else { + let (constness, unsafety, asyncness, abi) = self.parse_fn_front_matter()?; + + let ident = self.parse_ident()?; + let mut generics = self.parse_generics()?; + + let d = self.parse_fn_decl_with_self(|p: &mut Parser<'a>| { + // This is somewhat dubious; We don't want to allow + // argument names to be left off if there is a + // definition... + + // We don't allow argument names to be left off in edition 2018. + p.parse_arg_general(p.span.rust_2018(), true) + })?; + generics.where_clause = self.parse_where_clause()?; + + let sig = ast::MethodSig { + header: FnHeader { + unsafety, + constness, + abi, + asyncness, + }, + decl: d, + }; + + let body = match self.token { + token::Semi => { + self.bump(); + *at_end = true; + debug!("parse_trait_methods(): parsing required method"); + None + } + token::OpenDelim(token::Brace) => { + debug!("parse_trait_methods(): parsing provided method"); + *at_end = true; + let (inner_attrs, body) = self.parse_inner_attrs_and_block()?; + attrs.extend(inner_attrs.iter().cloned()); + Some(body) + } + token::Interpolated(ref nt) => { + match **nt { + token::NtBlock(..) => { + *at_end = true; + let (inner_attrs, body) = self.parse_inner_attrs_and_block()?; + attrs.extend(inner_attrs.iter().cloned()); + Some(body) + } + _ => { + let token_str = self.this_token_descr(); + let mut err = self.fatal(&format!("expected `;` or `{{`, found {}", + token_str)); + err.span_label(self.span, "expected `;` or `{`"); + return Err(err); + } + } + } + _ => { + let token_str = self.this_token_descr(); + let mut err = self.fatal(&format!("expected `;` or `{{`, found {}", + token_str)); + err.span_label(self.span, "expected `;` or `{`"); + return Err(err); + } + }; + (ident, ast::TraitItemKind::Method(sig, body), generics) + }; + + Ok(TraitItem { + id: ast::DUMMY_NODE_ID, + ident: name, + attrs, + generics, + node, + span: lo.to(self.prev_span), + tokens: None, + }) + } + + /// Parses an optional return type `[ -> TY ]` in a function declaration. + fn parse_ret_ty(&mut self, allow_plus: bool) -> PResult<'a, FunctionRetTy> { + if self.eat(&token::RArrow) { + Ok(FunctionRetTy::Ty(self.parse_ty_common(allow_plus, true)?)) + } else { + Ok(FunctionRetTy::Default(self.span.shrink_to_lo())) + } + } + + /// Parses a type. + pub fn parse_ty(&mut self) -> PResult<'a, P> { + self.parse_ty_common(true, true) + } + + /// Parses a type in restricted contexts where `+` is not permitted. + /// + /// Example 1: `&'a TYPE` + /// `+` is prohibited to maintain operator priority (P(+) < P(&)). + /// Example 2: `value1 as TYPE + value2` + /// `+` is prohibited to avoid interactions with expression grammar. + fn parse_ty_no_plus(&mut self) -> PResult<'a, P> { + self.parse_ty_common(false, true) + } + + fn parse_ty_common(&mut self, allow_plus: bool, allow_qpath_recovery: bool) + -> PResult<'a, P> { + maybe_whole!(self, NtTy, |x| x); + + let lo = self.span; + let mut impl_dyn_multi = false; + let node = if self.eat(&token::OpenDelim(token::Paren)) { + // `(TYPE)` is a parenthesized type. + // `(TYPE,)` is a tuple with a single field of type TYPE. + let mut ts = vec![]; + let mut last_comma = false; + while self.token != token::CloseDelim(token::Paren) { + ts.push(self.parse_ty()?); + if self.eat(&token::Comma) { + last_comma = true; + } else { + last_comma = false; + break; + } + } + let trailing_plus = self.prev_token_kind == PrevTokenKind::Plus; + self.expect(&token::CloseDelim(token::Paren))?; + + if ts.len() == 1 && !last_comma { + let ty = ts.into_iter().nth(0).unwrap().into_inner(); + let maybe_bounds = allow_plus && self.token.is_like_plus(); + match ty.node { + // `(TY_BOUND_NOPAREN) + BOUND + ...`. + TyKind::Path(None, ref path) if maybe_bounds => { + self.parse_remaining_bounds(Vec::new(), path.clone(), lo, true)? + } + TyKind::TraitObject(ref bounds, TraitObjectSyntax::None) + if maybe_bounds && bounds.len() == 1 && !trailing_plus => { + let path = match bounds[0] { + GenericBound::Trait(ref pt, ..) => pt.trait_ref.path.clone(), + GenericBound::Outlives(..) => self.bug("unexpected lifetime bound"), + }; + self.parse_remaining_bounds(Vec::new(), path, lo, true)? + } + // `(TYPE)` + _ => TyKind::Paren(P(ty)) + } + } else { + TyKind::Tup(ts) + } + } else if self.eat(&token::Not) { + // Never type `!` + TyKind::Never + } else if self.eat(&token::BinOp(token::Star)) { + // Raw pointer + TyKind::Ptr(self.parse_ptr()?) + } else if self.eat(&token::OpenDelim(token::Bracket)) { + // Array or slice + let t = self.parse_ty()?; + // Parse optional `; EXPR` in `[TYPE; EXPR]` + let t = match self.maybe_parse_fixed_length_of_vec()? { + None => TyKind::Slice(t), + Some(length) => TyKind::Array(t, AnonConst { + id: ast::DUMMY_NODE_ID, + value: length, + }), + }; + self.expect(&token::CloseDelim(token::Bracket))?; + t + } else if self.check(&token::BinOp(token::And)) || self.check(&token::AndAnd) { + // Reference + self.expect_and()?; + self.parse_borrowed_pointee()? + } else if self.eat_keyword_noexpect(keywords::Typeof) { + // `typeof(EXPR)` + // In order to not be ambiguous, the type must be surrounded by parens. + self.expect(&token::OpenDelim(token::Paren))?; + let e = AnonConst { + id: ast::DUMMY_NODE_ID, + value: self.parse_expr()?, + }; + self.expect(&token::CloseDelim(token::Paren))?; + TyKind::Typeof(e) + } else if self.eat_keyword(keywords::Underscore) { + // A type to be inferred `_` + TyKind::Infer + } else if self.token_is_bare_fn_keyword() { + // Function pointer type + self.parse_ty_bare_fn(Vec::new())? + } else if self.check_keyword(keywords::For) { + // Function pointer type or bound list (trait object type) starting with a poly-trait. + // `for<'lt> [unsafe] [extern "ABI"] fn (&'lt S) -> T` + // `for<'lt> Trait1<'lt> + Trait2 + 'a` + let lo = self.span; + let lifetime_defs = self.parse_late_bound_lifetime_defs()?; + if self.token_is_bare_fn_keyword() { + self.parse_ty_bare_fn(lifetime_defs)? + } else { + let path = self.parse_path(PathStyle::Type)?; + let parse_plus = allow_plus && self.check_plus(); + self.parse_remaining_bounds(lifetime_defs, path, lo, parse_plus)? + } + } else if self.eat_keyword(keywords::Impl) { + // Always parse bounds greedily for better error recovery. + let bounds = self.parse_generic_bounds(None)?; + impl_dyn_multi = bounds.len() > 1 || self.prev_token_kind == PrevTokenKind::Plus; + TyKind::ImplTrait(ast::DUMMY_NODE_ID, bounds) + } else if self.check_keyword(keywords::Dyn) && + (self.span.rust_2018() || + self.look_ahead(1, |t| t.can_begin_bound() && + !can_continue_type_after_non_fn_ident(t))) { + self.bump(); // `dyn` + // Always parse bounds greedily for better error recovery. + let bounds = self.parse_generic_bounds(None)?; + impl_dyn_multi = bounds.len() > 1 || self.prev_token_kind == PrevTokenKind::Plus; + TyKind::TraitObject(bounds, TraitObjectSyntax::Dyn) + } else if self.check(&token::Question) || + self.check_lifetime() && self.look_ahead(1, |t| t.is_like_plus()) { + // Bound list (trait object type) + TyKind::TraitObject(self.parse_generic_bounds_common(allow_plus, None)?, + TraitObjectSyntax::None) + } else if self.eat_lt() { + // Qualified path + let (qself, path) = self.parse_qpath(PathStyle::Type)?; + TyKind::Path(Some(qself), path) + } else if self.token.is_path_start() { + // Simple path + let path = self.parse_path(PathStyle::Type)?; + if self.eat(&token::Not) { + // Macro invocation in type position + let (delim, tts) = self.expect_delimited_token_tree()?; + let node = Mac_ { path, tts, delim }; + TyKind::Mac(respan(lo.to(self.prev_span), node)) + } else { + // Just a type path or bound list (trait object type) starting with a trait. + // `Type` + // `Trait1 + Trait2 + 'a` + if allow_plus && self.check_plus() { + self.parse_remaining_bounds(Vec::new(), path, lo, true)? + } else { + TyKind::Path(None, path) + } + } + } else { + let msg = format!("expected type, found {}", self.this_token_descr()); + return Err(self.fatal(&msg)); + }; + + let span = lo.to(self.prev_span); + let ty = Ty { node, span, id: ast::DUMMY_NODE_ID }; + + // Try to recover from use of `+` with incorrect priority. + self.maybe_report_ambiguous_plus(allow_plus, impl_dyn_multi, &ty); + self.maybe_recover_from_bad_type_plus(allow_plus, &ty)?; + let ty = self.maybe_recover_from_bad_qpath(ty, allow_qpath_recovery)?; + + Ok(P(ty)) + } + + fn parse_remaining_bounds(&mut self, generic_params: Vec, path: ast::Path, + lo: Span, parse_plus: bool) -> PResult<'a, TyKind> { + let poly_trait_ref = PolyTraitRef::new(generic_params, path, lo.to(self.prev_span)); + let mut bounds = vec![GenericBound::Trait(poly_trait_ref, TraitBoundModifier::None)]; + if parse_plus { + self.eat_plus(); // `+`, or `+=` gets split and `+` is discarded + bounds.append(&mut self.parse_generic_bounds(None)?); + } + Ok(TyKind::TraitObject(bounds, TraitObjectSyntax::None)) + } + + fn maybe_report_ambiguous_plus(&mut self, allow_plus: bool, impl_dyn_multi: bool, ty: &Ty) { + if !allow_plus && impl_dyn_multi { + let sum_with_parens = format!("({})", pprust::ty_to_string(&ty)); + self.struct_span_err(ty.span, "ambiguous `+` in a type") + .span_suggestion( + ty.span, + "use parentheses to disambiguate", + sum_with_parens, + Applicability::MachineApplicable + ).emit(); + } + } + + fn maybe_recover_from_bad_type_plus(&mut self, allow_plus: bool, ty: &Ty) -> PResult<'a, ()> { + // Do not add `+` to expected tokens. + if !allow_plus || !self.token.is_like_plus() { + return Ok(()) + } + + self.bump(); // `+` + let bounds = self.parse_generic_bounds(None)?; + let sum_span = ty.span.to(self.prev_span); + + let mut err = struct_span_err!(self.sess.span_diagnostic, sum_span, E0178, + "expected a path on the left-hand side of `+`, not `{}`", pprust::ty_to_string(ty)); + + match ty.node { + TyKind::Rptr(ref lifetime, ref mut_ty) => { + let sum_with_parens = pprust::to_string(|s| { + use crate::print::pprust::PrintState; + + s.s.word("&")?; + s.print_opt_lifetime(lifetime)?; + s.print_mutability(mut_ty.mutbl)?; + s.popen()?; + s.print_type(&mut_ty.ty)?; + s.print_type_bounds(" +", &bounds)?; + s.pclose() + }); + err.span_suggestion( + sum_span, + "try adding parentheses", + sum_with_parens, + Applicability::MachineApplicable + ); + } + TyKind::Ptr(..) | TyKind::BareFn(..) => { + err.span_label(sum_span, "perhaps you forgot parentheses?"); + } + _ => { + err.span_label(sum_span, "expected a path"); + }, + } + err.emit(); + Ok(()) + } + + // Try to recover from associated item paths like `[T]::AssocItem`/`(T, U)::AssocItem`. + fn maybe_recover_from_bad_qpath(&mut self, base: T, allow_recovery: bool) + -> PResult<'a, T> { + // Do not add `::` to expected tokens. + if !allow_recovery || self.token != token::ModSep { + return Ok(base); + } + let ty = match base.to_ty() { + Some(ty) => ty, + None => return Ok(base), + }; + + self.bump(); // `::` + let mut segments = Vec::new(); + self.parse_path_segments(&mut segments, T::PATH_STYLE, true)?; + + let span = ty.span.to(self.prev_span); + let path_span = span.to(span); // use an empty path since `position` == 0 + let recovered = base.to_recovered( + Some(QSelf { ty, path_span, position: 0 }), + ast::Path { segments, span }, + ); + + self.diagnostic() + .struct_span_err(span, "missing angle brackets in associated item path") + .span_suggestion( // this is a best-effort recovery + span, "try", recovered.to_string(), Applicability::MaybeIncorrect + ).emit(); + + Ok(recovered) + } + + fn parse_borrowed_pointee(&mut self) -> PResult<'a, TyKind> { + let opt_lifetime = if self.check_lifetime() { Some(self.expect_lifetime()) } else { None }; + let mutbl = self.parse_mutability(); + let ty = self.parse_ty_no_plus()?; + return Ok(TyKind::Rptr(opt_lifetime, MutTy { ty: ty, mutbl: mutbl })); + } + + fn parse_ptr(&mut self) -> PResult<'a, MutTy> { + let mutbl = if self.eat_keyword(keywords::Mut) { + Mutability::Mutable + } else if self.eat_keyword(keywords::Const) { + Mutability::Immutable + } else { + let span = self.prev_span; + let msg = "expected mut or const in raw pointer type"; + self.struct_span_err(span, msg) + .span_label(span, msg) + .help("use `*mut T` or `*const T` as appropriate") + .emit(); + Mutability::Immutable + }; + let t = self.parse_ty_no_plus()?; + Ok(MutTy { ty: t, mutbl: mutbl }) + } + + fn is_named_argument(&mut self) -> bool { + let offset = match self.token { + token::Interpolated(ref nt) => match **nt { + token::NtPat(..) => return self.look_ahead(1, |t| t == &token::Colon), + _ => 0, + } + token::BinOp(token::And) | token::AndAnd => 1, + _ if self.token.is_keyword(keywords::Mut) => 1, + _ => 0, + }; + + self.look_ahead(offset, |t| t.is_ident()) && + self.look_ahead(offset + 1, |t| t == &token::Colon) + } + + /// Skips unexpected attributes and doc comments in this position and emits an appropriate + /// error. + fn eat_incorrect_doc_comment(&mut self, applied_to: &str) { + if let token::DocComment(_) = self.token { + let mut err = self.diagnostic().struct_span_err( + self.span, + &format!("documentation comments cannot be applied to {}", applied_to), + ); + err.span_label(self.span, "doc comments are not allowed here"); + err.emit(); + self.bump(); + } else if self.token == token::Pound && self.look_ahead(1, |t| { + *t == token::OpenDelim(token::Bracket) + }) { + let lo = self.span; + // Skip every token until next possible arg. + while self.token != token::CloseDelim(token::Bracket) { + self.bump(); + } + let sp = lo.to(self.span); + self.bump(); + let mut err = self.diagnostic().struct_span_err( + sp, + &format!("attributes cannot be applied to {}", applied_to), + ); + err.span_label(sp, "attributes are not allowed here"); + err.emit(); + } + } + + /// This version of parse arg doesn't necessarily require identifier names. + fn parse_arg_general(&mut self, require_name: bool, is_trait_item: bool) -> PResult<'a, Arg> { + maybe_whole!(self, NtArg, |x| x); + + if let Ok(Some(_)) = self.parse_self_arg() { + let mut err = self.struct_span_err(self.prev_span, + "unexpected `self` argument in function"); + err.span_label(self.prev_span, + "`self` is only valid as the first argument of an associated function"); + return Err(err); + } + + let (pat, ty) = if require_name || self.is_named_argument() { + debug!("parse_arg_general parse_pat (require_name:{})", + require_name); + self.eat_incorrect_doc_comment("method arguments"); + let pat = self.parse_pat(Some("argument name"))?; + + if let Err(mut err) = self.expect(&token::Colon) { + // If we find a pattern followed by an identifier, it could be an (incorrect) + // C-style parameter declaration. + if self.check_ident() && self.look_ahead(1, |t| { + *t == token::Comma || *t == token::CloseDelim(token::Paren) + }) { + let ident = self.parse_ident().unwrap(); + let span = pat.span.with_hi(ident.span.hi()); + + err.span_suggestion( + span, + "declare the type after the parameter binding", + ": ", + Applicability::HasPlaceholders, + ); + } else if require_name && is_trait_item { + if let PatKind::Ident(_, ident, _) = pat.node { + err.span_suggestion( + pat.span, + "explicitly ignore parameter", + format!("_: {}", ident), + Applicability::MachineApplicable, + ); + } + + err.note("anonymous parameters are removed in the 2018 edition (see RFC 1685)"); + } + + return Err(err); + } + + self.eat_incorrect_doc_comment("a method argument's type"); + (pat, self.parse_ty()?) + } else { + debug!("parse_arg_general ident_to_pat"); + let parser_snapshot_before_ty = self.clone(); + self.eat_incorrect_doc_comment("a method argument's type"); + let mut ty = self.parse_ty(); + if ty.is_ok() && self.token != token::Comma && + self.token != token::CloseDelim(token::Paren) { + // This wasn't actually a type, but a pattern looking like a type, + // so we are going to rollback and re-parse for recovery. + ty = self.unexpected(); + } + match ty { + Ok(ty) => { + let ident = Ident::new(keywords::Invalid.name(), self.prev_span); + let pat = P(Pat { + id: ast::DUMMY_NODE_ID, + node: PatKind::Ident( + BindingMode::ByValue(Mutability::Immutable), ident, None), + span: ty.span, + }); + (pat, ty) + } + Err(mut err) => { + // Recover from attempting to parse the argument as a type without pattern. + err.cancel(); + mem::replace(self, parser_snapshot_before_ty); + let pat = self.parse_pat(Some("argument name"))?; + self.expect(&token::Colon)?; + let ty = self.parse_ty()?; + + let mut err = self.diagnostic().struct_span_err_with_code( + pat.span, + "patterns aren't allowed in methods without bodies", + DiagnosticId::Error("E0642".into()), + ); + err.span_suggestion_short( + pat.span, + "give this argument a name or use an underscore to ignore it", + "_".to_owned(), + Applicability::MachineApplicable, + ); + err.emit(); + + // Pretend the pattern is `_`, to avoid duplicate errors from AST validation. + let pat = P(Pat { + node: PatKind::Wild, + span: pat.span, + id: ast::DUMMY_NODE_ID + }); + (pat, ty) + } + } + }; + + Ok(Arg { ty, pat, id: ast::DUMMY_NODE_ID }) + } + + /// Parses a single function argument. + crate fn parse_arg(&mut self) -> PResult<'a, Arg> { + self.parse_arg_general(true, false) + } + + /// Parses an argument in a lambda header (e.g., `|arg, arg|`). + fn parse_fn_block_arg(&mut self) -> PResult<'a, Arg> { + let pat = self.parse_pat(Some("argument name"))?; + let t = if self.eat(&token::Colon) { + self.parse_ty()? + } else { + P(Ty { + id: ast::DUMMY_NODE_ID, + node: TyKind::Infer, + span: self.prev_span, + }) + }; + Ok(Arg { + ty: t, + pat, + id: ast::DUMMY_NODE_ID + }) + } + + fn maybe_parse_fixed_length_of_vec(&mut self) -> PResult<'a, Option>> { + if self.eat(&token::Semi) { + Ok(Some(self.parse_expr()?)) + } else { + Ok(None) + } + } + + /// Matches `token_lit = LIT_INTEGER | ...`. + fn parse_lit_token(&mut self) -> PResult<'a, LitKind> { + let out = match self.token { + token::Interpolated(ref nt) => match **nt { + token::NtExpr(ref v) | token::NtLiteral(ref v) => match v.node { + ExprKind::Lit(ref lit) => { lit.node.clone() } + _ => { return self.unexpected_last(&self.token); } + }, + _ => { return self.unexpected_last(&self.token); } + }, + token::Literal(lit, suf) => { + let diag = Some((self.span, &self.sess.span_diagnostic)); + let (suffix_illegal, result) = parse::lit_token(lit, suf, diag); + + if suffix_illegal { + let sp = self.span; + self.expect_no_suffix(sp, lit.literal_name(), suf) + } + + result.unwrap() + } + token::Dot if self.look_ahead(1, |t| match t { + token::Literal(parse::token::Lit::Integer(_) , _) => true, + _ => false, + }) => { // recover from `let x = .4;` + let lo = self.span; + self.bump(); + if let token::Literal( + parse::token::Lit::Integer(val), + suffix, + ) = self.token { + let suffix = suffix.and_then(|s| { + let s = s.as_str().get(); + if ["f32", "f64"].contains(&s) { + Some(s) + } else { + None + } + }).unwrap_or(""); + self.bump(); + let sp = lo.to(self.prev_span); + let mut err = self.diagnostic() + .struct_span_err(sp, "float literals must have an integer part"); + err.span_suggestion( + sp, + "must have an integer part", + format!("0.{}{}", val, suffix), + Applicability::MachineApplicable, + ); + err.emit(); + return Ok(match suffix { + "f32" => ast::LitKind::Float(val, ast::FloatTy::F32), + "f64" => ast::LitKind::Float(val, ast::FloatTy::F64), + _ => ast::LitKind::FloatUnsuffixed(val), + }); + } else { + unreachable!(); + }; + } + _ => { return self.unexpected_last(&self.token); } + }; + + self.bump(); + Ok(out) + } + + /// Matches `lit = true | false | token_lit`. + crate fn parse_lit(&mut self) -> PResult<'a, Lit> { + let lo = self.span; + let lit = if self.eat_keyword(keywords::True) { + LitKind::Bool(true) + } else if self.eat_keyword(keywords::False) { + LitKind::Bool(false) + } else { + let lit = self.parse_lit_token()?; + lit + }; + Ok(source_map::Spanned { node: lit, span: lo.to(self.prev_span) }) + } + + /// Matches `'-' lit | lit` (cf. `ast_validation::AstValidator::check_expr_within_pat`). + crate fn parse_literal_maybe_minus(&mut self) -> PResult<'a, P> { + maybe_whole_expr!(self); + + let minus_lo = self.span; + let minus_present = self.eat(&token::BinOp(token::Minus)); + let lo = self.span; + let literal = self.parse_lit()?; + let hi = self.prev_span; + let expr = self.mk_expr(lo.to(hi), ExprKind::Lit(literal), ThinVec::new()); + + if minus_present { + let minus_hi = self.prev_span; + let unary = self.mk_unary(UnOp::Neg, expr); + Ok(self.mk_expr(minus_lo.to(minus_hi), unary, ThinVec::new())) + } else { + Ok(expr) + } + } + + fn parse_path_segment_ident(&mut self) -> PResult<'a, ast::Ident> { + match self.token { + token::Ident(ident, _) if self.token.is_path_segment_keyword() => { + let span = self.span; + self.bump(); + Ok(Ident::new(ident.name, span)) + } + _ => self.parse_ident(), + } + } + + fn parse_ident_or_underscore(&mut self) -> PResult<'a, ast::Ident> { + match self.token { + token::Ident(ident, false) if ident.name == keywords::Underscore.name() => { + let span = self.span; + self.bump(); + Ok(Ident::new(ident.name, span)) + } + _ => self.parse_ident(), + } + } + + /// Parses a qualified path. + /// Assumes that the leading `<` has been parsed already. + /// + /// `qualified_path = ::path` + /// + /// # Examples + /// `::default` + /// `::a` + /// `::F::a` (without disambiguator) + /// `::F::a::` (with disambiguator) + fn parse_qpath(&mut self, style: PathStyle) -> PResult<'a, (QSelf, ast::Path)> { + let lo = self.prev_span; + let ty = self.parse_ty()?; + + // `path` will contain the prefix of the path up to the `>`, + // if any (e.g., `U` in the `::*` examples + // above). `path_span` has the span of that path, or an empty + // span in the case of something like `::Bar`. + let (mut path, path_span); + if self.eat_keyword(keywords::As) { + let path_lo = self.span; + path = self.parse_path(PathStyle::Type)?; + path_span = path_lo.to(self.prev_span); + } else { + path = ast::Path { segments: Vec::new(), span: syntax_pos::DUMMY_SP }; + path_span = self.span.to(self.span); + } + + // See doc comment for `unmatched_angle_bracket_count`. + self.expect(&token::Gt)?; + if self.unmatched_angle_bracket_count > 0 { + self.unmatched_angle_bracket_count -= 1; + debug!("parse_qpath: (decrement) count={:?}", self.unmatched_angle_bracket_count); + } + + self.expect(&token::ModSep)?; + + let qself = QSelf { ty, path_span, position: path.segments.len() }; + self.parse_path_segments(&mut path.segments, style, true)?; + + Ok((qself, ast::Path { segments: path.segments, span: lo.to(self.prev_span) })) + } + + /// Parses simple paths. + /// + /// `path = [::] segment+` + /// `segment = ident | ident[::] | ident[::](args) [-> type]` + /// + /// # Examples + /// `a::b::C` (without disambiguator) + /// `a::b::C::` (with disambiguator) + /// `Fn(Args)` (without disambiguator) + /// `Fn::(Args)` (with disambiguator) + pub fn parse_path(&mut self, style: PathStyle) -> PResult<'a, ast::Path> { + self.parse_path_common(style, true) + } + + crate fn parse_path_common(&mut self, style: PathStyle, enable_warning: bool) + -> PResult<'a, ast::Path> { + maybe_whole!(self, NtPath, |path| { + if style == PathStyle::Mod && + path.segments.iter().any(|segment| segment.args.is_some()) { + self.diagnostic().span_err(path.span, "unexpected generic arguments in path"); + } + path + }); + + let lo = self.meta_var_span.unwrap_or(self.span); + let mut segments = Vec::new(); + let mod_sep_ctxt = self.span.ctxt(); + if self.eat(&token::ModSep) { + segments.push(PathSegment::path_root(lo.shrink_to_lo().with_ctxt(mod_sep_ctxt))); + } + self.parse_path_segments(&mut segments, style, enable_warning)?; + + Ok(ast::Path { segments, span: lo.to(self.prev_span) }) + } + + /// Like `parse_path`, but also supports parsing `Word` meta items into paths for + /// backwards-compatibility. This is used when parsing derive macro paths in `#[derive]` + /// attributes. + pub fn parse_path_allowing_meta(&mut self, style: PathStyle) -> PResult<'a, ast::Path> { + let meta_ident = match self.token { + token::Interpolated(ref nt) => match **nt { + token::NtMeta(ref meta) => match meta.node { + ast::MetaItemKind::Word => Some(meta.ident.clone()), + _ => None, + }, + _ => None, + }, + _ => None, + }; + if let Some(path) = meta_ident { + self.bump(); + return Ok(path); + } + self.parse_path(style) + } + + fn parse_path_segments(&mut self, + segments: &mut Vec, + style: PathStyle, + enable_warning: bool) + -> PResult<'a, ()> { + loop { + let segment = self.parse_path_segment(style, enable_warning)?; + if style == PathStyle::Expr { + // In order to check for trailing angle brackets, we must have finished + // recursing (`parse_path_segment` can indirectly call this function), + // that is, the next token must be the highlighted part of the below example: + // + // `Foo::>::Qux` + // ^ here + // + // As opposed to the below highlight (if we had only finished the first + // recursion): + // + // `Foo::>::Qux` + // ^ here + // + // `PathStyle::Expr` is only provided at the root invocation and never in + // `parse_path_segment` to recurse and therefore can be checked to maintain + // this invariant. + self.check_trailing_angle_brackets(&segment, token::ModSep); + } + segments.push(segment); + + if self.is_import_coupler() || !self.eat(&token::ModSep) { + return Ok(()); + } + } + } + + fn parse_path_segment(&mut self, style: PathStyle, enable_warning: bool) + -> PResult<'a, PathSegment> { + let ident = self.parse_path_segment_ident()?; + + let is_args_start = |token: &token::Token| match *token { + token::Lt | token::BinOp(token::Shl) | token::OpenDelim(token::Paren) => true, + _ => false, + }; + let check_args_start = |this: &mut Self| { + this.expected_tokens.extend_from_slice( + &[TokenType::Token(token::Lt), TokenType::Token(token::OpenDelim(token::Paren))] + ); + is_args_start(&this.token) + }; + + Ok(if style == PathStyle::Type && check_args_start(self) || + style != PathStyle::Mod && self.check(&token::ModSep) + && self.look_ahead(1, |t| is_args_start(t)) { + // Generic arguments are found - `<`, `(`, `::<` or `::(`. + if self.eat(&token::ModSep) && style == PathStyle::Type && enable_warning { + self.diagnostic().struct_span_warn(self.prev_span, "unnecessary path disambiguator") + .span_label(self.prev_span, "try removing `::`").emit(); + } + let lo = self.span; + + // We use `style == PathStyle::Expr` to check if this is in a recursion or not. If + // it isn't, then we reset the unmatched angle bracket count as we're about to start + // parsing a new path. + if style == PathStyle::Expr { + self.unmatched_angle_bracket_count = 0; + self.max_angle_bracket_count = 0; + } + + let args = if self.eat_lt() { + // `<'a, T, A = U>` + let (args, bindings) = + self.parse_generic_args_with_leaning_angle_bracket_recovery(style, lo)?; + self.expect_gt()?; + let span = lo.to(self.prev_span); + AngleBracketedArgs { args, bindings, span }.into() + } else { + // `(T, U) -> R` + self.bump(); // `(` + let (inputs, recovered) = self.parse_seq_to_before_tokens( + &[&token::CloseDelim(token::Paren)], + SeqSep::trailing_allowed(token::Comma), + TokenExpectType::Expect, + |p| p.parse_ty())?; + if !recovered { + self.bump(); // `)` + } + let span = lo.to(self.prev_span); + let output = if self.eat(&token::RArrow) { + Some(self.parse_ty_common(false, false)?) + } else { + None + }; + ParenthesizedArgs { inputs, output, span }.into() + }; + + PathSegment { ident, args, id: ast::DUMMY_NODE_ID } + } else { + // Generic arguments are not found. + PathSegment::from_ident(ident) + }) + } + + crate fn check_lifetime(&mut self) -> bool { + self.expected_tokens.push(TokenType::Lifetime); + self.token.is_lifetime() + } + + /// Parses a single lifetime `'a` or panics. + crate fn expect_lifetime(&mut self) -> Lifetime { + if let Some(ident) = self.token.lifetime() { + let span = self.span; + self.bump(); + Lifetime { ident: Ident::new(ident.name, span), id: ast::DUMMY_NODE_ID } + } else { + self.span_bug(self.span, "not a lifetime") + } + } + + fn eat_label(&mut self) -> Option