aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yaml8
-rw-r--r--.vscode/launch.json2
-rw-r--r--Cargo.lock361
-rw-r--r--Cargo.toml1
-rw-r--r--README.md5
-rw-r--r--crates/ra_assists/src/assist_ctx.rs4
-rw-r--r--crates/ra_assists/src/assists/add_custom_impl.rs206
-rw-r--r--crates/ra_assists/src/assists/add_import.rs18
-rw-r--r--crates/ra_assists/src/assists/add_new.rs86
-rw-r--r--crates/ra_assists/src/assists/early_return.rs10
-rw-r--r--crates/ra_assists/src/doc_tests/generated.rs19
-rw-r--r--crates/ra_assists/src/lib.rs2
-rw-r--r--crates/ra_assists/src/test_db.rs2
-rw-r--r--crates/ra_batch/src/lib.rs2
-rw-r--r--crates/ra_cli/Cargo.toml6
-rw-r--r--crates/ra_cli/src/analysis_stats.rs15
-rw-r--r--crates/ra_cli/src/main.rs3
-rw-r--r--crates/ra_db/src/input.rs9
-rw-r--r--crates/ra_hir/Cargo.toml2
-rw-r--r--crates/ra_hir/src/code_model.rs409
-rw-r--r--crates/ra_hir/src/code_model/src.rs128
-rw-r--r--crates/ra_hir/src/db.rs4
-rw-r--r--crates/ra_hir/src/debug.rs94
-rw-r--r--crates/ra_hir/src/from_id.rs14
-rw-r--r--crates/ra_hir/src/from_source.rs362
-rw-r--r--crates/ra_hir/src/has_source.rs127
-rw-r--r--crates/ra_hir/src/lib.rs26
-rw-r--r--crates/ra_hir/src/source_binder.rs213
-rw-r--r--crates/ra_hir/src/ty.rs4
-rw-r--r--crates/ra_hir_def/Cargo.toml3
-rw-r--r--crates/ra_hir_def/src/adt.rs30
-rw-r--r--crates/ra_hir_def/src/attr.rs31
-rw-r--r--crates/ra_hir_def/src/body.rs108
-rw-r--r--crates/ra_hir_def/src/body/lower.rs108
-rw-r--r--crates/ra_hir_def/src/body/scope.rs10
-rw-r--r--crates/ra_hir_def/src/builtin_type.rs42
-rw-r--r--crates/ra_hir_def/src/child_by_source.rs177
-rw-r--r--crates/ra_hir_def/src/data.rs154
-rw-r--r--crates/ra_hir_def/src/db.rs29
-rw-r--r--crates/ra_hir_def/src/diagnostics.rs6
-rw-r--r--crates/ra_hir_def/src/docs.rs22
-rw-r--r--crates/ra_hir_def/src/dyn_map.rs108
-rw-r--r--crates/ra_hir_def/src/expr.rs15
-rw-r--r--crates/ra_hir_def/src/generics.rs174
-rw-r--r--crates/ra_hir_def/src/item_scope.rs172
-rw-r--r--crates/ra_hir_def/src/keys.rs56
-rw-r--r--crates/ra_hir_def/src/lang_item.rs2
-rw-r--r--crates/ra_hir_def/src/lib.rs346
-rw-r--r--crates/ra_hir_def/src/marks.rs1
-rw-r--r--crates/ra_hir_def/src/nameres.rs224
-rw-r--r--crates/ra_hir_def/src/nameres/collector.rs637
-rw-r--r--crates/ra_hir_def/src/nameres/path_resolution.rs105
-rw-r--r--crates/ra_hir_def/src/nameres/raw.rs105
-rw-r--r--crates/ra_hir_def/src/nameres/tests.rs53
-rw-r--r--crates/ra_hir_def/src/nameres/tests/globs.rs21
-rw-r--r--crates/ra_hir_def/src/nameres/tests/incremental.rs4
-rw-r--r--crates/ra_hir_def/src/nameres/tests/macros.rs24
-rw-r--r--crates/ra_hir_def/src/nameres/tests/mod_resolution.rs4
-rw-r--r--crates/ra_hir_def/src/path.rs527
-rw-r--r--crates/ra_hir_def/src/path/lower.rs178
-rw-r--r--crates/ra_hir_def/src/path/lower/lower_use.rs118
-rw-r--r--crates/ra_hir_def/src/per_ns.rs2
-rw-r--r--crates/ra_hir_def/src/resolver.rs296
-rw-r--r--crates/ra_hir_def/src/src.rs36
-rw-r--r--crates/ra_hir_def/src/trace.rs8
-rw-r--r--crates/ra_hir_expand/Cargo.toml1
-rw-r--r--crates/ra_hir_expand/src/ast_id_map.rs12
-rw-r--r--crates/ra_hir_expand/src/builtin_derive.rs321
-rw-r--r--crates/ra_hir_expand/src/builtin_macro.rs244
-rw-r--r--crates/ra_hir_expand/src/db.rs66
-rw-r--r--crates/ra_hir_expand/src/diagnostics.rs4
-rw-r--r--crates/ra_hir_expand/src/either.rs54
-rw-r--r--crates/ra_hir_expand/src/hygiene.rs9
-rw-r--r--crates/ra_hir_expand/src/lib.rs217
-rw-r--r--crates/ra_hir_expand/src/name.rs158
-rw-r--r--crates/ra_hir_expand/src/quote.rs40
-rw-r--r--crates/ra_hir_ty/Cargo.toml7
-rw-r--r--crates/ra_hir_ty/src/autoderef.rs18
-rw-r--r--crates/ra_hir_ty/src/db.rs47
-rw-r--r--crates/ra_hir_ty/src/diagnostics.rs14
-rw-r--r--crates/ra_hir_ty/src/display.rs12
-rw-r--r--crates/ra_hir_ty/src/expr.rs8
-rw-r--r--crates/ra_hir_ty/src/infer.rs361
-rw-r--r--crates/ra_hir_ty/src/infer/coerce.rs27
-rw-r--r--crates/ra_hir_ty/src/infer/expr.rs247
-rw-r--r--crates/ra_hir_ty/src/infer/pat.rs4
-rw-r--r--crates/ra_hir_ty/src/infer/path.rs86
-rw-r--r--crates/ra_hir_ty/src/infer/unify.rs276
-rw-r--r--crates/ra_hir_ty/src/lib.rs96
-rw-r--r--crates/ra_hir_ty/src/lower.rs174
-rw-r--r--crates/ra_hir_ty/src/marks.rs1
-rw-r--r--crates/ra_hir_ty/src/method_resolution.rs238
-rw-r--r--crates/ra_hir_ty/src/test_db.rs4
-rw-r--r--crates/ra_hir_ty/src/tests.rs4767
-rw-r--r--crates/ra_hir_ty/src/tests/coercion.rs159
-rw-r--r--crates/ra_hir_ty/src/tests/macros.rs390
-rw-r--r--crates/ra_hir_ty/src/tests/method_resolution.rs1005
-rw-r--r--crates/ra_hir_ty/src/tests/patterns.rs238
-rw-r--r--crates/ra_hir_ty/src/tests/regression.rs333
-rw-r--r--crates/ra_hir_ty/src/tests/simple.rs1663
-rw-r--r--crates/ra_hir_ty/src/tests/traits.rs1598
-rw-r--r--crates/ra_hir_ty/src/traits.rs25
-rw-r--r--crates/ra_hir_ty/src/traits/builtin.rs178
-rw-r--r--crates/ra_hir_ty/src/traits/chalk.rs667
-rw-r--r--crates/ra_hir_ty/src/utils.rs90
-rw-r--r--crates/ra_ide/Cargo.toml1
-rw-r--r--crates/ra_ide/src/call_info.rs43
-rw-r--r--crates/ra_ide/src/change.rs2
-rw-r--r--crates/ra_ide/src/completion/complete_dot.rs35
-rw-r--r--crates/ra_ide/src/completion/complete_path.rs17
-rw-r--r--crates/ra_ide/src/completion/complete_postfix.rs2
-rw-r--r--crates/ra_ide/src/completion/complete_scope.rs37
-rw-r--r--crates/ra_ide/src/completion/completion_context.rs32
-rw-r--r--crates/ra_ide/src/db.rs14
-rw-r--r--crates/ra_ide/src/diagnostics.rs2
-rw-r--r--crates/ra_ide/src/display.rs2
-rw-r--r--crates/ra_ide/src/display/navigation_target.rs84
-rw-r--r--crates/ra_ide/src/expand.rs89
-rw-r--r--crates/ra_ide/src/expand_macro.rs21
-rw-r--r--crates/ra_ide/src/extend_selection.rs80
-rw-r--r--crates/ra_ide/src/goto_definition.rs393
-rw-r--r--crates/ra_ide/src/goto_type_definition.rs43
-rw-r--r--crates/ra_ide/src/hover.rs126
-rw-r--r--crates/ra_ide/src/impls.rs10
-rw-r--r--crates/ra_ide/src/inlay_hints.rs68
-rw-r--r--crates/ra_ide/src/lib.rs5
-rw-r--r--crates/ra_ide/src/marks.rs9
-rw-r--r--crates/ra_ide/src/parent_module.rs11
-rw-r--r--crates/ra_ide/src/references.rs10
-rw-r--r--crates/ra_ide/src/references/classify.rs29
-rw-r--r--crates/ra_ide/src/references/name_definition.rs6
-rw-r--r--crates/ra_ide/src/references/rename.rs54
-rw-r--r--crates/ra_ide/src/references/search_scope.rs16
-rw-r--r--crates/ra_ide/src/runnables.rs6
-rw-r--r--crates/ra_ide/src/snapshots/highlighting.html31
-rw-r--r--crates/ra_ide/src/snapshots/rainbow_highlighting.html6
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs129
-rw-r--r--crates/ra_lsp_server/Cargo.toml4
-rw-r--r--crates/ra_lsp_server/build.rs15
-rw-r--r--crates/ra_lsp_server/src/caps.rs20
-rw-r--r--crates/ra_lsp_server/src/config.rs5
-rw-r--r--crates/ra_lsp_server/src/conv.rs7
-rw-r--r--crates/ra_lsp_server/src/main.rs25
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs19
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs18
-rw-r--r--crates/ra_lsp_server/src/main_loop/pending_requests.rs2
-rw-r--r--crates/ra_lsp_server/src/main_loop/subscriptions.rs2
-rw-r--r--crates/ra_lsp_server/src/markdown.rs2
-rw-r--r--crates/ra_lsp_server/src/req.rs29
-rw-r--r--crates/ra_lsp_server/src/world.rs75
-rw-r--r--crates/ra_lsp_server/tests/heavy_tests/main.rs118
-rw-r--r--crates/ra_lsp_server/tests/heavy_tests/support.rs3
-rw-r--r--crates/ra_mbe/src/lib.rs25
-rw-r--r--crates/ra_mbe/src/mbe_expander/matcher.rs8
-rw-r--r--crates/ra_mbe/src/mbe_expander/transcriber.rs17
-rw-r--r--crates/ra_mbe/src/subtree_source.rs14
-rw-r--r--crates/ra_mbe/src/syntax_bridge.rs242
-rw-r--r--crates/ra_mbe/src/tests.rs684
-rw-r--r--crates/ra_parser/src/grammar.rs2
-rw-r--r--crates/ra_parser/src/grammar/expressions/atom.rs10
-rw-r--r--crates/ra_parser/src/grammar/items.rs30
-rw-r--r--crates/ra_parser/src/grammar/patterns.rs2
-rw-r--r--crates/ra_parser/src/grammar/type_params.rs11
-rw-r--r--crates/ra_parser/src/lib.rs1
-rw-r--r--crates/ra_parser/src/parser.rs2
-rw-r--r--crates/ra_parser/src/syntax_kind/generated.rs9
-rw-r--r--crates/ra_parser/src/token_set.rs8
-rw-r--r--crates/ra_prof/src/lib.rs8
-rw-r--r--crates/ra_project_model/src/cargo_workspace.rs37
-rw-r--r--crates/ra_project_model/src/lib.rs14
-rw-r--r--crates/ra_syntax/Cargo.toml9
-rw-r--r--crates/ra_syntax/src/algo.rs12
-rw-r--r--crates/ra_syntax/src/ast/edit.rs4
-rw-r--r--crates/ra_syntax/src/ast/generated.rs34
-rw-r--r--crates/ra_syntax/src/ast/make.rs3
-rw-r--r--crates/ra_syntax/src/grammar.ron16
-rw-r--r--crates/ra_syntax/src/ptr.rs14
-rw-r--r--crates/ra_syntax/src/syntax_node.rs2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0028_macro_2.0.txt328
-rw-r--r--crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rs5
-rw-r--r--crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.txt83
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.txt9
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0147_const_param.rs1
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0147_const_param.txt23
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0147_macro_def.rs2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0147_macro_def.txt45
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0148_pub_macro_def.rs1
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0148_pub_macro_def.txt21
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0062_macro_2.0.rs (renamed from crates/ra_syntax/test_data/parser/err/0028_macro_2.0.rs)0
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0062_macro_2.0.txt176
-rw-r--r--crates/ra_tt/src/lib.rs43
-rw-r--r--crates/test_utils/src/lib.rs15
-rw-r--r--docs/dev/README.md5
-rw-r--r--docs/user/README.md63
-rw-r--r--docs/user/assists.md18
-rw-r--r--editors/code/package-lock.json731
-rw-r--r--editors/code/package.json141
-rw-r--r--editors/code/rollup.config.js3
-rw-r--r--editors/code/src/commands/analyzer_status.ts14
-rw-r--r--editors/code/src/commands/apply_source_change.ts8
-rw-r--r--editors/code/src/commands/cargo_watch.ts49
-rw-r--r--editors/code/src/commands/expand_macro.ts10
-rw-r--r--editors/code/src/commands/index.ts2
-rw-r--r--editors/code/src/commands/inlay_hints.ts34
-rw-r--r--editors/code/src/commands/join_lines.ts6
-rw-r--r--editors/code/src/commands/matching_brace.ts6
-rw-r--r--editors/code/src/commands/on_enter.ts8
-rw-r--r--editors/code/src/commands/parent_module.ts6
-rw-r--r--editors/code/src/commands/runnables.ts52
-rw-r--r--editors/code/src/commands/syntaxTree.ts10
-rw-r--r--editors/code/src/commands/watch_status.ts2
-rw-r--r--editors/code/src/config.ts113
-rw-r--r--editors/code/src/events/change_active_text_editor.ts6
-rw-r--r--editors/code/src/events/change_text_document.ts2
-rw-r--r--editors/code/src/extension.ts73
-rw-r--r--editors/code/src/highlighting.ts30
-rw-r--r--editors/code/src/notifications/publish_decorations.ts11
-rw-r--r--editors/code/src/server.ts39
-rw-r--r--editors/code/src/test/fixtures/rust-diagnostics/error/E0277.json261
-rw-r--r--editors/code/src/test/utils/diagnotics/SuggestedFix.test.ts29
-rw-r--r--editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts26
-rw-r--r--editors/code/src/test/utils/diagnotics/rust.test.ts92
-rw-r--r--editors/code/src/test/utils/diagnotics/vscode.test.ts24
-rw-r--r--editors/code/src/test/utils/index.ts2
-rw-r--r--editors/code/src/utils/diagnostics/SuggestedFix.ts4
-rw-r--r--editors/code/src/utils/diagnostics/SuggestedFixCollection.ts6
-rw-r--r--editors/code/src/utils/diagnostics/rust.ts58
-rw-r--r--editors/code/src/utils/diagnostics/vscode.ts2
-rw-r--r--editors/code/src/utils/processes.ts4
-rw-r--r--editors/code/tsconfig.json9
-rw-r--r--editors/code/tslint.json12
-rw-r--r--xtask/src/lib.rs5
-rw-r--r--xtask/src/main.rs5
233 files changed, 14882 insertions, 10763 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 5bc41533c..cb397ae14 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -14,6 +14,7 @@ jobs:
14 env: 14 env:
15 RUSTFLAGS: -D warnings 15 RUSTFLAGS: -D warnings
16 CARGO_INCREMENTAL: 0 16 CARGO_INCREMENTAL: 0
17 RUN_SLOW_TESTS: 1
17 steps: 18 steps:
18 19
19 - name: Checkout repository 20 - name: Checkout repository
@@ -46,9 +47,10 @@ jobs:
46 47
47 - name: Prepare build directory for cache 48 - name: Prepare build directory for cache
48 run: | 49 run: |
49 find ./target/debug -maxdepth 1 -type f -delete && \ 50 find ./target/debug -maxdepth 1 -type f -delete \
50 rm -fr ./target/debug/{deps,.fingerprint}/{*ra_*,*heavy_test*,*gen_lsp*,*thread_worker*} && \ 51 && rm -fr ./target/debug/{deps,.fingerprint}/{*ra_*,*heavy_test*,*gen_lsp*,*thread_worker*} \
51 rm -f ./target/.rustc_info.json 52 && rm -f ./target/.rustc_info.json \
53 && rm ./target/.slow_tests_cookie
52 54
53 type-script: 55 type-script:
54 name: TypeScript 56 name: TypeScript
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 9aafc8bd3..0cf3984a9 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -16,7 +16,7 @@
16 "env": { 16 "env": {
17 "__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/debug/ra_lsp_server" 17 "__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/debug/ra_lsp_server"
18 }, 18 },
19 "outFiles": ["${workspaceFolder}/editors/code/out/**/*.js"], 19 "outFiles": ["${workspaceFolder}/editors/code/bundle/**/*.js"],
20 "preLaunchTask": "Build All" 20 "preLaunchTask": "Build All"
21 }, 21 },
22 { 22 {
diff --git a/Cargo.lock b/Cargo.lock
index 2557b5e59..e724c1a76 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -10,7 +10,12 @@ dependencies = [
10 10
11[[package]] 11[[package]]
12name = "anyhow" 12name = "anyhow"
13version = "1.0.24" 13version = "1.0.25"
14source = "registry+https://github.com/rust-lang/crates.io-index"
15
16[[package]]
17name = "anymap"
18version = "0.12.1"
14source = "registry+https://github.com/rust-lang/crates.io-index" 19source = "registry+https://github.com/rust-lang/crates.io-index"
15 20
16[[package]] 21[[package]]
@@ -23,7 +28,7 @@ name = "atty"
23version = "0.2.13" 28version = "0.2.13"
24source = "registry+https://github.com/rust-lang/crates.io-index" 29source = "registry+https://github.com/rust-lang/crates.io-index"
25dependencies = [ 30dependencies = [
26 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 31 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
27 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 32 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
28] 33]
29 34
@@ -39,7 +44,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
39dependencies = [ 44dependencies = [
40 "backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", 45 "backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
41 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 46 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
42 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 47 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
43 "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 48 "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
44] 49]
45 50
@@ -48,8 +53,8 @@ name = "backtrace-sys"
48version = "0.1.32" 53version = "0.1.32"
49source = "registry+https://github.com/rust-lang/crates.io-index" 54source = "registry+https://github.com/rust-lang/crates.io-index"
50dependencies = [ 55dependencies = [
51 "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", 56 "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)",
52 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 57 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
53] 58]
54 59
55[[package]] 60[[package]]
@@ -101,18 +106,18 @@ dependencies = [
101 106
102[[package]] 107[[package]]
103name = "cargo_metadata" 108name = "cargo_metadata"
104version = "0.9.0" 109version = "0.9.1"
105source = "registry+https://github.com/rust-lang/crates.io-index" 110source = "registry+https://github.com/rust-lang/crates.io-index"
106dependencies = [ 111dependencies = [
107 "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 112 "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
108 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 113 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
109 "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 114 "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
110 "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", 115 "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)",
111] 116]
112 117
113[[package]] 118[[package]]
114name = "cc" 119name = "cc"
115version = "1.0.47" 120version = "1.0.48"
116source = "registry+https://github.com/rust-lang/crates.io-index" 121source = "registry+https://github.com/rust-lang/crates.io-index"
117 122
118[[package]] 123[[package]]
@@ -123,38 +128,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
123[[package]] 128[[package]]
124name = "chalk-derive" 129name = "chalk-derive"
125version = "0.1.0" 130version = "0.1.0"
126source = "git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30#095cd38a4f16337913bba487f2055b9ca0179f30" 131source = "git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5#ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5"
127dependencies = [ 132dependencies = [
128 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 133 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
129 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 134 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
130 "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 135 "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
131] 136]
132 137
133[[package]] 138[[package]]
134name = "chalk-engine" 139name = "chalk-engine"
135version = "0.9.0" 140version = "0.9.0"
136source = "git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30#095cd38a4f16337913bba487f2055b9ca0179f30" 141source = "git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5#ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5"
137dependencies = [ 142dependencies = [
138 "chalk-macros 0.1.1 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 143 "chalk-macros 0.1.1 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
139 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 144 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
140 "stacker 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
141] 145]
142 146
143[[package]] 147[[package]]
144name = "chalk-ir" 148name = "chalk-ir"
145version = "0.1.0" 149version = "0.1.0"
146source = "git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30#095cd38a4f16337913bba487f2055b9ca0179f30" 150source = "git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5#ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5"
147dependencies = [ 151dependencies = [
148 "chalk-derive 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 152 "chalk-derive 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
149 "chalk-engine 0.9.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 153 "chalk-engine 0.9.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
150 "chalk-macros 0.1.1 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 154 "chalk-macros 0.1.1 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
151 "lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", 155 "lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
152] 156]
153 157
154[[package]] 158[[package]]
155name = "chalk-macros" 159name = "chalk-macros"
156version = "0.1.1" 160version = "0.1.1"
157source = "git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30#095cd38a4f16337913bba487f2055b9ca0179f30" 161source = "git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5#ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5"
158dependencies = [ 162dependencies = [
159 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 163 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
160] 164]
@@ -162,24 +166,24 @@ dependencies = [
162[[package]] 166[[package]]
163name = "chalk-rust-ir" 167name = "chalk-rust-ir"
164version = "0.1.0" 168version = "0.1.0"
165source = "git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30#095cd38a4f16337913bba487f2055b9ca0179f30" 169source = "git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5#ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5"
166dependencies = [ 170dependencies = [
167 "chalk-derive 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 171 "chalk-derive 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
168 "chalk-engine 0.9.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 172 "chalk-engine 0.9.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
169 "chalk-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 173 "chalk-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
170 "chalk-macros 0.1.1 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 174 "chalk-macros 0.1.1 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
171] 175]
172 176
173[[package]] 177[[package]]
174name = "chalk-solve" 178name = "chalk-solve"
175version = "0.1.0" 179version = "0.1.0"
176source = "git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30#095cd38a4f16337913bba487f2055b9ca0179f30" 180source = "git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5#ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5"
177dependencies = [ 181dependencies = [
178 "chalk-derive 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 182 "chalk-derive 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
179 "chalk-engine 0.9.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 183 "chalk-engine 0.9.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
180 "chalk-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 184 "chalk-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
181 "chalk-macros 0.1.1 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 185 "chalk-macros 0.1.1 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
182 "chalk-rust-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 186 "chalk-rust-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
183 "ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", 187 "ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
184 "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", 188 "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
185 "petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", 189 "petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -187,23 +191,13 @@ dependencies = [
187] 191]
188 192
189[[package]] 193[[package]]
190name = "chrono"
191version = "0.4.10"
192source = "registry+https://github.com/rust-lang/crates.io-index"
193dependencies = [
194 "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
195 "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
196 "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
197]
198
199[[package]]
200name = "clicolors-control" 194name = "clicolors-control"
201version = "1.0.1" 195version = "1.0.1"
202source = "registry+https://github.com/rust-lang/crates.io-index" 196source = "registry+https://github.com/rust-lang/crates.io-index"
203dependencies = [ 197dependencies = [
204 "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 198 "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
205 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 199 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
206 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 200 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
207 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 201 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
208] 202]
209 203
@@ -223,7 +217,7 @@ dependencies = [
223 "clicolors-control 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 217 "clicolors-control 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
224 "encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 218 "encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
225 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 219 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
226 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 220 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
227 "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 221 "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
228 "termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 222 "termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
229 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 223 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -324,12 +318,21 @@ version = "0.3.6"
324source = "registry+https://github.com/rust-lang/crates.io-index" 318source = "registry+https://github.com/rust-lang/crates.io-index"
325 319
326[[package]] 320[[package]]
321name = "env_logger"
322version = "0.7.1"
323source = "registry+https://github.com/rust-lang/crates.io-index"
324dependencies = [
325 "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
326 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
327]
328
329[[package]]
327name = "filetime" 330name = "filetime"
328version = "0.2.8" 331version = "0.2.8"
329source = "registry+https://github.com/rust-lang/crates.io-index" 332source = "registry+https://github.com/rust-lang/crates.io-index"
330dependencies = [ 333dependencies = [
331 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 334 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
332 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 335 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
333 "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", 336 "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
334 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 337 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
335] 338]
@@ -340,18 +343,6 @@ version = "0.1.9"
340source = "registry+https://github.com/rust-lang/crates.io-index" 343source = "registry+https://github.com/rust-lang/crates.io-index"
341 344
342[[package]] 345[[package]]
343name = "flexi_logger"
344version = "0.14.5"
345source = "registry+https://github.com/rust-lang/crates.io-index"
346dependencies = [
347 "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
348 "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
349 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
350 "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
351 "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
352]
353
354[[package]]
355name = "fnv" 346name = "fnv"
356version = "1.0.6" 347version = "1.0.6"
357source = "registry+https://github.com/rust-lang/crates.io-index" 348source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -380,7 +371,7 @@ name = "fsevent-sys"
380version = "2.0.1" 371version = "2.0.1"
381source = "registry+https://github.com/rust-lang/crates.io-index" 372source = "registry+https://github.com/rust-lang/crates.io-index"
382dependencies = [ 373dependencies = [
383 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 374 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
384] 375]
385 376
386[[package]] 377[[package]]
@@ -416,16 +407,11 @@ version = "0.1.13"
416source = "registry+https://github.com/rust-lang/crates.io-index" 407source = "registry+https://github.com/rust-lang/crates.io-index"
417dependencies = [ 408dependencies = [
418 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 409 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
419 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 410 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
420 "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 411 "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
421] 412]
422 413
423[[package]] 414[[package]]
424name = "glob"
425version = "0.3.0"
426source = "registry+https://github.com/rust-lang/crates.io-index"
427
428[[package]]
429name = "globset" 415name = "globset"
430version = "0.4.4" 416version = "0.4.4"
431source = "registry+https://github.com/rust-lang/crates.io-index" 417source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -447,10 +433,18 @@ dependencies = [
447 433
448[[package]] 434[[package]]
449name = "hermit-abi" 435name = "hermit-abi"
450version = "0.1.3" 436version = "0.1.5"
451source = "registry+https://github.com/rust-lang/crates.io-index" 437source = "registry+https://github.com/rust-lang/crates.io-index"
452dependencies = [ 438dependencies = [
453 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 439 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
440]
441
442[[package]]
443name = "humantime"
444version = "1.3.0"
445source = "registry+https://github.com/rust-lang/crates.io-index"
446dependencies = [
447 "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
454] 448]
455 449
456[[package]] 450[[package]]
@@ -478,7 +472,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
478dependencies = [ 472dependencies = [
479 "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 473 "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
480 "inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 474 "inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
481 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 475 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
482] 476]
483 477
484[[package]] 478[[package]]
@@ -486,7 +480,7 @@ name = "inotify-sys"
486version = "0.1.3" 480version = "0.1.3"
487source = "registry+https://github.com/rust-lang/crates.io-index" 481source = "registry+https://github.com/rust-lang/crates.io-index"
488dependencies = [ 482dependencies = [
489 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 483 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
490] 484]
491 485
492[[package]] 486[[package]]
@@ -497,8 +491,8 @@ dependencies = [
497 "console 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 491 "console 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
498 "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 492 "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
499 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 493 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
500 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 494 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
501 "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", 495 "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)",
502 "serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)", 496 "serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)",
503 "uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 497 "uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
504] 498]
@@ -508,7 +502,7 @@ name = "iovec"
508version = "0.1.4" 502version = "0.1.4"
509source = "registry+https://github.com/rust-lang/crates.io-index" 503source = "registry+https://github.com/rust-lang/crates.io-index"
510dependencies = [ 504dependencies = [
511 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 505 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
512] 506]
513 507
514[[package]] 508[[package]]
@@ -530,7 +524,7 @@ version = "0.3.3"
530source = "registry+https://github.com/rust-lang/crates.io-index" 524source = "registry+https://github.com/rust-lang/crates.io-index"
531dependencies = [ 525dependencies = [
532 "jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 526 "jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
533 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 527 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
534 "paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 528 "paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
535] 529]
536 530
@@ -539,9 +533,9 @@ name = "jemalloc-sys"
539version = "0.3.2" 533version = "0.3.2"
540source = "registry+https://github.com/rust-lang/crates.io-index" 534source = "registry+https://github.com/rust-lang/crates.io-index"
541dependencies = [ 535dependencies = [
542 "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", 536 "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)",
543 "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 537 "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
544 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 538 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
545] 539]
546 540
547[[package]] 541[[package]]
@@ -550,7 +544,7 @@ version = "0.3.2"
550source = "registry+https://github.com/rust-lang/crates.io-index" 544source = "registry+https://github.com/rust-lang/crates.io-index"
551dependencies = [ 545dependencies = [
552 "jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 546 "jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
553 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 547 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
554] 548]
555 549
556[[package]] 550[[package]]
@@ -589,7 +583,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
589 583
590[[package]] 584[[package]]
591name = "libc" 585name = "libc"
592version = "0.2.65" 586version = "0.2.66"
593source = "registry+https://github.com/rust-lang/crates.io-index" 587source = "registry+https://github.com/rust-lang/crates.io-index"
594 588
595[[package]] 589[[package]]
@@ -620,18 +614,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
620dependencies = [ 614dependencies = [
621 "crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 615 "crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
622 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 616 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
623 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 617 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
624 "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", 618 "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)",
625] 619]
626 620
627[[package]] 621[[package]]
628name = "lsp-types" 622name = "lsp-types"
629version = "0.61.0" 623version = "0.66.0"
630source = "registry+https://github.com/rust-lang/crates.io-index" 624source = "registry+https://github.com/rust-lang/crates.io-index"
631dependencies = [ 625dependencies = [
632 "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 626 "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
633 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 627 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
634 "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", 628 "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)",
635 "serde_repr 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 629 "serde_repr 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
636 "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 630 "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
637] 631]
@@ -664,7 +658,7 @@ dependencies = [
664 "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 658 "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
665 "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 659 "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
666 "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 660 "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
667 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 661 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
668 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 662 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
669 "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 663 "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
670 "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 664 "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -674,7 +668,7 @@ dependencies = [
674 668
675[[package]] 669[[package]]
676name = "mio-extras" 670name = "mio-extras"
677version = "2.0.5" 671version = "2.0.6"
678source = "registry+https://github.com/rust-lang/crates.io-index" 672source = "registry+https://github.com/rust-lang/crates.io-index"
679dependencies = [ 673dependencies = [
680 "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 674 "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -700,7 +694,7 @@ version = "0.2.33"
700source = "registry+https://github.com/rust-lang/crates.io-index" 694source = "registry+https://github.com/rust-lang/crates.io-index"
701dependencies = [ 695dependencies = [
702 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 696 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
703 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 697 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
704 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 698 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
705] 699]
706 700
@@ -715,23 +709,14 @@ dependencies = [
715 "fsevent-sys 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 709 "fsevent-sys 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
716 "inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", 710 "inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
717 "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 711 "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
718 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 712 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
719 "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", 713 "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)",
720 "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 714 "mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
721 "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 715 "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
722 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 716 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
723] 717]
724 718
725[[package]] 719[[package]]
726name = "num-integer"
727version = "0.1.41"
728source = "registry+https://github.com/rust-lang/crates.io-index"
729dependencies = [
730 "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
731 "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
732]
733
734[[package]]
735name = "num-traits" 720name = "num-traits"
736version = "0.2.10" 721version = "0.2.10"
737source = "registry+https://github.com/rust-lang/crates.io-index" 722source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -744,8 +729,8 @@ name = "num_cpus"
744version = "1.11.1" 729version = "1.11.1"
745source = "registry+https://github.com/rust-lang/crates.io-index" 730source = "registry+https://github.com/rust-lang/crates.io-index"
746dependencies = [ 731dependencies = [
747 "hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 732 "hermit-abi 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
748 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 733 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
749] 734]
750 735
751[[package]] 736[[package]]
@@ -774,9 +759,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
774dependencies = [ 759dependencies = [
775 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 760 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
776 "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 761 "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
777 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 762 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
778 "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", 763 "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
779 "smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 764 "smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
780 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 765 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
781] 766]
782 767
@@ -797,7 +782,7 @@ dependencies = [
797 "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", 782 "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)",
798 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 783 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
799 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 784 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
800 "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 785 "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
801] 786]
802 787
803[[package]] 788[[package]]
@@ -831,7 +816,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
831dependencies = [ 816dependencies = [
832 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 817 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
833 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 818 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
834 "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 819 "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
835] 820]
836 821
837[[package]] 822[[package]]
@@ -860,14 +845,6 @@ dependencies = [
860] 845]
861 846
862[[package]] 847[[package]]
863name = "psm"
864version = "0.1.6"
865source = "registry+https://github.com/rust-lang/crates.io-index"
866dependencies = [
867 "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)",
868]
869
870[[package]]
871name = "quick-error" 848name = "quick-error"
872version = "1.2.2" 849version = "1.2.2"
873source = "registry+https://github.com/rust-lang/crates.io-index" 850source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -928,11 +905,13 @@ dependencies = [
928name = "ra_cli" 905name = "ra_cli"
929version = "0.1.0" 906version = "0.1.0"
930dependencies = [ 907dependencies = [
931 "flexi_logger 0.14.5 (registry+https://github.com/rust-lang/crates.io-index)", 908 "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
932 "pico-args 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 909 "pico-args 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
933 "ra_batch 0.1.0", 910 "ra_batch 0.1.0",
934 "ra_db 0.1.0", 911 "ra_db 0.1.0",
935 "ra_hir 0.1.0", 912 "ra_hir 0.1.0",
913 "ra_hir_def 0.1.0",
914 "ra_hir_ty 0.1.0",
936 "ra_ide 0.1.0", 915 "ra_ide 0.1.0",
937 "ra_prof 0.1.0", 916 "ra_prof 0.1.0",
938 "ra_syntax 0.1.0", 917 "ra_syntax 0.1.0",
@@ -963,11 +942,13 @@ dependencies = [
963name = "ra_hir" 942name = "ra_hir"
964version = "0.1.0" 943version = "0.1.0"
965dependencies = [ 944dependencies = [
945 "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
966 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 946 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
967 "ra_db 0.1.0", 947 "ra_db 0.1.0",
968 "ra_hir_def 0.1.0", 948 "ra_hir_def 0.1.0",
969 "ra_hir_expand 0.1.0", 949 "ra_hir_expand 0.1.0",
970 "ra_hir_ty 0.1.0", 950 "ra_hir_ty 0.1.0",
951 "ra_prof 0.1.0",
971 "ra_syntax 0.1.0", 952 "ra_syntax 0.1.0",
972 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 953 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
973] 954]
@@ -976,6 +957,9 @@ dependencies = [
976name = "ra_hir_def" 957name = "ra_hir_def"
977version = "0.1.0" 958version = "0.1.0"
978dependencies = [ 959dependencies = [
960 "anymap 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
961 "drop_bomb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
962 "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
979 "insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", 963 "insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
980 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 964 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
981 "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 965 "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -995,6 +979,7 @@ dependencies = [
995name = "ra_hir_expand" 979name = "ra_hir_expand"
996version = "0.1.0" 980version = "0.1.0"
997dependencies = [ 981dependencies = [
982 "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
998 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 983 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
999 "ra_arena 0.1.0", 984 "ra_arena 0.1.0",
1000 "ra_db 0.1.0", 985 "ra_db 0.1.0",
@@ -1010,9 +995,9 @@ name = "ra_hir_ty"
1010version = "0.1.0" 995version = "0.1.0"
1011dependencies = [ 996dependencies = [
1012 "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 997 "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
1013 "chalk-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 998 "chalk-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
1014 "chalk-rust-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 999 "chalk-rust-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
1015 "chalk-solve 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)", 1000 "chalk-solve 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)",
1016 "ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", 1001 "ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
1017 "insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", 1002 "insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
1018 "lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", 1003 "lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1031,6 +1016,7 @@ dependencies = [
1031name = "ra_ide" 1016name = "ra_ide"
1032version = "0.1.0" 1017version = "0.1.0"
1033dependencies = [ 1018dependencies = [
1019 "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
1034 "format-buf 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1020 "format-buf 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
1035 "fst 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 1021 "fst 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
1036 "insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", 1022 "insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1060,11 +1046,11 @@ name = "ra_lsp_server"
1060version = "0.1.0" 1046version = "0.1.0"
1061dependencies = [ 1047dependencies = [
1062 "crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1048 "crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
1063 "flexi_logger 0.14.5 (registry+https://github.com/rust-lang/crates.io-index)", 1049 "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
1064 "jod-thread 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1050 "jod-thread 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
1065 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1051 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
1066 "lsp-server 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 1052 "lsp-server 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
1067 "lsp-types 0.61.0 (registry+https://github.com/rust-lang/crates.io-index)", 1053 "lsp-types 0.66.0 (registry+https://github.com/rust-lang/crates.io-index)",
1068 "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 1054 "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
1069 "ra_ide 0.1.0", 1055 "ra_ide 0.1.0",
1070 "ra_prof 0.1.0", 1056 "ra_prof 0.1.0",
@@ -1075,8 +1061,8 @@ dependencies = [
1075 "ra_vfs_glob 0.1.0", 1061 "ra_vfs_glob 0.1.0",
1076 "relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1062 "relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
1077 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1063 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1078 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1064 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
1079 "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", 1065 "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)",
1080 "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1066 "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
1081 "test_utils 0.1.0", 1067 "test_utils 0.1.0",
1082 "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 1068 "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1091,7 +1077,7 @@ dependencies = [
1091 "ra_syntax 0.1.0", 1077 "ra_syntax 0.1.0",
1092 "ra_tt 0.1.0", 1078 "ra_tt 0.1.0",
1093 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1079 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1094 "smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1080 "smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
1095 "test_utils 0.1.0", 1081 "test_utils 0.1.0",
1096] 1082]
1097 1083
@@ -1117,14 +1103,14 @@ dependencies = [
1117name = "ra_project_model" 1103name = "ra_project_model"
1118version = "0.1.0" 1104version = "0.1.0"
1119dependencies = [ 1105dependencies = [
1120 "cargo_metadata 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 1106 "cargo_metadata 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
1121 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1107 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
1122 "ra_arena 0.1.0", 1108 "ra_arena 0.1.0",
1123 "ra_cfg 0.1.0", 1109 "ra_cfg 0.1.0",
1124 "ra_db 0.1.0", 1110 "ra_db 0.1.0",
1125 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1111 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1126 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1112 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
1127 "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", 1113 "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)",
1128] 1114]
1129 1115
1130[[package]] 1116[[package]]
@@ -1136,9 +1122,10 @@ dependencies = [
1136 "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1122 "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
1137 "ra_parser 0.1.0", 1123 "ra_parser 0.1.0",
1138 "ra_text_edit 0.1.0", 1124 "ra_text_edit 0.1.0",
1139 "rowan 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 1125 "rowan 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
1140 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1126 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1141 "rustc_lexer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1127 "rustc_lexer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
1128 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
1142 "smol_str 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", 1129 "smol_str 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
1143 "test_utils 0.1.0", 1130 "test_utils 0.1.0",
1144 "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 1131 "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1189,7 +1176,7 @@ version = "0.6.5"
1189source = "registry+https://github.com/rust-lang/crates.io-index" 1176source = "registry+https://github.com/rust-lang/crates.io-index"
1190dependencies = [ 1177dependencies = [
1191 "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 1178 "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
1192 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 1179 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
1193 "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1180 "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
1194 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1181 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
1195 "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1182 "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1207,7 +1194,7 @@ version = "0.7.2"
1207source = "registry+https://github.com/rust-lang/crates.io-index" 1194source = "registry+https://github.com/rust-lang/crates.io-index"
1208dependencies = [ 1195dependencies = [
1209 "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", 1196 "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
1210 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 1197 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
1211 "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 1198 "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
1212 "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 1199 "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
1213 "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1200 "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1282,7 +1269,7 @@ name = "rand_jitter"
1282version = "0.1.4" 1269version = "0.1.4"
1283source = "registry+https://github.com/rust-lang/crates.io-index" 1270source = "registry+https://github.com/rust-lang/crates.io-index"
1284dependencies = [ 1271dependencies = [
1285 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 1272 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
1286 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1273 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
1287 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1274 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
1288] 1275]
@@ -1294,7 +1281,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1294dependencies = [ 1281dependencies = [
1295 "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 1282 "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
1296 "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1283 "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
1297 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 1284 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
1298 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1285 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
1299 "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1286 "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
1300 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1287 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1396,12 +1383,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1396dependencies = [ 1383dependencies = [
1397 "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 1384 "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
1398 "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 1385 "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
1399 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1386 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
1400] 1387]
1401 1388
1402[[package]] 1389[[package]]
1403name = "rowan" 1390name = "rowan"
1404version = "0.7.1" 1391version = "0.8.2"
1405source = "registry+https://github.com/rust-lang/crates.io-index" 1392source = "registry+https://github.com/rust-lang/crates.io-index"
1406dependencies = [ 1393dependencies = [
1407 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1394 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1456,7 +1443,7 @@ dependencies = [
1456 "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1443 "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
1457 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1444 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1458 "salsa-macros 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", 1445 "salsa-macros 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)",
1459 "smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1446 "smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
1460] 1447]
1461 1448
1462[[package]] 1449[[package]]
@@ -1467,7 +1454,7 @@ dependencies = [
1467 "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1454 "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
1468 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1455 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
1469 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1456 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
1470 "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 1457 "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
1471] 1458]
1472 1459
1473[[package]] 1460[[package]]
@@ -1489,7 +1476,7 @@ version = "0.9.0"
1489source = "registry+https://github.com/rust-lang/crates.io-index" 1476source = "registry+https://github.com/rust-lang/crates.io-index"
1490dependencies = [ 1477dependencies = [
1491 "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 1478 "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
1492 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1479 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
1493] 1480]
1494 1481
1495[[package]] 1482[[package]]
@@ -1499,30 +1486,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1499 1486
1500[[package]] 1487[[package]]
1501name = "serde" 1488name = "serde"
1502version = "1.0.103" 1489version = "1.0.104"
1503source = "registry+https://github.com/rust-lang/crates.io-index" 1490source = "registry+https://github.com/rust-lang/crates.io-index"
1504dependencies = [ 1491dependencies = [
1505 "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1492 "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
1506] 1493]
1507 1494
1508[[package]] 1495[[package]]
1509name = "serde_derive" 1496name = "serde_derive"
1510version = "1.0.103" 1497version = "1.0.104"
1511source = "registry+https://github.com/rust-lang/crates.io-index" 1498source = "registry+https://github.com/rust-lang/crates.io-index"
1512dependencies = [ 1499dependencies = [
1513 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1500 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
1514 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1501 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
1515 "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 1502 "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
1516] 1503]
1517 1504
1518[[package]] 1505[[package]]
1519name = "serde_json" 1506name = "serde_json"
1520version = "1.0.42" 1507version = "1.0.44"
1521source = "registry+https://github.com/rust-lang/crates.io-index" 1508source = "registry+https://github.com/rust-lang/crates.io-index"
1522dependencies = [ 1509dependencies = [
1523 "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 1510 "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
1524 "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1511 "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
1525 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1512 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
1526] 1513]
1527 1514
1528[[package]] 1515[[package]]
@@ -1532,7 +1519,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1532dependencies = [ 1519dependencies = [
1533 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1520 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
1534 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1521 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
1535 "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 1522 "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
1536] 1523]
1537 1524
1538[[package]] 1525[[package]]
@@ -1542,7 +1529,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1542dependencies = [ 1529dependencies = [
1543 "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 1530 "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
1544 "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 1531 "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
1545 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1532 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
1546 "yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 1533 "yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
1547] 1534]
1548 1535
@@ -1553,7 +1540,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1553 1540
1554[[package]] 1541[[package]]
1555name = "smallvec" 1542name = "smallvec"
1556version = "1.0.0" 1543version = "1.1.0"
1557source = "registry+https://github.com/rust-lang/crates.io-index" 1544source = "registry+https://github.com/rust-lang/crates.io-index"
1558 1545
1559[[package]] 1546[[package]]
@@ -1561,19 +1548,7 @@ name = "smol_str"
1561version = "0.1.15" 1548version = "0.1.15"
1562source = "registry+https://github.com/rust-lang/crates.io-index" 1549source = "registry+https://github.com/rust-lang/crates.io-index"
1563dependencies = [ 1550dependencies = [
1564 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1551 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
1565]
1566
1567[[package]]
1568name = "stacker"
1569version = "0.1.6"
1570source = "registry+https://github.com/rust-lang/crates.io-index"
1571dependencies = [
1572 "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)",
1573 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
1574 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
1575 "psm 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
1576 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
1577] 1552]
1578 1553
1579[[package]] 1554[[package]]
@@ -1583,7 +1558,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1583 1558
1584[[package]] 1559[[package]]
1585name = "syn" 1560name = "syn"
1586version = "1.0.8" 1561version = "1.0.11"
1587source = "registry+https://github.com/rust-lang/crates.io-index" 1562source = "registry+https://github.com/rust-lang/crates.io-index"
1588dependencies = [ 1563dependencies = [
1589 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1564 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1597,7 +1572,7 @@ version = "3.1.0"
1597source = "registry+https://github.com/rust-lang/crates.io-index" 1572source = "registry+https://github.com/rust-lang/crates.io-index"
1598dependencies = [ 1573dependencies = [
1599 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 1574 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
1600 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 1575 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
1601 "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1576 "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
1602 "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", 1577 "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
1603 "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 1578 "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1609,7 +1584,7 @@ name = "termios"
1609version = "0.3.1" 1584version = "0.3.1"
1610source = "registry+https://github.com/rust-lang/crates.io-index" 1585source = "registry+https://github.com/rust-lang/crates.io-index"
1611dependencies = [ 1586dependencies = [
1612 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 1587 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
1613] 1588]
1614 1589
1615[[package]] 1590[[package]]
@@ -1617,7 +1592,7 @@ name = "test_utils"
1617version = "0.1.0" 1592version = "0.1.0"
1618dependencies = [ 1593dependencies = [
1619 "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1594 "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
1620 "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", 1595 "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)",
1621 "text_unit 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 1596 "text_unit 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
1622] 1597]
1623 1598
@@ -1648,16 +1623,6 @@ dependencies = [
1648] 1623]
1649 1624
1650[[package]] 1625[[package]]
1651name = "time"
1652version = "0.1.42"
1653source = "registry+https://github.com/rust-lang/crates.io-index"
1654dependencies = [
1655 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
1656 "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
1657 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
1658]
1659
1660[[package]]
1661name = "unicase" 1626name = "unicase"
1662version = "2.6.0" 1627version = "2.6.0"
1663source = "registry+https://github.com/rust-lang/crates.io-index" 1628source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1678,7 +1643,7 @@ name = "unicode-normalization"
1678version = "0.1.11" 1643version = "0.1.11"
1679source = "registry+https://github.com/rust-lang/crates.io-index" 1644source = "registry+https://github.com/rust-lang/crates.io-index"
1680dependencies = [ 1645dependencies = [
1681 "smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1646 "smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
1682] 1647]
1683 1648
1684[[package]] 1649[[package]]
@@ -1699,7 +1664,7 @@ dependencies = [
1699 "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1664 "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
1700 "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1665 "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
1701 "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1666 "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
1702 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1667 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
1703] 1668]
1704 1669
1705[[package]] 1670[[package]]
@@ -1708,7 +1673,7 @@ version = "0.8.1"
1708source = "registry+https://github.com/rust-lang/crates.io-index" 1673source = "registry+https://github.com/rust-lang/crates.io-index"
1709dependencies = [ 1674dependencies = [
1710 "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1675 "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
1711 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1676 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
1712] 1677]
1713 1678
1714[[package]] 1679[[package]]
@@ -1781,12 +1746,12 @@ dependencies = [
1781name = "xtask" 1746name = "xtask"
1782version = "0.1.0" 1747version = "0.1.0"
1783dependencies = [ 1748dependencies = [
1784 "anyhow 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", 1749 "anyhow 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
1785 "pico-args 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 1750 "pico-args 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
1786 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1751 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
1787 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1752 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
1788 "ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 1753 "ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
1789 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1754 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
1790 "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 1755 "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
1791] 1756]
1792 1757
@@ -1798,14 +1763,10 @@ dependencies = [
1798 "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 1763 "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
1799] 1764]
1800 1765
1801[[package]]
1802name = "yansi"
1803version = "0.5.0"
1804source = "registry+https://github.com/rust-lang/crates.io-index"
1805
1806[metadata] 1766[metadata]
1807"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" 1767"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d"
1808"checksum anyhow 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b412394828b7ca486b362f300b762d8e43dafd6f0d727b63f1cd2ade207c6cef" 1768"checksum anyhow 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9267dff192e68f3399525901e709a48c1d3982c9c072fa32f2127a0cb0babf14"
1769"checksum anymap 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "33954243bd79057c2de7338850b85983a44588021f8a5fee574a8888c6de4344"
1809"checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" 1770"checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8"
1810"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" 1771"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90"
1811"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" 1772"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"
@@ -1818,16 +1779,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1818"checksum bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8d6c2c5b58ab920a4f5aeaaca34b4488074e8cc7596af94e6f8c6ff247c60245" 1779"checksum bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8d6c2c5b58ab920a4f5aeaaca34b4488074e8cc7596af94e6f8c6ff247c60245"
1819"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" 1780"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5"
1820"checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" 1781"checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb"
1821"checksum cargo_metadata 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8d2d1617e838936c0d2323a65cc151e03ae19a7678dd24f72bccf27119b90a5d" 1782"checksum cargo_metadata 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "46e3374c604fb39d1a2f35ed5e4a4e30e60d01fab49446e08f1b3e9a90aef202"
1822"checksum cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)" = "aa87058dce70a3ff5621797f1506cb837edd02ac4c0ae642b4542dce802908b8" 1783"checksum cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "f52a465a666ca3d838ebbf08b241383421412fe7ebb463527bba275526d89f76"
1823"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 1784"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
1824"checksum chalk-derive 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)" = "<none>" 1785"checksum chalk-derive 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)" = "<none>"
1825"checksum chalk-engine 0.9.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)" = "<none>" 1786"checksum chalk-engine 0.9.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)" = "<none>"
1826"checksum chalk-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)" = "<none>" 1787"checksum chalk-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)" = "<none>"
1827"checksum chalk-macros 0.1.1 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)" = "<none>" 1788"checksum chalk-macros 0.1.1 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)" = "<none>"
1828"checksum chalk-rust-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)" = "<none>" 1789"checksum chalk-rust-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)" = "<none>"
1829"checksum chalk-solve 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)" = "<none>" 1790"checksum chalk-solve 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=ff65b5ac9860f3c36bd892c865ab23d5ff0bbae5)" = "<none>"
1830"checksum chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01"
1831"checksum clicolors-control 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90082ee5dcdd64dc4e9e0d37fbf3ee325419e39c0092191e0393df65518f741e" 1791"checksum clicolors-control 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90082ee5dcdd64dc4e9e0d37fbf3ee325419e39c0092191e0393df65518f741e"
1832"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" 1792"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
1833"checksum console 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f5d540c2d34ac9dd0deb5f3b5f54c36c79efa78f6b3ad19106a554d07a7b5d9f" 1793"checksum console 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f5d540c2d34ac9dd0deb5f3b5f54c36c79efa78f6b3ad19106a554d07a7b5d9f"
@@ -1843,9 +1803,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1843"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" 1803"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
1844"checksum ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8944dc8fa28ce4a38f778bd46bf7d923fe73eed5a439398507246c8e017e6f36" 1804"checksum ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8944dc8fa28ce4a38f778bd46bf7d923fe73eed5a439398507246c8e017e6f36"
1845"checksum encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" 1805"checksum encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
1806"checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
1846"checksum filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1ff6d4dab0aa0c8e6346d46052e93b13a16cf847b54ed357087c35011048cc7d" 1807"checksum filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1ff6d4dab0aa0c8e6346d46052e93b13a16cf847b54ed357087c35011048cc7d"
1847"checksum fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33" 1808"checksum fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33"
1848"checksum flexi_logger 0.14.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a13ea6b8a4debecf47bf3966d56db0e21366bc3a3649ba159e1a9e6fdd36a4f4"
1849"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" 1809"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
1850"checksum format-buf 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f7aea5a5909a74969507051a3b17adc84737e31a5f910559892aedce026f4d53" 1810"checksum format-buf 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f7aea5a5909a74969507051a3b17adc84737e31a5f910559892aedce026f4d53"
1851"checksum fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5f2a4a2034423744d2cc7ca2068453168dcdb82c438419e639a26bd87839c674" 1811"checksum fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5f2a4a2034423744d2cc7ca2068453168dcdb82c438419e639a26bd87839c674"
@@ -1856,10 +1816,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1856"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" 1816"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
1857"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" 1817"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
1858"checksum getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e7db7ca94ed4cd01190ceee0d8a8052f08a247aa1b469a7f68c6a3b71afcf407" 1818"checksum getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e7db7ca94ed4cd01190ceee0d8a8052f08a247aa1b469a7f68c6a3b71afcf407"
1859"checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
1860"checksum globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "925aa2cac82d8834e2b2a4415b6f6879757fb5c0928fc445ae76461a12eed8f2" 1819"checksum globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "925aa2cac82d8834e2b2a4415b6f6879757fb5c0928fc445ae76461a12eed8f2"
1861"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" 1820"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
1862"checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120" 1821"checksum hermit-abi 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f629dc602392d3ec14bfc8a09b5e644d7ffd725102b48b81e59f90f2633621d7"
1822"checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
1863"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" 1823"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
1864"checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2" 1824"checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2"
1865"checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718" 1825"checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718"
@@ -1877,21 +1837,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1877"checksum lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cc4fd87be4a815fd373e02773983940f0d75fb26fde8c098e9e45f7af03154c0" 1837"checksum lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cc4fd87be4a815fd373e02773983940f0d75fb26fde8c098e9e45f7af03154c0"
1878"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1838"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
1879"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" 1839"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f"
1880"checksum libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)" = "1a31a0627fdf1f6a39ec0dd577e101440b7db22672c0901fe00a9a6fbb5c24e8" 1840"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558"
1881"checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" 1841"checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83"
1882"checksum lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e57b3997725d2b60dbec1297f6c2e2957cc383db1cebd6be812163f969c7d586" 1842"checksum lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e57b3997725d2b60dbec1297f6c2e2957cc383db1cebd6be812163f969c7d586"
1883"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" 1843"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
1884"checksum lsp-server 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ba36405bd742139ab79c246ca5adb7fde2fe1a0f495e2c8e2f607b607dedb12" 1844"checksum lsp-server 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ba36405bd742139ab79c246ca5adb7fde2fe1a0f495e2c8e2f607b607dedb12"
1885"checksum lsp-types 0.61.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa3268fbe8beb2795c2fb327bf44f4f3d24f5fe9ebc18d7e2980afd444d72bcf" 1845"checksum lsp-types 0.66.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a2dddfe2791cbf4b5eff5a581e45becf47a24b128a62de80e7cc135bf50064"
1886"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 1846"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
1887"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" 1847"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e"
1888"checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" 1848"checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9"
1889"checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" 1849"checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f"
1890"checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40" 1850"checksum mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19"
1891"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" 1851"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
1892"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" 1852"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
1893"checksum notify 4.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "199628fc33b21bc767baa057490b00b382ecbae030803a7b36292422d15b778b" 1853"checksum notify 4.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "199628fc33b21bc767baa057490b00b382ecbae030803a7b36292422d15b778b"
1894"checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09"
1895"checksum num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c81ffc11c212fa327657cb19dd85eb7419e163b5b076bede2bdb5c974c07e4" 1854"checksum num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c81ffc11c212fa327657cb19dd85eb7419e163b5b076bede2bdb5c974c07e4"
1896"checksum num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72" 1855"checksum num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72"
1897"checksum once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "891f486f630e5c5a4916c7e16c4b24a53e78c860b646e9f8e005e4f16847bfed" 1856"checksum once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "891f486f630e5c5a4916c7e16c4b24a53e78c860b646e9f8e005e4f16847bfed"
@@ -1907,7 +1866,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1907"checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" 1866"checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5"
1908"checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27" 1867"checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27"
1909"checksum proptest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cf147e022eacf0c8a054ab864914a7602618adba841d800a9a9868a5237a529f" 1868"checksum proptest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cf147e022eacf0c8a054ab864914a7602618adba841d800a9a9868a5237a529f"
1910"checksum psm 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b14fc68b454f875abc8354c2555e1d56596f74833ddc0f77f87f4871ed6a30e0"
1911"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" 1869"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
1912"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" 1870"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
1913"checksum ra_vfs 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bc898f237e4b4498959ae0100c688793a23e77624d44ef710ba70094217f98e0" 1871"checksum ra_vfs 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bc898f237e4b4498959ae0100c688793a23e77624d44ef710ba70094217f98e0"
@@ -1935,7 +1893,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1935"checksum relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bedde000f40f2921ce439ea165c9c53fd629bfa115140c72e22aceacb4a21954" 1893"checksum relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bedde000f40f2921ce439ea165c9c53fd629bfa115140c72e22aceacb4a21954"
1936"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" 1894"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e"
1937"checksum ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ece421e0c4129b90e4a35b6f625e472e96c552136f5093a2f4fa2bbb75a62d5" 1895"checksum ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ece421e0c4129b90e4a35b6f625e472e96c552136f5093a2f4fa2bbb75a62d5"
1938"checksum rowan 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ca620bbf9c48c92b5cef19f96354a309ac36b7d8ef7c591e66117335c8b1988b" 1896"checksum rowan 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3eb10a10a48f0f809a217bcf074b85a03dcf79831bae80e7f1a043d0897463e2"
1939"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" 1897"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
1940"checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" 1898"checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8"
1941"checksum rustc_lexer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c86aae0c77166108c01305ee1a36a1e77289d7dc6ca0a3cd91ff4992de2d16a5" 1899"checksum rustc_lexer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c86aae0c77166108c01305ee1a36a1e77289d7dc6ca0a3cd91ff4992de2d16a5"
@@ -1947,24 +1905,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1947"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" 1905"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d"
1948"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 1906"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
1949"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 1907"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
1950"checksum serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" 1908"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449"
1951"checksum serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" 1909"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64"
1952"checksum serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)" = "1a3351dcbc1f067e2c92ab7c3c1f288ad1a4cffc470b5aaddb4c2e0a3ae80043" 1910"checksum serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)" = "48c575e0cc52bdd09b47f330f646cf59afc586e9c4e3ccd6fc1f625b8ea1dad7"
1953"checksum serde_repr 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "cd02c7587ec314570041b2754829f84d873ced14a96d1fd1823531e11db40573" 1911"checksum serde_repr 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "cd02c7587ec314570041b2754829f84d873ced14a96d1fd1823531e11db40573"
1954"checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35" 1912"checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35"
1955"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" 1913"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
1956"checksum smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecf3b85f68e8abaa7555aa5abdb1153079387e60b718283d732f03897fcfc86" 1914"checksum smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44e59e0c9fa00817912ae6e4e6e3c4fe04455e75699d06eedc7d85917ed8e8f4"
1957"checksum smol_str 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "34836c9a295c62c2ce3514471117c5cb269891e8421b2aafdd910050576c4d8b" 1915"checksum smol_str 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "34836c9a295c62c2ce3514471117c5cb269891e8421b2aafdd910050576c4d8b"
1958"checksum stacker 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d96fc4f13a0ac088e9a3cd9af1cc8c5cc1ab5deb2145cef661267dfc9c542f8a"
1959"checksum superslice 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab16ced94dbd8a46c82fd81e3ed9a8727dac2977ea869d217bcc4ea1f122e81f" 1916"checksum superslice 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab16ced94dbd8a46c82fd81e3ed9a8727dac2977ea869d217bcc4ea1f122e81f"
1960"checksum syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "661641ea2aa15845cddeb97dad000d22070bb5c1fb456b96c1cba883ec691e92" 1917"checksum syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "dff0acdb207ae2fe6d5976617f887eb1e35a2ba52c13c7234c790960cdad9238"
1961"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" 1918"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
1962"checksum termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "72b620c5ea021d75a735c943269bb07d30c9b77d6ac6b236bc8b5c496ef05625" 1919"checksum termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "72b620c5ea021d75a735c943269bb07d30c9b77d6ac6b236bc8b5c496ef05625"
1963"checksum text_unit 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e08bbcb7a3adbda0eb23431206b653bdad3d8dea311e72d36bf2215e27a42579" 1920"checksum text_unit 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e08bbcb7a3adbda0eb23431206b653bdad3d8dea311e72d36bf2215e27a42579"
1964"checksum thin-dst 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c52fd98a9e4913c466d83381a59245691875d2f3e04611fca57f964bd8aa96e1" 1921"checksum thin-dst 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c52fd98a9e4913c466d83381a59245691875d2f3e04611fca57f964bd8aa96e1"
1965"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 1922"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
1966"checksum threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" 1923"checksum threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865"
1967"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
1968"checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" 1924"checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
1969"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 1925"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
1970"checksum unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b561e267b2326bb4cebfc0ef9e68355c7abe6c6f522aeac2f5bf95d56c59bdcf" 1926"checksum unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b561e267b2326bb4cebfc0ef9e68355c7abe6c6f522aeac2f5bf95d56c59bdcf"
@@ -1983,4 +1939,3 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1983"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1939"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1984"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" 1940"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
1985"checksum yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d" 1941"checksum yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d"
1986"checksum yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71"
diff --git a/Cargo.toml b/Cargo.toml
index 92e3228f0..97508c57b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,3 +11,4 @@ incremental = true
11debug = 0 # set this to 1 or 2 to get more useful backtraces in debugger 11debug = 0 # set this to 1 or 2 to get more useful backtraces in debugger
12 12
13[patch.'crates-io'] 13[patch.'crates-io']
14# rowan = { path = "../rowan" } \ No newline at end of file
diff --git a/README.md b/README.md
index 74c971c0d..deaa147ba 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,8 @@ $ cargo xtask install
37$ cargo xtask install --server 37$ cargo xtask install --server
38``` 38```
39 39
40For non-standard setup of VS Code and other editors, see [./docs/user](./docs/user). 40For non-standard setup of VS Code and other editors, or if the language server
41cannot start, see [./docs/user](./docs/user).
41 42
42## Documentation 43## Documentation
43 44
@@ -57,7 +58,7 @@ https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frls-2.2E0
57## Quick Links 58## Quick Links
58 59
59* API docs: https://rust-analyzer.github.io/rust-analyzer/ra_ide/ 60* API docs: https://rust-analyzer.github.io/rust-analyzer/ra_ide/
60 61* Website: https://rust-analyzer.github.io/
61 62
62## License 63## License
63 64
diff --git a/crates/ra_assists/src/assist_ctx.rs b/crates/ra_assists/src/assist_ctx.rs
index 0ea84d548..993aebc47 100644
--- a/crates/ra_assists/src/assist_ctx.rs
+++ b/crates/ra_assists/src/assist_ctx.rs
@@ -1,5 +1,5 @@
1//! This module defines `AssistCtx` -- the API surface that is exposed to assists. 1//! This module defines `AssistCtx` -- the API surface that is exposed to assists.
2use hir::{db::HirDatabase, SourceAnalyzer}; 2use hir::{db::HirDatabase, InFile, SourceAnalyzer};
3use ra_db::FileRange; 3use ra_db::FileRange;
4use ra_fmt::{leading_indent, reindent}; 4use ra_fmt::{leading_indent, reindent};
5use ra_syntax::{ 5use ra_syntax::{
@@ -117,7 +117,7 @@ impl<'a, DB: HirDatabase> AssistCtx<'a, DB> {
117 node: &SyntaxNode, 117 node: &SyntaxNode,
118 offset: Option<TextUnit>, 118 offset: Option<TextUnit>,
119 ) -> SourceAnalyzer { 119 ) -> SourceAnalyzer {
120 SourceAnalyzer::new(self.db, hir::Source::new(self.frange.file_id.into(), node), offset) 120 SourceAnalyzer::new(self.db, InFile::new(self.frange.file_id.into(), node), offset)
121 } 121 }
122 122
123 pub(crate) fn covering_node_for_range(&self, range: TextRange) -> SyntaxElement { 123 pub(crate) fn covering_node_for_range(&self, range: TextRange) -> SyntaxElement {
diff --git a/crates/ra_assists/src/assists/add_custom_impl.rs b/crates/ra_assists/src/assists/add_custom_impl.rs
new file mode 100644
index 000000000..037306fd6
--- /dev/null
+++ b/crates/ra_assists/src/assists/add_custom_impl.rs
@@ -0,0 +1,206 @@
1//! FIXME: write short doc here
2
3use crate::{Assist, AssistCtx, AssistId};
4use hir::db::HirDatabase;
5use join_to_string::join;
6use ra_syntax::{
7 ast::{self, AstNode},
8 Direction, SmolStr,
9 SyntaxKind::{IDENT, WHITESPACE},
10 TextRange, TextUnit,
11};
12
13const DERIVE_TRAIT: &'static str = "derive";
14
15// Assist: add_custom_impl
16//
17// Adds impl block for derived trait.
18//
19// ```
20// #[derive(Deb<|>ug, Display)]
21// struct S;
22// ```
23// ->
24// ```
25// #[derive(Display)]
26// struct S;
27//
28// impl Debug for S {
29//
30// }
31// ```
32pub(crate) fn add_custom_impl(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> {
33 let input = ctx.find_node_at_offset::<ast::AttrInput>()?;
34 let attr = input.syntax().parent().and_then(ast::Attr::cast)?;
35
36 let attr_name = attr
37 .syntax()
38 .descendants_with_tokens()
39 .filter(|t| t.kind() == IDENT)
40 .find_map(|i| i.into_token())
41 .filter(|t| *t.text() == DERIVE_TRAIT)?
42 .text()
43 .clone();
44
45 let trait_token =
46 ctx.token_at_offset().filter(|t| t.kind() == IDENT && *t.text() != attr_name).next()?;
47
48 let annotated = attr.syntax().siblings(Direction::Next).find_map(|s| ast::Name::cast(s))?;
49 let annotated_name = annotated.syntax().text().to_string();
50 let start_offset = annotated.syntax().parent()?.text_range().end();
51
52 ctx.add_assist(AssistId("add_custom_impl"), "add custom impl", |edit| {
53 edit.target(attr.syntax().text_range());
54
55 let new_attr_input = input
56 .syntax()
57 .descendants_with_tokens()
58 .filter(|t| t.kind() == IDENT)
59 .filter_map(|t| t.into_token().map(|t| t.text().clone()))
60 .filter(|t| t != trait_token.text())
61 .collect::<Vec<SmolStr>>();
62 let has_more_derives = new_attr_input.len() > 0;
63 let new_attr_input =
64 join(new_attr_input.iter()).separator(", ").surround_with("(", ")").to_string();
65 let new_attr_input_len = new_attr_input.len();
66
67 let mut buf = String::new();
68 buf.push_str("\n\nimpl ");
69 buf.push_str(trait_token.text().as_str());
70 buf.push_str(" for ");
71 buf.push_str(annotated_name.as_str());
72 buf.push_str(" {\n");
73
74 let cursor_delta = if has_more_derives {
75 edit.replace(input.syntax().text_range(), new_attr_input);
76 input.syntax().text_range().len() - TextUnit::from_usize(new_attr_input_len)
77 } else {
78 let attr_range = attr.syntax().text_range();
79 edit.delete(attr_range);
80
81 let line_break_range = attr
82 .syntax()
83 .next_sibling_or_token()
84 .filter(|t| t.kind() == WHITESPACE)
85 .map(|t| t.text_range())
86 .unwrap_or(TextRange::from_to(TextUnit::from(0), TextUnit::from(0)));
87 edit.delete(line_break_range);
88
89 attr_range.len() + line_break_range.len()
90 };
91
92 edit.set_cursor(start_offset + TextUnit::of_str(&buf) - cursor_delta);
93 buf.push_str("\n}");
94 edit.insert(start_offset, buf);
95 })
96}
97
98#[cfg(test)]
99mod tests {
100 use super::*;
101 use crate::helpers::{check_assist, check_assist_not_applicable};
102
103 #[test]
104 fn add_custom_impl_for_unique_input() {
105 check_assist(
106 add_custom_impl,
107 "
108#[derive(Debu<|>g)]
109struct Foo {
110 bar: String,
111}
112 ",
113 "
114struct Foo {
115 bar: String,
116}
117
118impl Debug for Foo {
119<|>
120}
121 ",
122 )
123 }
124
125 #[test]
126 fn add_custom_impl_for_with_visibility_modifier() {
127 check_assist(
128 add_custom_impl,
129 "
130#[derive(Debug<|>)]
131pub struct Foo {
132 bar: String,
133}
134 ",
135 "
136pub struct Foo {
137 bar: String,
138}
139
140impl Debug for Foo {
141<|>
142}
143 ",
144 )
145 }
146
147 #[test]
148 fn add_custom_impl_when_multiple_inputs() {
149 check_assist(
150 add_custom_impl,
151 "
152#[derive(Display, Debug<|>, Serialize)]
153struct Foo {}
154 ",
155 "
156#[derive(Display, Serialize)]
157struct Foo {}
158
159impl Debug for Foo {
160<|>
161}
162 ",
163 )
164 }
165
166 #[test]
167 fn test_ignore_derive_macro_without_input() {
168 check_assist_not_applicable(
169 add_custom_impl,
170 "
171#[derive(<|>)]
172struct Foo {}
173 ",
174 )
175 }
176
177 #[test]
178 fn test_ignore_if_cursor_on_param() {
179 check_assist_not_applicable(
180 add_custom_impl,
181 "
182#[derive<|>(Debug)]
183struct Foo {}
184 ",
185 );
186
187 check_assist_not_applicable(
188 add_custom_impl,
189 "
190#[derive(Debug)<|>]
191struct Foo {}
192 ",
193 )
194 }
195
196 #[test]
197 fn test_ignore_if_not_derive() {
198 check_assist_not_applicable(
199 add_custom_impl,
200 "
201#[allow(non_camel_<|>case_types)]
202struct Foo {}
203 ",
204 )
205 }
206}
diff --git a/crates/ra_assists/src/assists/add_import.rs b/crates/ra_assists/src/assists/add_import.rs
index 363ade016..b8752cbad 100644
--- a/crates/ra_assists/src/assists/add_import.rs
+++ b/crates/ra_assists/src/assists/add_import.rs
@@ -578,17 +578,21 @@ fn apply_auto_import(
578 578
579fn collect_hir_path_segments(path: &hir::Path) -> Option<Vec<SmolStr>> { 579fn collect_hir_path_segments(path: &hir::Path) -> Option<Vec<SmolStr>> {
580 let mut ps = Vec::<SmolStr>::with_capacity(10); 580 let mut ps = Vec::<SmolStr>::with_capacity(10);
581 match path.kind { 581 match path.kind() {
582 hir::PathKind::Abs => ps.push("".into()), 582 hir::PathKind::Abs => ps.push("".into()),
583 hir::PathKind::Crate => ps.push("crate".into()), 583 hir::PathKind::Crate => ps.push("crate".into()),
584 hir::PathKind::Plain => {} 584 hir::PathKind::Plain => {}
585 hir::PathKind::Self_ => ps.push("self".into()), 585 hir::PathKind::Super(0) => ps.push("self".into()),
586 hir::PathKind::Super => ps.push("super".into()), 586 hir::PathKind::Super(lvl) => {
587 hir::PathKind::Type(_) | hir::PathKind::DollarCrate(_) => return None, 587 let mut chain = "super".to_string();
588 } 588 for _ in 0..*lvl {
589 for s in path.segments.iter() { 589 chain += "::super";
590 ps.push(s.name.to_string().into()); 590 }
591 ps.push(chain.into());
592 }
593 hir::PathKind::DollarCrate(_) => return None,
591 } 594 }
595 ps.extend(path.segments().iter().map(|it| it.name.to_string().into()));
592 Some(ps) 596 Some(ps)
593} 597}
594 598
diff --git a/crates/ra_assists/src/assists/add_new.rs b/crates/ra_assists/src/assists/add_new.rs
index 8f68bd5fb..b2f946fac 100644
--- a/crates/ra_assists/src/assists/add_new.rs
+++ b/crates/ra_assists/src/assists/add_new.rs
@@ -1,5 +1,5 @@
1use format_buf::format; 1use format_buf::format;
2use hir::{db::HirDatabase, FromSource}; 2use hir::{db::HirDatabase, FromSource, InFile};
3use join_to_string::join; 3use join_to_string::join;
4use ra_syntax::{ 4use ra_syntax::{
5 ast::{ 5 ast::{
@@ -56,42 +56,39 @@ pub(crate) fn add_new(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> {
56 let vis = vis.as_ref().map(String::as_str).unwrap_or(""); 56 let vis = vis.as_ref().map(String::as_str).unwrap_or("");
57 write!(&mut buf, " {}fn new(", vis).unwrap(); 57 write!(&mut buf, " {}fn new(", vis).unwrap();
58 58
59 join(field_list.fields().map(|f| { 59 join(field_list.fields().filter_map(|f| {
60 format!( 60 Some(format!("{}: {}", f.name()?.syntax().text(), f.ascribed_type()?.syntax().text()))
61 "{}: {}",
62 f.name().unwrap().syntax().text(),
63 f.ascribed_type().unwrap().syntax().text()
64 )
65 })) 61 }))
66 .separator(", ") 62 .separator(", ")
67 .to_buf(&mut buf); 63 .to_buf(&mut buf);
68 64
69 buf.push_str(") -> Self { Self {"); 65 buf.push_str(") -> Self { Self {");
70 66
71 join(field_list.fields().map(|f| f.name().unwrap().syntax().text())) 67 join(field_list.fields().filter_map(|f| Some(f.name()?.syntax().text())))
72 .separator(", ") 68 .separator(", ")
73 .surround_with(" ", " ") 69 .surround_with(" ", " ")
74 .to_buf(&mut buf); 70 .to_buf(&mut buf);
75 71
76 buf.push_str("} }"); 72 buf.push_str("} }");
77 73
78 let (start_offset, end_offset) = if let Some(impl_block) = impl_block { 74 let (start_offset, end_offset) = impl_block
79 buf.push('\n'); 75 .and_then(|impl_block| {
80 let start = impl_block 76 buf.push('\n');
81 .syntax() 77 let start = impl_block
82 .descendants_with_tokens() 78 .syntax()
83 .find(|t| t.kind() == T!['{']) 79 .descendants_with_tokens()
84 .unwrap() 80 .find(|t| t.kind() == T!['{'])?
85 .text_range() 81 .text_range()
86 .end(); 82 .end();
87 83
88 (start, TextUnit::from_usize(1)) 84 Some((start, TextUnit::from_usize(1)))
89 } else { 85 })
90 buf = generate_impl_text(&strukt, &buf); 86 .unwrap_or_else(|| {
91 let start = strukt.syntax().text_range().end(); 87 buf = generate_impl_text(&strukt, &buf);
92 88 let start = strukt.syntax().text_range().end();
93 (start, TextUnit::from_usize(3)) 89
94 }; 90 (start, TextUnit::from_usize(3))
91 });
95 92
96 edit.set_cursor(start_offset + TextUnit::of_str(&buf) - end_offset); 93 edit.set_cursor(start_offset + TextUnit::of_str(&buf) - end_offset);
97 edit.insert(start_offset, buf); 94 edit.insert(start_offset, buf);
@@ -141,44 +138,41 @@ fn find_struct_impl(
141 })?; 138 })?;
142 139
143 let struct_ty = { 140 let struct_ty = {
144 let src = hir::Source { file_id: ctx.frange.file_id.into(), value: strukt.clone() }; 141 let src = InFile { file_id: ctx.frange.file_id.into(), value: strukt.clone() };
145 hir::Struct::from_source(db, src).unwrap().ty(db) 142 hir::Struct::from_source(db, src)?.ty(db)
146 }; 143 };
147 144
148 let mut found_new_fn = false; 145 let block = module.descendants().filter_map(ast::ImplBlock::cast).find_map(|impl_blk| {
149 146 let src = InFile { file_id: ctx.frange.file_id.into(), value: impl_blk.clone() };
150 let block = module.descendants().filter_map(ast::ImplBlock::cast).find(|impl_blk| { 147 let blk = hir::ImplBlock::from_source(db, src)?;
151 if found_new_fn {
152 return false;
153 }
154
155 let src = hir::Source { file_id: ctx.frange.file_id.into(), value: impl_blk.clone() };
156 let blk = hir::ImplBlock::from_source(db, src).unwrap();
157 148
158 let same_ty = blk.target_ty(db) == struct_ty; 149 let same_ty = blk.target_ty(db) == struct_ty;
159 let not_trait_impl = blk.target_trait(db).is_none(); 150 let not_trait_impl = blk.target_trait(db).is_none();
160 151
161 if !(same_ty && not_trait_impl) { 152 if !(same_ty && not_trait_impl) {
162 return false; 153 None
154 } else {
155 Some(impl_blk)
163 } 156 }
164
165 found_new_fn = has_new_fn(impl_blk);
166 true
167 }); 157 });
168 158
169 if found_new_fn { 159 if let Some(ref impl_blk) = block {
170 None 160 if has_new_fn(impl_blk) {
171 } else { 161 return None;
172 Some(block) 162 }
173 } 163 }
164
165 Some(block)
174} 166}
175 167
176fn has_new_fn(imp: &ast::ImplBlock) -> bool { 168fn has_new_fn(imp: &ast::ImplBlock) -> bool {
177 if let Some(il) = imp.item_list() { 169 if let Some(il) = imp.item_list() {
178 for item in il.impl_items() { 170 for item in il.impl_items() {
179 if let ast::ImplItem::FnDef(f) = item { 171 if let ast::ImplItem::FnDef(f) = item {
180 if f.name().unwrap().text().eq_ignore_ascii_case("new") { 172 if let Some(name) = f.name() {
181 return true; 173 if name.text().eq_ignore_ascii_case("new") {
174 return true;
175 }
182 } 176 }
183 } 177 }
184 } 178 }
diff --git a/crates/ra_assists/src/assists/early_return.rs b/crates/ra_assists/src/assists/early_return.rs
index 264412526..023917aca 100644
--- a/crates/ra_assists/src/assists/early_return.rs
+++ b/crates/ra_assists/src/assists/early_return.rs
@@ -83,8 +83,8 @@ pub(crate) fn convert_to_guarded_return(ctx: AssistCtx<impl HirDatabase>) -> Opt
83 let parent_container = parent_block.syntax().parent()?.parent()?; 83 let parent_container = parent_block.syntax().parent()?.parent()?;
84 84
85 let early_expression: ast::Expr = match parent_container.kind() { 85 let early_expression: ast::Expr = match parent_container.kind() {
86 WHILE_EXPR | LOOP_EXPR => make::expr_continue().into(), 86 WHILE_EXPR | LOOP_EXPR => make::expr_continue(),
87 FN_DEF => make::expr_return().into(), 87 FN_DEF => make::expr_return(),
88 _ => return None, 88 _ => return None,
89 }; 89 };
90 90
@@ -116,13 +116,13 @@ pub(crate) fn convert_to_guarded_return(ctx: AssistCtx<impl HirDatabase>) -> Opt
116 ) 116 )
117 .into(), 117 .into(),
118 ), 118 ),
119 make::expr_path(make::path_from_name_ref(make::name_ref("it"))).into(), 119 make::expr_path(make::path_from_name_ref(make::name_ref("it"))),
120 ); 120 );
121 121
122 let sad_arm = make::match_arm( 122 let sad_arm = make::match_arm(
123 // FIXME: would be cool to use `None` or `Err(_)` if appropriate 123 // FIXME: would be cool to use `None` or `Err(_)` if appropriate
124 once(make::placeholder_pat().into()), 124 once(make::placeholder_pat().into()),
125 early_expression.into(), 125 early_expression,
126 ); 126 );
127 127
128 make::expr_match(cond_expr, make::match_arm_list(vec![happy_arm, sad_arm])) 128 make::expr_match(cond_expr, make::match_arm_list(vec![happy_arm, sad_arm]))
@@ -130,7 +130,7 @@ pub(crate) fn convert_to_guarded_return(ctx: AssistCtx<impl HirDatabase>) -> Opt
130 130
131 let let_stmt = make::let_stmt( 131 let let_stmt = make::let_stmt(
132 make::bind_pat(make::name(&bound_ident.syntax().to_string())).into(), 132 make::bind_pat(make::name(&bound_ident.syntax().to_string())).into(),
133 Some(match_expr.into()), 133 Some(match_expr),
134 ); 134 );
135 let let_stmt = if_indent_level.increase_indent(let_stmt); 135 let let_stmt = if_indent_level.increase_indent(let_stmt);
136 replace(let_stmt.syntax(), &then_block, &parent_block, &if_expr) 136 replace(let_stmt.syntax(), &then_block, &parent_block, &if_expr)
diff --git a/crates/ra_assists/src/doc_tests/generated.rs b/crates/ra_assists/src/doc_tests/generated.rs
index 3c716c2d1..4586eeb59 100644
--- a/crates/ra_assists/src/doc_tests/generated.rs
+++ b/crates/ra_assists/src/doc_tests/generated.rs
@@ -3,6 +3,25 @@
3use super::check; 3use super::check;
4 4
5#[test] 5#[test]
6fn doctest_add_custom_impl() {
7 check(
8 "add_custom_impl",
9 r#####"
10#[derive(Deb<|>ug, Display)]
11struct S;
12"#####,
13 r#####"
14#[derive(Display)]
15struct S;
16
17impl Debug for S {
18
19}
20"#####,
21 )
22}
23
24#[test]
6fn doctest_add_derive() { 25fn doctest_add_derive() {
7 check( 26 check(
8 "add_derive", 27 "add_derive",
diff --git a/crates/ra_assists/src/lib.rs b/crates/ra_assists/src/lib.rs
index a372bd8b9..98fb20b22 100644
--- a/crates/ra_assists/src/lib.rs
+++ b/crates/ra_assists/src/lib.rs
@@ -95,6 +95,7 @@ mod assists {
95 mod add_derive; 95 mod add_derive;
96 mod add_explicit_type; 96 mod add_explicit_type;
97 mod add_impl; 97 mod add_impl;
98 mod add_custom_impl;
98 mod add_new; 99 mod add_new;
99 mod apply_demorgan; 100 mod apply_demorgan;
100 mod invert_if; 101 mod invert_if;
@@ -121,6 +122,7 @@ mod assists {
121 add_derive::add_derive, 122 add_derive::add_derive,
122 add_explicit_type::add_explicit_type, 123 add_explicit_type::add_explicit_type,
123 add_impl::add_impl, 124 add_impl::add_impl,
125 add_custom_impl::add_custom_impl,
124 add_new::add_new, 126 add_new::add_new,
125 apply_demorgan::apply_demorgan, 127 apply_demorgan::apply_demorgan,
126 invert_if::invert_if, 128 invert_if::invert_if,
diff --git a/crates/ra_assists/src/test_db.rs b/crates/ra_assists/src/test_db.rs
index 523259fd4..d5249f308 100644
--- a/crates/ra_assists/src/test_db.rs
+++ b/crates/ra_assists/src/test_db.rs
@@ -43,5 +43,3 @@ impl FileLoader for TestDB {
43 FileLoaderDelegate(self).relevant_crates(file_id) 43 FileLoaderDelegate(self).relevant_crates(file_id)
44 } 44 }
45} 45}
46
47impl hir::debug::HirDebugHelper for TestDB {}
diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs
index 2c9645c00..7744ba85a 100644
--- a/crates/ra_batch/src/lib.rs
+++ b/crates/ra_batch/src/lib.rs
@@ -22,7 +22,7 @@ fn vfs_root_to_id(r: ra_vfs::VfsRoot) -> SourceRootId {
22 22
23pub fn load_cargo(root: &Path) -> Result<(AnalysisHost, FxHashMap<SourceRootId, PackageRoot>)> { 23pub fn load_cargo(root: &Path) -> Result<(AnalysisHost, FxHashMap<SourceRootId, PackageRoot>)> {
24 let root = std::env::current_dir()?.join(root); 24 let root = std::env::current_dir()?.join(root);
25 let ws = ProjectWorkspace::discover(root.as_ref())?; 25 let ws = ProjectWorkspace::discover(root.as_ref(), &Default::default())?;
26 let project_roots = ws.to_roots(); 26 let project_roots = ws.to_roots();
27 let (sender, receiver) = unbounded(); 27 let (sender, receiver) = unbounded();
28 let sender = Box::new(move |t| sender.send(t).unwrap()); 28 let sender = Box::new(move |t| sender.send(t).unwrap());
diff --git a/crates/ra_cli/Cargo.toml b/crates/ra_cli/Cargo.toml
index c7e0d0f0f..12af075f7 100644
--- a/crates/ra_cli/Cargo.toml
+++ b/crates/ra_cli/Cargo.toml
@@ -7,12 +7,14 @@ publish = false
7 7
8[dependencies] 8[dependencies]
9pico-args = "0.3.0" 9pico-args = "0.3.0"
10flexi_logger = "0.14.0" 10env_logger = { version = "0.7.1", default-features = false, features = ["humantime"] }
11 11
12ra_syntax = { path = "../ra_syntax" } 12ra_syntax = { path = "../ra_syntax" }
13ra_ide = { path = "../ra_ide" } 13ra_ide = { path = "../ra_ide" }
14ra_batch = { path = "../ra_batch" } 14ra_batch = { path = "../ra_batch" }
15ra_hir = { path = "../ra_hir" } 15hir = { path = "../ra_hir", package = "ra_hir" }
16hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" }
17hir_def = { path = "../ra_hir_def", package = "ra_hir_def" }
16ra_db = { path = "../ra_db" } 18ra_db = { path = "../ra_db" }
17 19
18[dependencies.ra_prof] 20[dependencies.ra_prof]
diff --git a/crates/ra_cli/src/analysis_stats.rs b/crates/ra_cli/src/analysis_stats.rs
index 9b1802a5f..ac65415a5 100644
--- a/crates/ra_cli/src/analysis_stats.rs
+++ b/crates/ra_cli/src/analysis_stats.rs
@@ -2,8 +2,13 @@
2 2
3use std::{collections::HashSet, fmt::Write, path::Path, time::Instant}; 3use std::{collections::HashSet, fmt::Write, path::Path, time::Instant};
4 4
5use hir::{
6 db::{DefDatabase, HirDatabase},
7 AssocItem, Crate, HasSource, HirDisplay, ModuleDef,
8};
9use hir_def::FunctionId;
10use hir_ty::{Ty, TypeWalk};
5use ra_db::SourceDatabaseExt; 11use ra_db::SourceDatabaseExt;
6use ra_hir::{AssocItem, Crate, HasSource, HirDisplay, ModuleDef, Ty, TypeWalk};
7use ra_syntax::AstNode; 12use ra_syntax::AstNode;
8 13
9use crate::{progress_report::ProgressReport, Result, Verbosity}; 14use crate::{progress_report::ProgressReport, Result, Verbosity};
@@ -101,8 +106,9 @@ pub fn run(
101 continue; 106 continue;
102 } 107 }
103 } 108 }
104 let body = f.body(db); 109 let f_id = FunctionId::from(f);
105 let inference_result = f.infer(db); 110 let body = db.body(f_id.into());
111 let inference_result = db.infer(f_id.into());
106 for (expr_id, _) in body.exprs.iter() { 112 for (expr_id, _) in body.exprs.iter() {
107 let ty = &inference_result[expr_id]; 113 let ty = &inference_result[expr_id];
108 num_exprs += 1; 114 num_exprs += 1;
@@ -122,7 +128,8 @@ pub fn run(
122 if let Some(mismatch) = inference_result.type_mismatch_for_expr(expr_id) { 128 if let Some(mismatch) = inference_result.type_mismatch_for_expr(expr_id) {
123 num_type_mismatches += 1; 129 num_type_mismatches += 1;
124 if verbosity.is_verbose() { 130 if verbosity.is_verbose() {
125 let src = f.body_source_map(db).expr_syntax(expr_id); 131 let (_, sm) = db.body_with_source_map(f_id.into());
132 let src = sm.expr_syntax(expr_id);
126 if let Some(src) = src { 133 if let Some(src) = src {
127 // FIXME: it might be nice to have a function (on Analysis?) that goes from Source<T> -> (LineCol, LineCol) directly 134 // FIXME: it might be nice to have a function (on Analysis?) that goes from Source<T> -> (LineCol, LineCol) directly
128 let original_file = src.file_id.original_file(db); 135 let original_file = src.file_id.original_file(db);
diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs
index fe847e611..3808590ab 100644
--- a/crates/ra_cli/src/main.rs
+++ b/crates/ra_cli/src/main.rs
@@ -7,7 +7,6 @@ mod progress_report;
7 7
8use std::{error::Error, fmt::Write, io::Read}; 8use std::{error::Error, fmt::Write, io::Read};
9 9
10use flexi_logger::Logger;
11use pico_args::Arguments; 10use pico_args::Arguments;
12use ra_ide::{file_structure, Analysis}; 11use ra_ide::{file_structure, Analysis};
13use ra_prof::profile; 12use ra_prof::profile;
@@ -32,7 +31,7 @@ impl Verbosity {
32} 31}
33 32
34fn main() -> Result<()> { 33fn main() -> Result<()> {
35 Logger::with_env_or_str("error").start()?; 34 env_logger::try_init()?;
36 35
37 let subcommand = match std::env::args_os().nth(1) { 36 let subcommand = match std::env::args_os().nth(1) {
38 None => { 37 None => {
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs
index b6d851776..2a7ed20d1 100644
--- a/crates/ra_db/src/input.rs
+++ b/crates/ra_db/src/input.rs
@@ -235,6 +235,15 @@ impl FromStr for Edition {
235 } 235 }
236} 236}
237 237
238impl fmt::Display for Edition {
239 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
240 f.write_str(match self {
241 Edition::Edition2015 => "2015",
242 Edition::Edition2018 => "2018",
243 })
244 }
245}
246
238impl Dependency { 247impl Dependency {
239 pub fn crate_id(&self) -> CrateId { 248 pub fn crate_id(&self) -> CrateId {
240 self.crate_id 249 self.crate_id
diff --git a/crates/ra_hir/Cargo.toml b/crates/ra_hir/Cargo.toml
index e79361e7c..7dc31ad3c 100644
--- a/crates/ra_hir/Cargo.toml
+++ b/crates/ra_hir/Cargo.toml
@@ -10,9 +10,11 @@ doctest = false
10[dependencies] 10[dependencies]
11log = "0.4.5" 11log = "0.4.5"
12rustc-hash = "1.0" 12rustc-hash = "1.0"
13either = "1.5"
13 14
14ra_syntax = { path = "../ra_syntax" } 15ra_syntax = { path = "../ra_syntax" }
15ra_db = { path = "../ra_db" } 16ra_db = { path = "../ra_db" }
17ra_prof = { path = "../ra_prof" }
16hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } 18hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
17hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } 19hir_def = { path = "../ra_hir_def", package = "ra_hir_def" }
18hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" } 20hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" }
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 38d66c2a7..bcfc0d03e 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -1,36 +1,35 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2
3pub(crate) mod src;
4
5use std::sync::Arc; 2use std::sync::Arc;
6 3
4use either::Either;
7use hir_def::{ 5use hir_def::{
8 adt::VariantData, 6 adt::VariantData,
9 body::{Body, BodySourceMap},
10 builtin_type::BuiltinType, 7 builtin_type::BuiltinType,
11 docs::Documentation, 8 docs::Documentation,
12 expr::{BindingAnnotation, Pat, PatId}, 9 expr::{BindingAnnotation, Pat, PatId},
10 nameres::ModuleSource,
13 per_ns::PerNs, 11 per_ns::PerNs,
14 resolver::HasResolver, 12 resolver::HasResolver,
15 type_ref::{Mutability, TypeRef}, 13 type_ref::{Mutability, TypeRef},
16 AdtId, AstItemDef, ConstId, ContainerId, DefWithBodyId, EnumId, FunctionId, GenericDefId, 14 AdtId, ConstId, DefWithBodyId, EnumId, FunctionId, HasModule, ImplId, LocalEnumVariantId,
17 HasModule, ImplId, LocalEnumVariantId, LocalImportId, LocalModuleId, LocalStructFieldId, 15 LocalModuleId, LocalStructFieldId, Lookup, ModuleId, StaticId, StructId, TraitId, TypeAliasId,
18 Lookup, ModuleId, StaticId, StructId, TraitId, TypeAliasId, UnionId, 16 TypeParamId, UnionId,
19}; 17};
20use hir_expand::{ 18use hir_expand::{
21 diagnostics::DiagnosticSink, 19 diagnostics::DiagnosticSink,
22 name::{self, AsName}, 20 name::{name, AsName},
23 AstId, MacroDefId, 21 MacroDefId,
22};
23use hir_ty::{
24 autoderef, display::HirFormatter, expr::ExprValidator, ApplicationTy, Canonical, InEnvironment,
25 TraitEnvironment, Ty, TyDefId, TypeCtor, TypeWalk,
24}; 26};
25use hir_ty::expr::ExprValidator; 27use ra_db::{CrateId, Edition, FileId};
26use ra_db::{CrateId, Edition, FileId, FilePosition}; 28use ra_syntax::ast;
27use ra_syntax::{ast, AstNode, SyntaxNode};
28 29
29use crate::{ 30use crate::{
30 db::{DefDatabase, HirDatabase}, 31 db::{DefDatabase, HirDatabase},
31 ty::display::HirFormatter, 32 CallableDef, HirDisplay, InFile, Name,
32 ty::{self, InEnvironment, InferenceResult, TraitEnvironment, Ty, TyDefId, TypeCtor, TypeWalk},
33 CallableDef, Either, HirDisplay, Name, Source,
34}; 33};
35 34
36/// hir::Crate describes a single crate. It's the main interface with which 35/// hir::Crate describes a single crate. It's the main interface with which
@@ -38,7 +37,7 @@ use crate::{
38/// root module. 37/// root module.
39#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 38#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
40pub struct Crate { 39pub struct Crate {
41 pub(crate) crate_id: CrateId, 40 pub(crate) id: CrateId,
42} 41}
43 42
44#[derive(Debug)] 43#[derive(Debug)]
@@ -48,91 +47,43 @@ pub struct CrateDependency {
48} 47}
49 48
50impl Crate { 49impl Crate {
51 pub fn crate_id(self) -> CrateId {
52 self.crate_id
53 }
54
55 pub fn dependencies(self, db: &impl DefDatabase) -> Vec<CrateDependency> { 50 pub fn dependencies(self, db: &impl DefDatabase) -> Vec<CrateDependency> {
56 db.crate_graph() 51 db.crate_graph()
57 .dependencies(self.crate_id) 52 .dependencies(self.id)
58 .map(|dep| { 53 .map(|dep| {
59 let krate = Crate { crate_id: dep.crate_id() }; 54 let krate = Crate { id: dep.crate_id() };
60 let name = dep.as_name(); 55 let name = dep.as_name();
61 CrateDependency { krate, name } 56 CrateDependency { krate, name }
62 }) 57 })
63 .collect() 58 .collect()
64 } 59 }
65 60
66 pub fn root_module(self, db: &impl DefDatabase) -> Option<Module> { 61 // FIXME: add `transitive_reverse_dependencies`.
67 let module_id = db.crate_def_map(self.crate_id).root; 62 pub fn reverse_dependencies(self, db: &impl DefDatabase) -> Vec<Crate> {
68 Some(Module::new(self, module_id))
69 }
70
71 pub fn edition(self, db: &impl DefDatabase) -> Edition {
72 let crate_graph = db.crate_graph(); 63 let crate_graph = db.crate_graph();
73 crate_graph.edition(self.crate_id) 64 crate_graph
74 } 65 .iter()
75 66 .filter(|&krate| crate_graph.dependencies(krate).any(|it| it.crate_id == self.id))
76 pub fn all(db: &impl DefDatabase) -> Vec<Crate> { 67 .map(|id| Crate { id })
77 db.crate_graph().iter().map(|crate_id| Crate { crate_id }).collect() 68 .collect()
78 } 69 }
79}
80
81pub enum ModuleSource {
82 SourceFile(ast::SourceFile),
83 Module(ast::Module),
84}
85 70
86impl ModuleSource { 71 pub fn root_module(self, db: &impl DefDatabase) -> Option<Module> {
87 pub fn new( 72 let module_id = db.crate_def_map(self.id).root;
88 db: &impl DefDatabase, 73 Some(Module::new(self, module_id))
89 file_id: Option<FileId>,
90 decl_id: Option<AstId<ast::Module>>,
91 ) -> ModuleSource {
92 match (file_id, decl_id) {
93 (Some(file_id), _) => {
94 let source_file = db.parse(file_id).tree();
95 ModuleSource::SourceFile(source_file)
96 }
97 (None, Some(item_id)) => {
98 let module = item_id.to_node(db);
99 assert!(module.item_list().is_some(), "expected inline module");
100 ModuleSource::Module(module)
101 }
102 (None, None) => panic!(),
103 }
104 } 74 }
105 75
106 // FIXME: this methods do not belong here 76 pub fn root_file(self, db: &impl DefDatabase) -> FileId {
107 pub fn from_position(db: &impl DefDatabase, position: FilePosition) -> ModuleSource { 77 db.crate_graph().crate_root(self.id)
108 let parse = db.parse(position.file_id);
109 match &ra_syntax::algo::find_node_at_offset::<ast::Module>(
110 parse.tree().syntax(),
111 position.offset,
112 ) {
113 Some(m) if !m.has_semi() => ModuleSource::Module(m.clone()),
114 _ => {
115 let source_file = parse.tree();
116 ModuleSource::SourceFile(source_file)
117 }
118 }
119 } 78 }
120 79
121 pub fn from_child_node(db: &impl DefDatabase, child: Source<&SyntaxNode>) -> ModuleSource { 80 pub fn edition(self, db: &impl DefDatabase) -> Edition {
122 if let Some(m) = 81 let crate_graph = db.crate_graph();
123 child.value.ancestors().filter_map(ast::Module::cast).find(|it| !it.has_semi()) 82 crate_graph.edition(self.id)
124 {
125 ModuleSource::Module(m)
126 } else {
127 let file_id = child.file_id.original_file(db);
128 let source_file = db.parse(file_id).tree();
129 ModuleSource::SourceFile(source_file)
130 }
131 } 83 }
132 84
133 pub fn from_file_id(db: &impl DefDatabase, file_id: FileId) -> ModuleSource { 85 pub fn all(db: &impl DefDatabase) -> Vec<Crate> {
134 let source_file = db.parse(file_id).tree(); 86 db.crate_graph().iter().map(|id| Crate { id }).collect()
135 ModuleSource::SourceFile(source_file)
136 } 87 }
137} 88}
138 89
@@ -171,7 +122,7 @@ pub use hir_def::attr::Attrs;
171 122
172impl Module { 123impl Module {
173 pub(crate) fn new(krate: Crate, crate_module_id: LocalModuleId) -> Module { 124 pub(crate) fn new(krate: Crate, crate_module_id: LocalModuleId) -> Module {
174 Module { id: ModuleId { krate: krate.crate_id, local_id: crate_module_id } } 125 Module { id: ModuleId { krate: krate.id, local_id: crate_module_id } }
175 } 126 }
176 127
177 /// Name of this module. 128 /// Name of this module.
@@ -189,7 +140,7 @@ impl Module {
189 140
190 /// Returns the crate this module is part of. 141 /// Returns the crate this module is part of.
191 pub fn krate(self) -> Crate { 142 pub fn krate(self) -> Crate {
192 Crate { crate_id: self.id.krate } 143 Crate { id: self.id.krate }
193 } 144 }
194 145
195 /// Topmost parent of this module. Every module has a `crate_root`, but some 146 /// Topmost parent of this module. Every module has a `crate_root`, but some
@@ -200,13 +151,6 @@ impl Module {
200 self.with_module_id(def_map.root) 151 self.with_module_id(def_map.root)
201 } 152 }
202 153
203 /// Finds a child module with the specified name.
204 pub fn child(self, db: &impl DefDatabase, name: &Name) -> Option<Module> {
205 let def_map = db.crate_def_map(self.id.krate);
206 let child_id = def_map[self.id.local_id].children.get(name)?;
207 Some(self.with_module_id(*child_id))
208 }
209
210 /// Iterates over all child modules. 154 /// Iterates over all child modules.
211 pub fn children(self, db: &impl DefDatabase) -> impl Iterator<Item = Module> { 155 pub fn children(self, db: &impl DefDatabase) -> impl Iterator<Item = Module> {
212 let def_map = db.crate_def_map(self.id.krate); 156 let def_map = db.crate_def_map(self.id.krate);
@@ -236,13 +180,11 @@ impl Module {
236 } 180 }
237 181
238 /// Returns a `ModuleScope`: a set of items, visible in this module. 182 /// Returns a `ModuleScope`: a set of items, visible in this module.
239 pub fn scope(self, db: &impl HirDatabase) -> Vec<(Name, ScopeDef, Option<Import>)> { 183 pub fn scope(self, db: &impl HirDatabase) -> Vec<(Name, ScopeDef)> {
240 db.crate_def_map(self.id.krate)[self.id.local_id] 184 db.crate_def_map(self.id.krate)[self.id.local_id]
241 .scope 185 .scope
242 .entries() 186 .entries()
243 .map(|(name, res)| { 187 .map(|(name, def)| (name.clone(), def.into()))
244 (name.clone(), res.def.into(), res.import.map(|id| Import { parent: self, id }))
245 })
246 .collect() 188 .collect()
247 } 189 }
248 190
@@ -277,19 +219,14 @@ impl Module {
277 219
278 pub fn impl_blocks(self, db: &impl DefDatabase) -> Vec<ImplBlock> { 220 pub fn impl_blocks(self, db: &impl DefDatabase) -> Vec<ImplBlock> {
279 let def_map = db.crate_def_map(self.id.krate); 221 let def_map = db.crate_def_map(self.id.krate);
280 def_map[self.id.local_id].impls.iter().copied().map(ImplBlock::from).collect() 222 def_map[self.id.local_id].scope.impls().map(ImplBlock::from).collect()
281 } 223 }
282 224
283 fn with_module_id(self, module_id: LocalModuleId) -> Module { 225 pub(crate) fn with_module_id(self, module_id: LocalModuleId) -> Module {
284 Module::new(self.krate(), module_id) 226 Module::new(self.krate(), module_id)
285 } 227 }
286} 228}
287 229
288pub struct Import {
289 pub(crate) parent: Module,
290 pub(crate) id: LocalImportId,
291}
292
293#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 230#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
294pub struct StructField { 231pub struct StructField {
295 pub(crate) parent: VariantDef, 232 pub(crate) parent: VariantDef,
@@ -307,8 +244,10 @@ impl StructField {
307 self.parent.variant_data(db).fields()[self.id].name.clone() 244 self.parent.variant_data(db).fields()[self.id].name.clone()
308 } 245 }
309 246
310 pub fn ty(&self, db: &impl HirDatabase) -> Ty { 247 pub fn ty(&self, db: &impl HirDatabase) -> Type {
311 db.field_types(self.parent.into())[self.id].clone() 248 let var_id = self.parent.into();
249 let ty = db.field_types(var_id)[self.id].clone();
250 Type::new(db, self.parent.module(db).id.krate.into(), var_id, ty)
312 } 251 }
313 252
314 pub fn parent_def(&self, _db: &impl HirDatabase) -> VariantDef { 253 pub fn parent_def(&self, _db: &impl HirDatabase) -> VariantDef {
@@ -323,7 +262,7 @@ pub struct Struct {
323 262
324impl Struct { 263impl Struct {
325 pub fn module(self, db: &impl DefDatabase) -> Module { 264 pub fn module(self, db: &impl DefDatabase) -> Module {
326 Module { id: self.id.module(db) } 265 Module { id: self.id.lookup(db).container.module(db) }
327 } 266 }
328 267
329 pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> { 268 pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> {
@@ -343,21 +282,8 @@ impl Struct {
343 .collect() 282 .collect()
344 } 283 }
345 284
346 pub fn field(self, db: &impl HirDatabase, name: &Name) -> Option<StructField> {
347 db.struct_data(self.id.into())
348 .variant_data
349 .fields()
350 .iter()
351 .find(|(_id, data)| data.name == *name)
352 .map(|(id, _)| StructField { parent: self.into(), id })
353 }
354
355 pub fn ty(self, db: &impl HirDatabase) -> Type { 285 pub fn ty(self, db: &impl HirDatabase) -> Type {
356 Type::from_def(db, self.id.module(db).krate, self.id) 286 Type::from_def(db, self.id.lookup(db).container.module(db).krate, self.id)
357 }
358
359 pub fn constructor_ty(self, db: &impl HirDatabase) -> Ty {
360 db.value_ty(self.id.into())
361 } 287 }
362 288
363 fn variant_data(self, db: &impl DefDatabase) -> Arc<VariantData> { 289 fn variant_data(self, db: &impl DefDatabase) -> Arc<VariantData> {
@@ -376,11 +302,11 @@ impl Union {
376 } 302 }
377 303
378 pub fn module(self, db: &impl DefDatabase) -> Module { 304 pub fn module(self, db: &impl DefDatabase) -> Module {
379 Module { id: self.id.module(db) } 305 Module { id: self.id.lookup(db).container.module(db) }
380 } 306 }
381 307
382 pub fn ty(self, db: &impl HirDatabase) -> Type { 308 pub fn ty(self, db: &impl HirDatabase) -> Type {
383 Type::from_def(db, self.id.module(db).krate, self.id) 309 Type::from_def(db, self.id.lookup(db).container.module(db).krate, self.id)
384 } 310 }
385 311
386 pub fn fields(self, db: &impl HirDatabase) -> Vec<StructField> { 312 pub fn fields(self, db: &impl HirDatabase) -> Vec<StructField> {
@@ -392,15 +318,6 @@ impl Union {
392 .collect() 318 .collect()
393 } 319 }
394 320
395 pub fn field(self, db: &impl HirDatabase, name: &Name) -> Option<StructField> {
396 db.union_data(self.id)
397 .variant_data
398 .fields()
399 .iter()
400 .find(|(_id, data)| data.name == *name)
401 .map(|(id, _)| StructField { parent: self.into(), id })
402 }
403
404 fn variant_data(self, db: &impl DefDatabase) -> Arc<VariantData> { 321 fn variant_data(self, db: &impl DefDatabase) -> Arc<VariantData> {
405 db.union_data(self.id).variant_data.clone() 322 db.union_data(self.id).variant_data.clone()
406 } 323 }
@@ -413,7 +330,7 @@ pub struct Enum {
413 330
414impl Enum { 331impl Enum {
415 pub fn module(self, db: &impl DefDatabase) -> Module { 332 pub fn module(self, db: &impl DefDatabase) -> Module {
416 Module { id: self.id.module(db) } 333 Module { id: self.id.lookup(db).container.module(db) }
417 } 334 }
418 335
419 pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> { 336 pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> {
@@ -432,13 +349,8 @@ impl Enum {
432 .collect() 349 .collect()
433 } 350 }
434 351
435 pub fn variant(self, db: &impl DefDatabase, name: &Name) -> Option<EnumVariant> {
436 let id = db.enum_data(self.id).variant(name)?;
437 Some(EnumVariant { parent: self, id })
438 }
439
440 pub fn ty(self, db: &impl HirDatabase) -> Type { 352 pub fn ty(self, db: &impl HirDatabase) -> Type {
441 Type::from_def(db, self.id.module(db).krate, self.id) 353 Type::from_def(db, self.id.lookup(db).container.module(db).krate, self.id)
442 } 354 }
443} 355}
444 356
@@ -468,14 +380,6 @@ impl EnumVariant {
468 .collect() 380 .collect()
469 } 381 }
470 382
471 pub fn field(self, db: &impl HirDatabase, name: &Name) -> Option<StructField> {
472 self.variant_data(db)
473 .fields()
474 .iter()
475 .find(|(_id, data)| data.name == *name)
476 .map(|(id, _)| StructField { parent: self.into(), id })
477 }
478
479 pub(crate) fn variant_data(self, db: &impl DefDatabase) -> Arc<VariantData> { 383 pub(crate) fn variant_data(self, db: &impl DefDatabase) -> Arc<VariantData> {
480 db.enum_data(self.parent.id).variants[self.id].variant_data.clone() 384 db.enum_data(self.parent.id).variants[self.id].variant_data.clone()
481 } 385 }
@@ -593,48 +497,8 @@ impl Function {
593 db.function_data(self.id).params.clone() 497 db.function_data(self.id).params.clone()
594 } 498 }
595 499
596 pub fn body_source_map(self, db: &impl HirDatabase) -> Arc<BodySourceMap> {
597 db.body_with_source_map(self.id.into()).1
598 }
599
600 pub fn body(self, db: &impl HirDatabase) -> Arc<Body> {
601 db.body(self.id.into())
602 }
603
604 pub fn ty(self, db: &impl HirDatabase) -> Ty {
605 db.value_ty(self.id.into())
606 }
607
608 pub fn infer(self, db: &impl HirDatabase) -> Arc<InferenceResult> {
609 db.infer(self.id.into())
610 }
611
612 /// The containing impl block, if this is a method.
613 pub fn impl_block(self, db: &impl DefDatabase) -> Option<ImplBlock> {
614 match self.container(db) {
615 Some(Container::ImplBlock(it)) => Some(it),
616 _ => None,
617 }
618 }
619
620 /// The containing trait, if this is a trait method definition.
621 pub fn parent_trait(self, db: &impl DefDatabase) -> Option<Trait> {
622 match self.container(db) {
623 Some(Container::Trait(it)) => Some(it),
624 _ => None,
625 }
626 }
627
628 pub fn container(self, db: &impl DefDatabase) -> Option<Container> {
629 match self.id.lookup(db).container {
630 ContainerId::TraitId(it) => Some(Container::Trait(it.into())),
631 ContainerId::ImplId(it) => Some(Container::ImplBlock(it.into())),
632 ContainerId::ModuleId(_) => None,
633 }
634 }
635
636 pub fn diagnostics(self, db: &impl HirDatabase, sink: &mut DiagnosticSink) { 500 pub fn diagnostics(self, db: &impl HirDatabase, sink: &mut DiagnosticSink) {
637 let infer = self.infer(db); 501 let infer = db.infer(self.id.into());
638 infer.add_diagnostics(db, self.id, sink); 502 infer.add_diagnostics(db, self.id, sink);
639 let mut validator = ExprValidator::new(self.id, infer, sink); 503 let mut validator = ExprValidator::new(self.id, infer, sink);
640 validator.validate_body(db); 504 validator.validate_body(db);
@@ -658,34 +522,6 @@ impl Const {
658 pub fn name(self, db: &impl HirDatabase) -> Option<Name> { 522 pub fn name(self, db: &impl HirDatabase) -> Option<Name> {
659 db.const_data(self.id).name.clone() 523 db.const_data(self.id).name.clone()
660 } 524 }
661
662 pub fn infer(self, db: &impl HirDatabase) -> Arc<InferenceResult> {
663 db.infer(self.id.into())
664 }
665
666 /// The containing impl block, if this is a type alias.
667 pub fn impl_block(self, db: &impl DefDatabase) -> Option<ImplBlock> {
668 match self.container(db) {
669 Some(Container::ImplBlock(it)) => Some(it),
670 _ => None,
671 }
672 }
673
674 /// The containing trait, if this is a trait type alias definition.
675 pub fn parent_trait(self, db: &impl DefDatabase) -> Option<Trait> {
676 match self.container(db) {
677 Some(Container::Trait(it)) => Some(it),
678 _ => None,
679 }
680 }
681
682 pub fn container(self, db: &impl DefDatabase) -> Option<Container> {
683 match self.id.lookup(db).container {
684 ContainerId::TraitId(it) => Some(Container::Trait(it.into())),
685 ContainerId::ImplId(it) => Some(Container::ImplBlock(it.into())),
686 ContainerId::ModuleId(_) => None,
687 }
688 }
689} 525}
690 526
691#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 527#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
@@ -701,10 +537,6 @@ impl Static {
701 pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> { 537 pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> {
702 Some(self.module(db).krate()) 538 Some(self.module(db).krate())
703 } 539 }
704
705 pub fn infer(self, db: &impl HirDatabase) -> Arc<InferenceResult> {
706 db.infer(self.id.into())
707 }
708} 540}
709 541
710#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 542#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
@@ -714,7 +546,7 @@ pub struct Trait {
714 546
715impl Trait { 547impl Trait {
716 pub fn module(self, db: &impl DefDatabase) -> Module { 548 pub fn module(self, db: &impl DefDatabase) -> Module {
717 Module { id: self.id.module(db) } 549 Module { id: self.id.lookup(db).container.module(db) }
718 } 550 }
719 551
720 pub fn name(self, db: &impl DefDatabase) -> Name { 552 pub fn name(self, db: &impl DefDatabase) -> Name {
@@ -749,30 +581,6 @@ impl TypeAlias {
749 Some(self.module(db).krate()) 581 Some(self.module(db).krate())
750 } 582 }
751 583
752 /// The containing impl block, if this is a type alias.
753 pub fn impl_block(self, db: &impl DefDatabase) -> Option<ImplBlock> {
754 match self.container(db) {
755 Some(Container::ImplBlock(it)) => Some(it),
756 _ => None,
757 }
758 }
759
760 /// The containing trait, if this is a trait type alias definition.
761 pub fn parent_trait(self, db: &impl DefDatabase) -> Option<Trait> {
762 match self.container(db) {
763 Some(Container::Trait(it)) => Some(it),
764 _ => None,
765 }
766 }
767
768 pub fn container(self, db: &impl DefDatabase) -> Option<Container> {
769 match self.id.lookup(db).container {
770 ContainerId::TraitId(it) => Some(Container::Trait(it.into())),
771 ContainerId::ImplId(it) => Some(Container::ImplBlock(it.into())),
772 ContainerId::ModuleId(_) => None,
773 }
774 }
775
776 pub fn type_ref(self, db: &impl DefDatabase) -> Option<TypeRef> { 584 pub fn type_ref(self, db: &impl DefDatabase) -> Option<TypeRef> {
777 db.type_alias_data(self.id).type_ref.clone() 585 db.type_alias_data(self.id).type_ref.clone()
778 } 586 }
@@ -791,14 +599,6 @@ pub struct MacroDef {
791 pub(crate) id: MacroDefId, 599 pub(crate) id: MacroDefId,
792} 600}
793 601
794impl MacroDef {}
795
796pub enum Container {
797 Trait(Trait),
798 ImplBlock(ImplBlock),
799}
800impl_froms!(Container: Trait, ImplBlock);
801
802#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] 602#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
803pub enum AssocItem { 603pub enum AssocItem {
804 Function(Function), 604 Function(Function),
@@ -819,15 +619,6 @@ impl AssocItem {
819 AssocItem::TypeAlias(t) => t.module(db), 619 AssocItem::TypeAlias(t) => t.module(db),
820 } 620 }
821 } 621 }
822
823 pub fn container(self, db: &impl DefDatabase) -> Container {
824 match self {
825 AssocItem::Function(f) => f.container(db),
826 AssocItem::Const(c) => c.container(db),
827 AssocItem::TypeAlias(t) => t.container(db),
828 }
829 .expect("AssocItem without container")
830 }
831} 622}
832 623
833#[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)] 624#[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)]
@@ -869,7 +660,7 @@ impl Local {
869 } 660 }
870 661
871 pub fn is_self(self, db: &impl HirDatabase) -> bool { 662 pub fn is_self(self, db: &impl HirDatabase) -> bool {
872 self.name(db) == Some(name::SELF_PARAM) 663 self.name(db) == Some(name![self])
873 } 664 }
874 665
875 pub fn is_mut(self, db: &impl HirDatabase) -> bool { 666 pub fn is_mut(self, db: &impl HirDatabase) -> bool {
@@ -901,18 +692,30 @@ impl Local {
901 Type { krate, ty: InEnvironment { value: ty, environment } } 692 Type { krate, ty: InEnvironment { value: ty, environment } }
902 } 693 }
903 694
904 pub fn source(self, db: &impl HirDatabase) -> Source<Either<ast::BindPat, ast::SelfParam>> { 695 pub fn source(self, db: &impl HirDatabase) -> InFile<Either<ast::BindPat, ast::SelfParam>> {
905 let (_body, source_map) = db.body_with_source_map(self.parent.into()); 696 let (_body, source_map) = db.body_with_source_map(self.parent.into());
906 let src = source_map.pat_syntax(self.pat_id).unwrap(); // Hmm... 697 let src = source_map.pat_syntax(self.pat_id).unwrap(); // Hmm...
907 let root = src.file_syntax(db); 698 let root = src.file_syntax(db);
908 src.map(|ast| ast.map(|it| it.cast().unwrap().to_node(&root), |it| it.to_node(&root))) 699 src.map(|ast| {
700 ast.map_left(|it| it.cast().unwrap().to_node(&root)).map_right(|it| it.to_node(&root))
701 })
909 } 702 }
910} 703}
911 704
912#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] 705#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
913pub struct GenericParam { 706pub struct TypeParam {
914 pub(crate) parent: GenericDefId, 707 pub(crate) id: TypeParamId,
915 pub(crate) idx: u32, 708}
709
710impl TypeParam {
711 pub fn name(self, db: &impl HirDatabase) -> Name {
712 let params = db.generic_params(self.id.parent);
713 params.types[self.id.local_id].name.clone()
714 }
715
716 pub fn module(self, db: &impl HirDatabase) -> Module {
717 self.id.parent.module(db).into()
718 }
916} 719}
917 720
918#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 721#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
@@ -922,11 +725,11 @@ pub struct ImplBlock {
922 725
923impl ImplBlock { 726impl ImplBlock {
924 pub fn all_in_crate(db: &impl HirDatabase, krate: Crate) -> Vec<ImplBlock> { 727 pub fn all_in_crate(db: &impl HirDatabase, krate: Crate) -> Vec<ImplBlock> {
925 let impls = db.impls_in_crate(krate.crate_id); 728 let impls = db.impls_in_crate(krate.id);
926 impls.all_impls().map(Self::from).collect() 729 impls.all_impls().map(Self::from).collect()
927 } 730 }
928 pub fn for_trait(db: &impl HirDatabase, krate: Crate, trait_: Trait) -> Vec<ImplBlock> { 731 pub fn for_trait(db: &impl HirDatabase, krate: Crate, trait_: Trait) -> Vec<ImplBlock> {
929 let impls = db.impls_in_crate(krate.crate_id); 732 let impls = db.impls_in_crate(krate.id);
930 impls.lookup_impl_blocks_for_trait(trait_.id).map(Self::from).collect() 733 impls.lookup_impl_blocks_for_trait(trait_.id).map(Self::from).collect()
931 } 734 }
932 735
@@ -943,7 +746,10 @@ impl ImplBlock {
943 let resolver = self.id.resolver(db); 746 let resolver = self.id.resolver(db);
944 let environment = TraitEnvironment::lower(db, &resolver); 747 let environment = TraitEnvironment::lower(db, &resolver);
945 let ty = Ty::from_hir(db, &resolver, &impl_data.target_type); 748 let ty = Ty::from_hir(db, &resolver, &impl_data.target_type);
946 Type { krate: self.id.module(db).krate, ty: InEnvironment { value: ty, environment } } 749 Type {
750 krate: self.id.lookup(db).container.module(db).krate,
751 ty: InEnvironment { value: ty, environment },
752 }
947 } 753 }
948 754
949 pub fn items(&self, db: &impl DefDatabase) -> Vec<AssocItem> { 755 pub fn items(&self, db: &impl DefDatabase) -> Vec<AssocItem> {
@@ -955,11 +761,11 @@ impl ImplBlock {
955 } 761 }
956 762
957 pub fn module(&self, db: &impl DefDatabase) -> Module { 763 pub fn module(&self, db: &impl DefDatabase) -> Module {
958 self.id.module(db).into() 764 self.id.lookup(db).container.module(db).into()
959 } 765 }
960 766
961 pub fn krate(&self, db: &impl DefDatabase) -> Crate { 767 pub fn krate(&self, db: &impl DefDatabase) -> Crate {
962 Crate { crate_id: self.module(db).id.krate } 768 Crate { id: self.module(db).id.krate }
963 } 769 }
964} 770}
965 771
@@ -970,15 +776,19 @@ pub struct Type {
970} 776}
971 777
972impl Type { 778impl Type {
779 fn new(db: &impl HirDatabase, krate: CrateId, lexical_env: impl HasResolver, ty: Ty) -> Type {
780 let resolver = lexical_env.resolver(db);
781 let environment = TraitEnvironment::lower(db, &resolver);
782 Type { krate, ty: InEnvironment { value: ty, environment } }
783 }
784
973 fn from_def( 785 fn from_def(
974 db: &impl HirDatabase, 786 db: &impl HirDatabase,
975 krate: CrateId, 787 krate: CrateId,
976 def: impl HasResolver + Into<TyDefId>, 788 def: impl HasResolver + Into<TyDefId>,
977 ) -> Type { 789 ) -> Type {
978 let resolver = def.resolver(db);
979 let environment = TraitEnvironment::lower(db, &resolver);
980 let ty = db.ty(def.into()); 790 let ty = db.ty(def.into());
981 Type { krate, ty: InEnvironment { value: ty, environment } } 791 Type::new(db, krate, def, ty)
982 } 792 }
983 793
984 pub fn is_bool(&self) -> bool { 794 pub fn is_bool(&self) -> bool {
@@ -1028,7 +838,7 @@ impl Type {
1028 pub fn fields(&self, db: &impl HirDatabase) -> Vec<(StructField, Type)> { 838 pub fn fields(&self, db: &impl HirDatabase) -> Vec<(StructField, Type)> {
1029 if let Ty::Apply(a_ty) = &self.ty.value { 839 if let Ty::Apply(a_ty) = &self.ty.value {
1030 match a_ty.ctor { 840 match a_ty.ctor {
1031 ty::TypeCtor::Adt(AdtId::StructId(s)) => { 841 TypeCtor::Adt(AdtId::StructId(s)) => {
1032 let var_def = s.into(); 842 let var_def = s.into();
1033 return db 843 return db
1034 .field_types(var_def) 844 .field_types(var_def)
@@ -1050,7 +860,7 @@ impl Type {
1050 let mut res = Vec::new(); 860 let mut res = Vec::new();
1051 if let Ty::Apply(a_ty) = &self.ty.value { 861 if let Ty::Apply(a_ty) = &self.ty.value {
1052 match a_ty.ctor { 862 match a_ty.ctor {
1053 ty::TypeCtor::Tuple { .. } => { 863 TypeCtor::Tuple { .. } => {
1054 for ty in a_ty.parameters.iter() { 864 for ty in a_ty.parameters.iter() {
1055 let ty = ty.clone().subst(&a_ty.parameters); 865 let ty = ty.clone().subst(&a_ty.parameters);
1056 res.push(self.derived(ty)); 866 res.push(self.derived(ty));
@@ -1069,11 +879,16 @@ impl Type {
1069 ) -> Vec<(StructField, Type)> { 879 ) -> Vec<(StructField, Type)> {
1070 // FIXME: check that ty and def match 880 // FIXME: check that ty and def match
1071 match &self.ty.value { 881 match &self.ty.value {
1072 Ty::Apply(a_ty) => def 882 Ty::Apply(a_ty) => {
1073 .fields(db) 883 let field_types = db.field_types(def.into());
1074 .into_iter() 884 def.fields(db)
1075 .map(|it| (it, self.derived(it.ty(db).subst(&a_ty.parameters)))) 885 .into_iter()
1076 .collect(), 886 .map(|it| {
887 let ty = field_types[it.id].clone().subst(&a_ty.parameters);
888 (it, self.derived(ty))
889 })
890 .collect()
891 }
1077 _ => Vec::new(), 892 _ => Vec::new(),
1078 } 893 }
1079 } 894 }
@@ -1081,10 +896,10 @@ impl Type {
1081 pub fn autoderef<'a>(&'a self, db: &'a impl HirDatabase) -> impl Iterator<Item = Type> + 'a { 896 pub fn autoderef<'a>(&'a self, db: &'a impl HirDatabase) -> impl Iterator<Item = Type> + 'a {
1082 // There should be no inference vars in types passed here 897 // There should be no inference vars in types passed here
1083 // FIXME check that? 898 // FIXME check that?
1084 let canonical = crate::ty::Canonical { value: self.ty.value.clone(), num_vars: 0 }; 899 let canonical = Canonical { value: self.ty.value.clone(), num_vars: 0 };
1085 let environment = self.ty.environment.clone(); 900 let environment = self.ty.environment.clone();
1086 let ty = InEnvironment { value: canonical, environment: environment.clone() }; 901 let ty = InEnvironment { value: canonical, environment: environment.clone() };
1087 ty::autoderef(db, Some(self.krate), ty) 902 autoderef(db, Some(self.krate), ty)
1088 .map(|canonical| canonical.value) 903 .map(|canonical| canonical.value)
1089 .map(move |ty| self.derived(ty)) 904 .map(move |ty| self.derived(ty))
1090 } 905 }
@@ -1097,7 +912,7 @@ impl Type {
1097 krate: Crate, 912 krate: Crate,
1098 mut callback: impl FnMut(AssocItem) -> Option<T>, 913 mut callback: impl FnMut(AssocItem) -> Option<T>,
1099 ) -> Option<T> { 914 ) -> Option<T> {
1100 for krate in self.ty.value.def_crates(db, krate.crate_id)? { 915 for krate in self.ty.value.def_crates(db, krate.id)? {
1101 let impls = db.impls_in_crate(krate); 916 let impls = db.impls_in_crate(krate);
1102 917
1103 for impl_block in impls.lookup_impl_blocks(&self.ty.value) { 918 for impl_block in impls.lookup_impl_blocks(&self.ty.value) {
@@ -1111,11 +926,6 @@ impl Type {
1111 None 926 None
1112 } 927 }
1113 928
1114 // FIXME: remove
1115 pub fn into_ty(self) -> Ty {
1116 self.ty.value
1117 }
1118
1119 pub fn as_adt(&self) -> Option<Adt> { 929 pub fn as_adt(&self) -> Option<Adt> {
1120 let (adt, _subst) = self.ty.value.as_adt()?; 930 let (adt, _subst) = self.ty.value.as_adt()?;
1121 Some(adt.into()) 931 Some(adt.into())
@@ -1124,15 +934,14 @@ impl Type {
1124 // FIXME: provide required accessors such that it becomes implementable from outside. 934 // FIXME: provide required accessors such that it becomes implementable from outside.
1125 pub fn is_equal_for_find_impls(&self, other: &Type) -> bool { 935 pub fn is_equal_for_find_impls(&self, other: &Type) -> bool {
1126 match (&self.ty.value, &other.ty.value) { 936 match (&self.ty.value, &other.ty.value) {
1127 (Ty::Apply(a_original_ty), Ty::Apply(ty::ApplicationTy { ctor, parameters })) => { 937 (Ty::Apply(a_original_ty), Ty::Apply(ApplicationTy { ctor, parameters })) => match ctor
1128 match ctor { 938 {
1129 TypeCtor::Ref(..) => match parameters.as_single() { 939 TypeCtor::Ref(..) => match parameters.as_single() {
1130 Ty::Apply(a_ty) => a_original_ty.ctor == a_ty.ctor, 940 Ty::Apply(a_ty) => a_original_ty.ctor == a_ty.ctor,
1131 _ => false, 941 _ => false,
1132 }, 942 },
1133 _ => a_original_ty.ctor == *ctor, 943 _ => a_original_ty.ctor == *ctor,
1134 } 944 },
1135 }
1136 _ => false, 945 _ => false,
1137 } 946 }
1138 } 947 }
@@ -1155,7 +964,7 @@ impl HirDisplay for Type {
1155pub enum ScopeDef { 964pub enum ScopeDef {
1156 ModuleDef(ModuleDef), 965 ModuleDef(ModuleDef),
1157 MacroDef(MacroDef), 966 MacroDef(MacroDef),
1158 GenericParam(GenericParam), 967 GenericParam(TypeParam),
1159 ImplSelfType(ImplBlock), 968 ImplSelfType(ImplBlock),
1160 AdtSelfType(Adt), 969 AdtSelfType(Adt),
1161 Local(Local), 970 Local(Local),
diff --git a/crates/ra_hir/src/code_model/src.rs b/crates/ra_hir/src/code_model/src.rs
deleted file mode 100644
index bf3ee0834..000000000
--- a/crates/ra_hir/src/code_model/src.rs
+++ /dev/null
@@ -1,128 +0,0 @@
1//! FIXME: write short doc here
2
3use hir_def::{AstItemDef, HasChildSource, HasSource as _, Lookup, VariantId};
4use hir_expand::either::Either;
5use ra_syntax::ast;
6
7use crate::{
8 db::DefDatabase, Const, Enum, EnumVariant, FieldSource, Function, ImplBlock, Import, MacroDef,
9 Module, ModuleSource, Static, Struct, StructField, Trait, TypeAlias, Union,
10};
11
12pub use hir_expand::Source;
13
14pub trait HasSource {
15 type Ast;
16 fn source(self, db: &impl DefDatabase) -> Source<Self::Ast>;
17}
18
19/// NB: Module is !HasSource, because it has two source nodes at the same time:
20/// definition and declaration.
21impl Module {
22 /// Returns a node which defines this module. That is, a file or a `mod foo {}` with items.
23 pub fn definition_source(self, db: &impl DefDatabase) -> Source<ModuleSource> {
24 let def_map = db.crate_def_map(self.id.krate);
25 let src = def_map[self.id.local_id].definition_source(db);
26 src.map(|it| match it {
27 Either::A(it) => ModuleSource::SourceFile(it),
28 Either::B(it) => ModuleSource::Module(it),
29 })
30 }
31
32 /// Returns a node which declares this module, either a `mod foo;` or a `mod foo {}`.
33 /// `None` for the crate root.
34 pub fn declaration_source(self, db: &impl DefDatabase) -> Option<Source<ast::Module>> {
35 let def_map = db.crate_def_map(self.id.krate);
36 def_map[self.id.local_id].declaration_source(db)
37 }
38}
39
40impl HasSource for StructField {
41 type Ast = FieldSource;
42 fn source(self, db: &impl DefDatabase) -> Source<FieldSource> {
43 let var = VariantId::from(self.parent);
44 let src = var.child_source(db);
45 src.map(|it| match it[self.id].clone() {
46 Either::A(it) => FieldSource::Pos(it),
47 Either::B(it) => FieldSource::Named(it),
48 })
49 }
50}
51impl HasSource for Struct {
52 type Ast = ast::StructDef;
53 fn source(self, db: &impl DefDatabase) -> Source<ast::StructDef> {
54 self.id.source(db)
55 }
56}
57impl HasSource for Union {
58 type Ast = ast::UnionDef;
59 fn source(self, db: &impl DefDatabase) -> Source<ast::UnionDef> {
60 self.id.source(db)
61 }
62}
63impl HasSource for Enum {
64 type Ast = ast::EnumDef;
65 fn source(self, db: &impl DefDatabase) -> Source<ast::EnumDef> {
66 self.id.source(db)
67 }
68}
69impl HasSource for EnumVariant {
70 type Ast = ast::EnumVariant;
71 fn source(self, db: &impl DefDatabase) -> Source<ast::EnumVariant> {
72 self.parent.id.child_source(db).map(|map| map[self.id].clone())
73 }
74}
75impl HasSource for Function {
76 type Ast = ast::FnDef;
77 fn source(self, db: &impl DefDatabase) -> Source<ast::FnDef> {
78 self.id.lookup(db).source(db)
79 }
80}
81impl HasSource for Const {
82 type Ast = ast::ConstDef;
83 fn source(self, db: &impl DefDatabase) -> Source<ast::ConstDef> {
84 self.id.lookup(db).source(db)
85 }
86}
87impl HasSource for Static {
88 type Ast = ast::StaticDef;
89 fn source(self, db: &impl DefDatabase) -> Source<ast::StaticDef> {
90 self.id.lookup(db).source(db)
91 }
92}
93impl HasSource for Trait {
94 type Ast = ast::TraitDef;
95 fn source(self, db: &impl DefDatabase) -> Source<ast::TraitDef> {
96 self.id.source(db)
97 }
98}
99impl HasSource for TypeAlias {
100 type Ast = ast::TypeAliasDef;
101 fn source(self, db: &impl DefDatabase) -> Source<ast::TypeAliasDef> {
102 self.id.lookup(db).source(db)
103 }
104}
105impl HasSource for MacroDef {
106 type Ast = ast::MacroCall;
107 fn source(self, db: &impl DefDatabase) -> Source<ast::MacroCall> {
108 Source { file_id: self.id.ast_id.file_id(), value: self.id.ast_id.to_node(db) }
109 }
110}
111impl HasSource for ImplBlock {
112 type Ast = ast::ImplBlock;
113 fn source(self, db: &impl DefDatabase) -> Source<ast::ImplBlock> {
114 self.id.source(db)
115 }
116}
117impl HasSource for Import {
118 type Ast = Either<ast::UseTree, ast::ExternCrateItem>;
119
120 /// Returns the syntax of the last path segment corresponding to this import
121 fn source(self, db: &impl DefDatabase) -> Source<Self::Ast> {
122 let src = self.parent.definition_source(db);
123 let (_, source_map) = db.raw_items_with_source_map(src.file_id);
124 let root = db.parse_or_expand(src.file_id).unwrap();
125 let ptr = source_map.get(self.id);
126 src.with_value(ptr.map(|it| it.to_node(&root), |it| it.to_node(&root)))
127 }
128}
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs
index bfae3660b..f5ffd64fa 100644
--- a/crates/ra_hir/src/db.rs
+++ b/crates/ra_hir/src/db.rs
@@ -4,8 +4,8 @@ pub use hir_def::db::{
4 BodyQuery, BodyWithSourceMapQuery, ConstDataQuery, CrateDefMapQuery, CrateLangItemsQuery, 4 BodyQuery, BodyWithSourceMapQuery, ConstDataQuery, CrateDefMapQuery, CrateLangItemsQuery,
5 DefDatabase, DefDatabaseStorage, DocumentationQuery, EnumDataQuery, ExprScopesQuery, 5 DefDatabase, DefDatabaseStorage, DocumentationQuery, EnumDataQuery, ExprScopesQuery,
6 FunctionDataQuery, GenericParamsQuery, ImplDataQuery, InternDatabase, InternDatabaseStorage, 6 FunctionDataQuery, GenericParamsQuery, ImplDataQuery, InternDatabase, InternDatabaseStorage,