aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock326
-rw-r--r--README.md2
-rw-r--r--crates/ra_assists/src/assists/add_explicit_type.rs13
-rw-r--r--crates/ra_assists/src/assists/add_new.rs4
-rw-r--r--crates/ra_assists/src/assists/fill_match_arms.rs7
-rw-r--r--crates/ra_assists/src/test_db.rs3
-rw-r--r--crates/ra_batch/Cargo.toml2
-rw-r--r--crates/ra_batch/src/lib.rs2
-rw-r--r--crates/ra_cli/Cargo.toml3
-rw-r--r--crates/ra_cli/src/analysis_bench.rs6
-rw-r--r--crates/ra_cli/src/analysis_stats.rs14
-rw-r--r--crates/ra_cli/src/main.rs3
-rw-r--r--crates/ra_cli/src/progress_report.rs120
-rw-r--r--crates/ra_db/Cargo.toml2
-rw-r--r--crates/ra_db/src/lib.rs2
-rw-r--r--crates/ra_hir/Cargo.toml19
-rw-r--r--crates/ra_hir/src/code_model.rs449
-rw-r--r--crates/ra_hir/src/code_model/src.rs12
-rw-r--r--crates/ra_hir/src/db.rs132
-rw-r--r--crates/ra_hir/src/diagnostics.rs86
-rw-r--r--crates/ra_hir/src/from_id.rs104
-rw-r--r--crates/ra_hir/src/from_source.rs26
-rw-r--r--crates/ra_hir/src/lib.rs11
-rw-r--r--crates/ra_hir/src/source_binder.rs113
-rw-r--r--crates/ra_hir/src/ty.rs1092
-rw-r--r--crates/ra_hir/src/util.rs12
-rw-r--r--crates/ra_hir_def/src/adt.rs43
-rw-r--r--crates/ra_hir_def/src/attr.rs6
-rw-r--r--crates/ra_hir_def/src/body.rs7
-rw-r--r--crates/ra_hir_def/src/data.rs60
-rw-r--r--crates/ra_hir_def/src/db.rs12
-rw-r--r--crates/ra_hir_def/src/docs.rs6
-rw-r--r--crates/ra_hir_def/src/generics.rs6
-rw-r--r--crates/ra_hir_def/src/lang_item.rs4
-rw-r--r--crates/ra_hir_def/src/lib.rs57
-rw-r--r--crates/ra_hir_def/src/nameres/collector.rs36
-rw-r--r--crates/ra_hir_def/src/nameres/path_resolution.rs16
-rw-r--r--crates/ra_hir_def/src/nameres/raw.rs13
-rw-r--r--crates/ra_hir_def/src/nameres/tests.rs7
-rw-r--r--crates/ra_hir_def/src/path.rs2
-rw-r--r--crates/ra_hir_def/src/resolver.rs12
-rw-r--r--crates/ra_hir_def/src/test_db.rs4
-rw-r--r--crates/ra_hir_expand/src/lib.rs14
-rw-r--r--crates/ra_hir_expand/src/test_db.rs4
-rw-r--r--crates/ra_hir_ty/Cargo.toml32
-rw-r--r--crates/ra_hir_ty/src/autoderef.rs (renamed from crates/ra_hir/src/ty/autoderef.rs)55
-rw-r--r--crates/ra_hir_ty/src/db.rs119
-rw-r--r--crates/ra_hir_ty/src/diagnostics.rs91
-rw-r--r--crates/ra_hir_ty/src/display.rs (renamed from crates/ra_hir/src/ty/display.rs)0
-rw-r--r--crates/ra_hir_ty/src/expr.rs (renamed from crates/ra_hir/src/expr.rs)43
-rw-r--r--crates/ra_hir_ty/src/infer.rs (renamed from crates/ra_hir/src/ty/infer.rs)161
-rw-r--r--crates/ra_hir_ty/src/infer/coerce.rs (renamed from crates/ra_hir/src/ty/infer/coerce.rs)37
-rw-r--r--crates/ra_hir_ty/src/infer/expr.rs (renamed from crates/ra_hir/src/ty/infer/expr.rs)117
-rw-r--r--crates/ra_hir_ty/src/infer/pat.rs (renamed from crates/ra_hir/src/ty/infer/pat.rs)31
-rw-r--r--crates/ra_hir_ty/src/infer/path.rs (renamed from crates/ra_hir/src/ty/infer/path.rs)98
-rw-r--r--crates/ra_hir_ty/src/infer/unify.rs (renamed from crates/ra_hir/src/ty/infer/unify.rs)8
-rw-r--r--crates/ra_hir_ty/src/lib.rs1138
-rw-r--r--crates/ra_hir_ty/src/lower.rs (renamed from crates/ra_hir/src/ty/lower.rs)444
-rw-r--r--crates/ra_hir_ty/src/marks.rs (renamed from crates/ra_hir/src/marks.rs)0
-rw-r--r--crates/ra_hir_ty/src/method_resolution.rs (renamed from crates/ra_hir/src/ty/method_resolution.rs)246
-rw-r--r--crates/ra_hir_ty/src/op.rs (renamed from crates/ra_hir/src/ty/op.rs)6
-rw-r--r--crates/ra_hir_ty/src/primitive.rs (renamed from crates/ra_hir/src/ty/primitive.rs)41
-rw-r--r--crates/ra_hir_ty/src/test_db.rs (renamed from crates/ra_hir/src/test_db.rs)85
-rw-r--r--crates/ra_hir_ty/src/tests.rs (renamed from crates/ra_hir/src/ty/tests.rs)113
-rw-r--r--crates/ra_hir_ty/src/tests/coercion.rs (renamed from crates/ra_hir/src/ty/tests/coercion.rs)0
-rw-r--r--crates/ra_hir_ty/src/tests/never_type.rs (renamed from crates/ra_hir/src/ty/tests/never_type.rs)0
-rw-r--r--crates/ra_hir_ty/src/traits.rs (renamed from crates/ra_hir/src/ty/traits.rs)30
-rw-r--r--crates/ra_hir_ty/src/traits/chalk.rs (renamed from crates/ra_hir/src/ty/traits/chalk.rs)202
-rw-r--r--crates/ra_hir_ty/src/utils.rs84
-rw-r--r--crates/ra_ide/Cargo.toml (renamed from crates/ra_ide_api/Cargo.toml)4
-rw-r--r--crates/ra_ide/src/assists.rs (renamed from crates/ra_ide_api/src/assists.rs)0
-rw-r--r--crates/ra_ide/src/call_info.rs (renamed from crates/ra_ide_api/src/call_info.rs)24
-rw-r--r--crates/ra_ide/src/change.rs (renamed from crates/ra_ide_api/src/change.rs)5
-rw-r--r--crates/ra_ide/src/completion.rs (renamed from crates/ra_ide_api/src/completion.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_dot.rs (renamed from crates/ra_ide_api/src/completion/complete_dot.rs)36
-rw-r--r--crates/ra_ide/src/completion/complete_fn_param.rs (renamed from crates/ra_ide_api/src/completion/complete_fn_param.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_keyword.rs (renamed from crates/ra_ide_api/src/completion/complete_keyword.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_macro_in_item_position.rs (renamed from crates/ra_ide_api/src/completion/complete_macro_in_item_position.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_path.rs (renamed from crates/ra_ide_api/src/completion/complete_path.rs)2
-rw-r--r--crates/ra_ide/src/completion/complete_pattern.rs (renamed from crates/ra_ide_api/src/completion/complete_pattern.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_postfix.rs (renamed from crates/ra_ide_api/src/completion/complete_postfix.rs)16
-rw-r--r--crates/ra_ide/src/completion/complete_record_literal.rs (renamed from crates/ra_ide_api/src/completion/complete_record_literal.rs)7
-rw-r--r--crates/ra_ide/src/completion/complete_record_pattern.rs (renamed from crates/ra_ide_api/src/completion/complete_record_pattern.rs)7
-rw-r--r--crates/ra_ide/src/completion/complete_scope.rs (renamed from crates/ra_ide_api/src/completion/complete_scope.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_snippet.rs (renamed from crates/ra_ide_api/src/completion/complete_snippet.rs)0
-rw-r--r--crates/ra_ide/src/completion/completion_context.rs (renamed from crates/ra_ide_api/src/completion/completion_context.rs)0
-rw-r--r--crates/ra_ide/src/completion/completion_item.rs (renamed from crates/ra_ide_api/src/completion/completion_item.rs)0
-rw-r--r--crates/ra_ide/src/completion/presentation.rs (renamed from crates/ra_ide_api/src/completion/presentation.rs)44
-rw-r--r--crates/ra_ide/src/db.rs (renamed from crates/ra_ide_api/src/db.rs)3
-rw-r--r--crates/ra_ide/src/diagnostics.rs (renamed from crates/ra_ide_api/src/diagnostics.rs)0
-rw-r--r--crates/ra_ide/src/display.rs (renamed from crates/ra_ide_api/src/display.rs)0
-rw-r--r--crates/ra_ide/src/display/function_signature.rs (renamed from crates/ra_ide_api/src/display/function_signature.rs)7
-rw-r--r--crates/ra_ide/src/display/navigation_target.rs (renamed from crates/ra_ide_api/src/display/navigation_target.rs)0
-rw-r--r--crates/ra_ide/src/display/short_label.rs (renamed from crates/ra_ide_api/src/display/short_label.rs)6
-rw-r--r--crates/ra_ide/src/display/structure.rs (renamed from crates/ra_ide_api/src/display/structure.rs)0
-rw-r--r--crates/ra_ide/src/expand.rs (renamed from crates/ra_ide_api/src/expand.rs)0
-rw-r--r--crates/ra_ide/src/expand_macro.rs (renamed from crates/ra_ide_api/src/expand_macro.rs)23
-rw-r--r--crates/ra_ide/src/extend_selection.rs (renamed from crates/ra_ide_api/src/extend_selection.rs)0
-rw-r--r--crates/ra_ide/src/feature_flags.rs (renamed from crates/ra_ide_api/src/feature_flags.rs)0
-rw-r--r--crates/ra_ide/src/folding_ranges.rs (renamed from crates/ra_ide_api/src/folding_ranges.rs)0
-rw-r--r--crates/ra_ide/src/goto_definition.rs (renamed from crates/ra_ide_api/src/goto_definition.rs)23
-rw-r--r--crates/ra_ide/src/goto_type_definition.rs (renamed from crates/ra_ide_api/src/goto_type_definition.rs)4
-rw-r--r--crates/ra_ide/src/hover.rs (renamed from crates/ra_ide_api/src/hover.rs)95
-rw-r--r--crates/ra_ide/src/impls.rs (renamed from crates/ra_ide_api/src/impls.rs)29
-rw-r--r--crates/ra_ide/src/inlay_hints.rs (renamed from crates/ra_ide_api/src/inlay_hints.rs)23
-rw-r--r--crates/ra_ide/src/join_lines.rs (renamed from crates/ra_ide_api/src/join_lines.rs)0
-rw-r--r--crates/ra_ide/src/lib.rs (renamed from crates/ra_ide_api/src/lib.rs)2
-rw-r--r--crates/ra_ide/src/line_index.rs (renamed from crates/ra_ide_api/src/line_index.rs)0
-rw-r--r--crates/ra_ide/src/line_index_utils.rs (renamed from crates/ra_ide_api/src/line_index_utils.rs)0
-rw-r--r--crates/ra_ide/src/marks.rs (renamed from crates/ra_ide_api/src/marks.rs)0
-rw-r--r--crates/ra_ide/src/matching_brace.rs (renamed from crates/ra_ide_api/src/matching_brace.rs)0
-rw-r--r--crates/ra_ide/src/mock_analysis.rs (renamed from crates/ra_ide_api/src/mock_analysis.rs)0
-rw-r--r--crates/ra_ide/src/parent_module.rs (renamed from crates/ra_ide_api/src/parent_module.rs)0
-rw-r--r--crates/ra_ide/src/references.rs (renamed from crates/ra_ide_api/src/references.rs)5
-rw-r--r--crates/ra_ide/src/references/classify.rs (renamed from crates/ra_ide_api/src/references/classify.rs)5
-rw-r--r--crates/ra_ide/src/references/name_definition.rs (renamed from crates/ra_ide_api/src/references/name_definition.rs)7
-rw-r--r--crates/ra_ide/src/references/rename.rs (renamed from crates/ra_ide_api/src/references/rename.rs)0
-rw-r--r--crates/ra_ide/src/references/search_scope.rs (renamed from crates/ra_ide_api/src/references/search_scope.rs)0
-rw-r--r--crates/ra_ide/src/runnables.rs (renamed from crates/ra_ide_api/src/runnables.rs)0
-rw-r--r--crates/ra_ide/src/snapshots/highlighting.html (renamed from crates/ra_ide_api/src/snapshots/highlighting.html)0
-rw-r--r--crates/ra_ide/src/snapshots/rainbow_highlighting.html (renamed from crates/ra_ide_api/src/snapshots/rainbow_highlighting.html)0
-rw-r--r--crates/ra_ide/src/source_change.rs (renamed from crates/ra_ide_api/src/source_change.rs)0
-rw-r--r--crates/ra_ide/src/status.rs (renamed from crates/ra_ide_api/src/status.rs)0
-rw-r--r--crates/ra_ide/src/symbol_index.rs (renamed from crates/ra_ide_api/src/symbol_index.rs)0
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs (renamed from crates/ra_ide_api/src/syntax_highlighting.rs)14
-rw-r--r--crates/ra_ide/src/syntax_tree.rs (renamed from crates/ra_ide_api/src/syntax_tree.rs)0
-rw-r--r--crates/ra_ide/src/test_utils.rs (renamed from crates/ra_ide_api/src/test_utils.rs)0
-rw-r--r--crates/ra_ide/src/typing.rs (renamed from crates/ra_ide_api/src/typing.rs)0
-rw-r--r--crates/ra_ide/src/wasm_shims.rs (renamed from crates/ra_ide_api/src/wasm_shims.rs)0
-rw-r--r--crates/ra_lsp_server/Cargo.toml4
-rw-r--r--crates/ra_lsp_server/src/cargo_target_spec.rs2
-rw-r--r--crates/ra_lsp_server/src/conv.rs6
-rw-r--r--crates/ra_lsp_server/src/lib.rs2
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs2
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs6
-rw-r--r--crates/ra_lsp_server/src/main_loop/subscriptions.rs2
-rw-r--r--crates/ra_lsp_server/src/world.rs2
-rw-r--r--crates/ra_parser/src/grammar/items.rs10
-rw-r--r--crates/ra_parser/src/grammar/items/adt.rs (renamed from crates/ra_parser/src/grammar/items/nominal.rs)23
-rw-r--r--crates/ra_parser/src/syntax_kind/generated.rs1
-rw-r--r--crates/ra_syntax/src/ast/extensions.rs11
-rw-r--r--crates/ra_syntax/src/ast/generated.rs54
-rw-r--r--crates/ra_syntax/src/grammar.ron17
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.txt4
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.txt2
-rw-r--r--docs/dev/README.md2
-rw-r--r--docs/dev/architecture.md12
-rw-r--r--docs/dev/guide.md24
-rw-r--r--[-rwxr-xr-x]editors/code/src/utils/terminateProcess.sh0
-rw-r--r--xtask/tests/tidy-tests/docs.rs3
150 files changed, 3558 insertions, 3077 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 8f7783deb..2557b5e59 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -10,7 +10,7 @@ dependencies = [
10 10
11[[package]] 11[[package]]
12name = "anyhow" 12name = "anyhow"
13version = "1.0.22" 13version = "1.0.24"
14source = "registry+https://github.com/rust-lang/crates.io-index" 14source = "registry+https://github.com/rust-lang/crates.io-index"
15 15
16[[package]] 16[[package]]
@@ -105,9 +105,9 @@ version = "0.9.0"
105source = "registry+https://github.com/rust-lang/crates.io-index" 105source = "registry+https://github.com/rust-lang/crates.io-index"
106dependencies = [ 106dependencies = [
107 "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 107 "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
108 "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 108 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
109 "serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 109 "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
110 "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", 110 "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
111] 111]
112 112
113[[package]] 113[[package]]
@@ -123,7 +123,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
123[[package]] 123[[package]]
124name = "chalk-derive" 124name = "chalk-derive"
125version = "0.1.0" 125version = "0.1.0"
126source = "git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478#a88cad7f0a69e05ba8f40b74c58a1c229c1b2478" 126source = "git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30#095cd38a4f16337913bba487f2055b9ca0179f30"
127dependencies = [ 127dependencies = [
128 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 128 "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)", 129 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -133,9 +133,9 @@ dependencies = [
133[[package]] 133[[package]]
134name = "chalk-engine" 134name = "chalk-engine"
135version = "0.9.0" 135version = "0.9.0"
136source = "git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478#a88cad7f0a69e05ba8f40b74c58a1c229c1b2478" 136source = "git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30#095cd38a4f16337913bba487f2055b9ca0179f30"
137dependencies = [ 137dependencies = [
138 "chalk-macros 0.1.1 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)", 138 "chalk-macros 0.1.1 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
139 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 139 "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)", 140 "stacker 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
141] 141]
@@ -143,18 +143,18 @@ dependencies = [
143[[package]] 143[[package]]
144name = "chalk-ir" 144name = "chalk-ir"
145version = "0.1.0" 145version = "0.1.0"
146source = "git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478#a88cad7f0a69e05ba8f40b74c58a1c229c1b2478" 146source = "git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30#095cd38a4f16337913bba487f2055b9ca0179f30"
147dependencies = [ 147dependencies = [
148 "chalk-derive 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)", 148 "chalk-derive 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
149 "chalk-engine 0.9.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)", 149 "chalk-engine 0.9.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
150 "chalk-macros 0.1.1 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)", 150 "chalk-macros 0.1.1 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
151 "lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", 151 "lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
152] 152]
153 153
154[[package]] 154[[package]]
155name = "chalk-macros" 155name = "chalk-macros"
156version = "0.1.1" 156version = "0.1.1"
157source = "git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478#a88cad7f0a69e05ba8f40b74c58a1c229c1b2478" 157source = "git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30#095cd38a4f16337913bba487f2055b9ca0179f30"
158dependencies = [ 158dependencies = [
159 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 159 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
160] 160]
@@ -162,38 +162,37 @@ dependencies = [
162[[package]] 162[[package]]
163name = "chalk-rust-ir" 163name = "chalk-rust-ir"
164version = "0.1.0" 164version = "0.1.0"
165source = "git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478#a88cad7f0a69e05ba8f40b74c58a1c229c1b2478" 165source = "git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30#095cd38a4f16337913bba487f2055b9ca0179f30"
166dependencies = [ 166dependencies = [
167 "chalk-derive 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)", 167 "chalk-derive 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
168 "chalk-engine 0.9.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)", 168 "chalk-engine 0.9.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
169 "chalk-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)", 169 "chalk-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
170 "chalk-macros 0.1.1 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)", 170 "chalk-macros 0.1.1 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
171] 171]
172 172
173[[package]] 173[[package]]
174name = "chalk-solve" 174name = "chalk-solve"
175version = "0.1.0" 175version = "0.1.0"
176source = "git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478#a88cad7f0a69e05ba8f40b74c58a1c229c1b2478" 176source = "git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30#095cd38a4f16337913bba487f2055b9ca0179f30"
177dependencies = [ 177dependencies = [
178 "chalk-derive 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)", 178 "chalk-derive 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
179 "chalk-engine 0.9.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)", 179 "chalk-engine 0.9.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
180 "chalk-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)", 180 "chalk-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
181 "chalk-macros 0.1.1 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)", 181 "chalk-macros 0.1.1 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
182 "chalk-rust-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)", 182 "chalk-rust-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
183 "ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", 183 "ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
184 "itertools 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 184 "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)", 185 "petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)",
186 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 186 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
187] 187]
188 188
189[[package]] 189[[package]]
190name = "chrono" 190name = "chrono"
191version = "0.4.9" 191version = "0.4.10"
192source = "registry+https://github.com/rust-lang/crates.io-index" 192source = "registry+https://github.com/rust-lang/crates.io-index"
193dependencies = [ 193dependencies = [
194 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
195 "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", 194 "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
196 "num-traits 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 195 "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
197 "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 196 "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
198] 197]
199 198
@@ -227,7 +226,6 @@ dependencies = [
227 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 226 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
228 "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 227 "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
229 "termios 0.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)",
230 "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
231 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 229 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
232] 230]
233 231
@@ -293,16 +291,6 @@ dependencies = [
293] 291]
294 292
295[[package]] 293[[package]]
296name = "derive-new"
297version = "0.5.8"
298source = "registry+https://github.com/rust-lang/crates.io-index"
299dependencies = [
300 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
301 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
302 "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
303]
304
305[[package]]
306name = "difference" 294name = "difference"
307version = "2.0.0" 295version = "2.0.0"
308source = "registry+https://github.com/rust-lang/crates.io-index" 296source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -356,7 +344,7 @@ name = "flexi_logger"
356version = "0.14.5" 344version = "0.14.5"
357source = "registry+https://github.com/rust-lang/crates.io-index" 345source = "registry+https://github.com/rust-lang/crates.io-index"
358dependencies = [ 346dependencies = [
359 "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", 347 "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
360 "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 348 "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
361 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 349 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
362 "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 350 "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -472,7 +460,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
472dependencies = [ 460dependencies = [
473 "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 461 "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
474 "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 462 "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
475 "unicode-normalization 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 463 "unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
476] 464]
477 465
478[[package]] 466[[package]]
@@ -484,17 +472,6 @@ dependencies = [
484] 472]
485 473
486[[package]] 474[[package]]
487name = "indicatif"
488version = "0.13.0"
489source = "registry+https://github.com/rust-lang/crates.io-index"
490dependencies = [
491 "console 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
492 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
493 "number_prefix 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
494 "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
495]
496
497[[package]]
498name = "inotify" 475name = "inotify"
499version = "0.6.1" 476version = "0.6.1"
500source = "registry+https://github.com/rust-lang/crates.io-index" 477source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -520,8 +497,8 @@ dependencies = [
520 "console 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 497 "console 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
521 "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 498 "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
522 "lazy_static 1.4.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)",
523 "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 500 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
524 "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", 501 "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
525 "serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)", 502 "serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)",
526 "uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 503 "uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
527] 504]
@@ -536,7 +513,7 @@ dependencies = [
536 513
537[[package]] 514[[package]]
538name = "itertools" 515name = "itertools"
539version = "0.8.1" 516version = "0.8.2"
540source = "registry+https://github.com/rust-lang/crates.io-index" 517source = "registry+https://github.com/rust-lang/crates.io-index"
541dependencies = [ 518dependencies = [
542 "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", 519 "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -622,7 +599,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
622 599
623[[package]] 600[[package]]
624name = "lock_api" 601name = "lock_api"
625version = "0.3.1" 602version = "0.3.2"
626source = "registry+https://github.com/rust-lang/crates.io-index" 603source = "registry+https://github.com/rust-lang/crates.io-index"
627dependencies = [ 604dependencies = [
628 "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 605 "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -643,8 +620,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
643dependencies = [ 620dependencies = [
644 "crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 621 "crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
645 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 622 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
646 "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 623 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
647 "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", 624 "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
648] 625]
649 626
650[[package]] 627[[package]]
@@ -653,8 +630,8 @@ version = "0.61.0"
653source = "registry+https://github.com/rust-lang/crates.io-index" 630source = "registry+https://github.com/rust-lang/crates.io-index"
654dependencies = [ 631dependencies = [
655 "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 632 "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
656 "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 633 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
657 "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", 634 "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
658 "serde_repr 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 635 "serde_repr 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
659 "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 636 "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
660] 637]
@@ -665,11 +642,6 @@ version = "0.1.8"
665source = "registry+https://github.com/rust-lang/crates.io-index" 642source = "registry+https://github.com/rust-lang/crates.io-index"
666 643
667[[package]] 644[[package]]
668name = "maybe-uninit"
669version = "2.0.0"
670source = "registry+https://github.com/rust-lang/crates.io-index"
671
672[[package]]
673name = "memchr" 645name = "memchr"
674version = "2.2.1" 646version = "2.2.1"
675source = "registry+https://github.com/rust-lang/crates.io-index" 647source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -684,9 +656,10 @@ dependencies = [
684 656
685[[package]] 657[[package]]
686name = "mio" 658name = "mio"
687version = "0.6.19" 659version = "0.6.21"
688source = "registry+https://github.com/rust-lang/crates.io-index" 660source = "registry+https://github.com/rust-lang/crates.io-index"
689dependencies = [ 661dependencies = [
662 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
690 "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 663 "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
691 "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 664 "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
692 "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 665 "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -706,7 +679,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
706dependencies = [ 679dependencies = [
707 "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 680 "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
708 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 681 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
709 "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", 682 "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)",
710 "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 683 "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
711] 684]
712 685
@@ -743,7 +716,7 @@ dependencies = [
743 "inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", 716 "inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
744 "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 717 "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
745 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 718 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
746 "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", 719 "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)",
747 "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 720 "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
748 "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 721 "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
749 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 722 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -755,12 +728,12 @@ version = "0.1.41"
755source = "registry+https://github.com/rust-lang/crates.io-index" 728source = "registry+https://github.com/rust-lang/crates.io-index"
756dependencies = [ 729dependencies = [
757 "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 730 "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
758 "num-traits 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 731 "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
759] 732]
760 733
761[[package]] 734[[package]]
762name = "num-traits" 735name = "num-traits"
763version = "0.2.9" 736version = "0.2.10"
764source = "registry+https://github.com/rust-lang/crates.io-index" 737source = "registry+https://github.com/rust-lang/crates.io-index"
765dependencies = [ 738dependencies = [
766 "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 739 "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -776,11 +749,6 @@ dependencies = [
776] 749]
777 750
778[[package]] 751[[package]]
779name = "number_prefix"
780version = "0.3.0"
781source = "registry+https://github.com/rust-lang/crates.io-index"
782
783[[package]]
784name = "once_cell" 752name = "once_cell"
785version = "1.2.0" 753version = "1.2.0"
786source = "registry+https://github.com/rust-lang/crates.io-index" 754source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -792,25 +760,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
792 760
793[[package]] 761[[package]]
794name = "parking_lot" 762name = "parking_lot"
795version = "0.9.0" 763version = "0.10.0"
796source = "registry+https://github.com/rust-lang/crates.io-index" 764source = "registry+https://github.com/rust-lang/crates.io-index"
797dependencies = [ 765dependencies = [
798 "lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 766 "lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
799 "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 767 "parking_lot_core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
800 "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
801] 768]
802 769
803[[package]] 770[[package]]
804name = "parking_lot_core" 771name = "parking_lot_core"
805version = "0.6.2" 772version = "0.7.0"
806source = "registry+https://github.com/rust-lang/crates.io-index" 773source = "registry+https://github.com/rust-lang/crates.io-index"
807dependencies = [ 774dependencies = [
808 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 775 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
809 "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 776 "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
810 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 777 "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
811 "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", 778 "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
812 "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 779 "smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
813 "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
814 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 780 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
815] 781]
816 782
@@ -885,7 +851,7 @@ dependencies = [
885 "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 851 "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
886 "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 852 "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
887 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 853 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
888 "num-traits 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 854 "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
889 "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 855 "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
890 "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 856 "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
891 "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 857 "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -923,7 +889,7 @@ name = "ra_assists"
923version = "0.1.0" 889version = "0.1.0"
924dependencies = [ 890dependencies = [
925 "format-buf 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 891 "format-buf 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
926 "itertools 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 892 "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
927 "join_to_string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 893 "join_to_string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
928 "ra_db 0.1.0", 894 "ra_db 0.1.0",
929 "ra_fmt 0.1.0", 895 "ra_fmt 0.1.0",
@@ -941,9 +907,9 @@ dependencies = [
941 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 907 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
942 "ra_db 0.1.0", 908 "ra_db 0.1.0",
943 "ra_hir 0.1.0", 909 "ra_hir 0.1.0",
944 "ra_ide_api 0.1.0", 910 "ra_ide 0.1.0",
945 "ra_project_model 0.1.0", 911 "ra_project_model 0.1.0",
946 "ra_vfs 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 912 "ra_vfs 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
947 "ra_vfs_glob 0.1.0", 913 "ra_vfs_glob 0.1.0",
948 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 914 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
949] 915]
@@ -963,12 +929,11 @@ name = "ra_cli"
963version = "0.1.0" 929version = "0.1.0"
964dependencies = [ 930dependencies = [
965 "flexi_logger 0.14.5 (registry+https://github.com/rust-lang/crates.io-index)", 931 "flexi_logger 0.14.5 (registry+https://github.com/rust-lang/crates.io-index)",
966 "indicatif 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
967 "pico-args 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 932 "pico-args 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
968 "ra_batch 0.1.0", 933 "ra_batch 0.1.0",
969 "ra_db 0.1.0", 934 "ra_db 0.1.0",
970 "ra_hir 0.1.0", 935 "ra_hir 0.1.0",
971 "ra_ide_api 0.1.0", 936 "ra_ide 0.1.0",
972 "ra_prof 0.1.0", 937 "ra_prof 0.1.0",
973 "ra_syntax 0.1.0", 938 "ra_syntax 0.1.0",
974] 939]
@@ -982,7 +947,7 @@ dependencies = [
982 "ra_syntax 0.1.0", 947 "ra_syntax 0.1.0",
983 "relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 948 "relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
984 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 949 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
985 "salsa 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", 950 "salsa 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)",
986 "test_utils 0.1.0", 951 "test_utils 0.1.0",
987] 952]
988 953
@@ -990,7 +955,7 @@ dependencies = [
990name = "ra_fmt" 955name = "ra_fmt"
991version = "0.1.0" 956version = "0.1.0"
992dependencies = [ 957dependencies = [
993 "itertools 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 958 "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
994 "ra_syntax 0.1.0", 959 "ra_syntax 0.1.0",
995] 960]
996 961
@@ -998,27 +963,13 @@ dependencies = [
998name = "ra_hir" 963name = "ra_hir"
999version = "0.1.0" 964version = "0.1.0"
1000dependencies = [ 965dependencies = [
1001 "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
1002 "chalk-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)",
1003 "chalk-rust-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)",
1004 "chalk-solve 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)",
1005 "ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
1006 "insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
1007 "lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
1008 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 966 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
1009 "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
1010 "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
1011 "ra_arena 0.1.0",
1012 "ra_cfg 0.1.0",
1013 "ra_db 0.1.0", 967 "ra_db 0.1.0",
1014 "ra_hir_def 0.1.0", 968 "ra_hir_def 0.1.0",
1015 "ra_hir_expand 0.1.0", 969 "ra_hir_expand 0.1.0",
1016 "ra_mbe 0.1.0", 970 "ra_hir_ty 0.1.0",
1017 "ra_prof 0.1.0",
1018 "ra_syntax 0.1.0", 971 "ra_syntax 0.1.0",
1019 "ra_tt 0.1.0",
1020 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 972 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1021 "test_utils 0.1.0",
1022] 973]
1023 974
1024[[package]] 975[[package]]
@@ -1055,13 +1006,35 @@ dependencies = [
1055] 1006]
1056 1007
1057[[package]] 1008[[package]]
1058name = "ra_ide_api" 1009name = "ra_hir_ty"
1010version = "0.1.0"
1011dependencies = [
1012 "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)",
1014 "chalk-rust-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
1015 "chalk-solve 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)",
1016 "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)",
1018 "lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
1019 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
1020 "ra_arena 0.1.0",
1021 "ra_db 0.1.0",
1022 "ra_hir_def 0.1.0",
1023 "ra_hir_expand 0.1.0",
1024 "ra_prof 0.1.0",
1025 "ra_syntax 0.1.0",
1026 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1027 "test_utils 0.1.0",
1028]
1029
1030[[package]]
1031name = "ra_ide"
1059version = "0.1.0" 1032version = "0.1.0"
1060dependencies = [ 1033dependencies = [
1061 "format-buf 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1034 "format-buf 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
1062 "fst 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 1035 "fst 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
1063 "insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", 1036 "insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
1064 "itertools 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 1037 "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
1065 "join_to_string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 1038 "join_to_string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
1066 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1039 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
1067 "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1040 "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1092,18 +1065,18 @@ dependencies = [
1092 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1065 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
1093 "lsp-server 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 1066 "lsp-server 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
1094 "lsp-types 0.61.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)",
1095 "parking_lot 0.9.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)",
1096 "ra_ide_api 0.1.0", 1069 "ra_ide 0.1.0",
1097 "ra_prof 0.1.0", 1070 "ra_prof 0.1.0",
1098 "ra_project_model 0.1.0", 1071 "ra_project_model 0.1.0",
1099 "ra_syntax 0.1.0", 1072 "ra_syntax 0.1.0",
1100 "ra_text_edit 0.1.0", 1073 "ra_text_edit 0.1.0",
1101 "ra_vfs 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 1074 "ra_vfs 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
1102 "ra_vfs_glob 0.1.0", 1075 "ra_vfs_glob 0.1.0",
1103 "relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1076 "relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
1104 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1077 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1105 "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1078 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
1106 "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", 1079 "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
1107 "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1080 "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
1108 "test_utils 0.1.0", 1081 "test_utils 0.1.0",
1109 "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 1082 "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1134,7 +1107,7 @@ name = "ra_prof"
1134version = "0.1.0" 1107version = "0.1.0"
1135dependencies = [ 1108dependencies = [
1136 "backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", 1109 "backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
1137 "itertools 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 1110 "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
1138 "jemalloc-ctl 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 1111 "jemalloc-ctl 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
1139 "jemallocator 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 1112 "jemallocator 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
1140 "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1113 "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1150,8 +1123,8 @@ dependencies = [
1150 "ra_cfg 0.1.0", 1123 "ra_cfg 0.1.0",
1151 "ra_db 0.1.0", 1124 "ra_db 0.1.0",
1152 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1125 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1153 "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1126 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
1154 "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", 1127 "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
1155] 1128]
1156 1129
1157[[package]] 1130[[package]]
@@ -1159,11 +1132,11 @@ name = "ra_syntax"
1159version = "0.1.0" 1132version = "0.1.0"
1160dependencies = [ 1133dependencies = [
1161 "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 1134 "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
1162 "itertools 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 1135 "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
1163 "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1136 "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
1164 "ra_parser 0.1.0", 1137 "ra_parser 0.1.0",
1165 "ra_text_edit 0.1.0", 1138 "ra_text_edit 0.1.0",
1166 "rowan 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 1139 "rowan 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
1167 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1140 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1168 "rustc_lexer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1141 "rustc_lexer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
1169 "smol_str 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", 1142 "smol_str 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1189,14 +1162,14 @@ dependencies = [
1189 1162
1190[[package]] 1163[[package]]
1191name = "ra_vfs" 1164name = "ra_vfs"
1192version = "0.5.1" 1165version = "0.5.2"
1193source = "registry+https://github.com/rust-lang/crates.io-index" 1166source = "registry+https://github.com/rust-lang/crates.io-index"
1194dependencies = [ 1167dependencies = [
1195 "crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1168 "crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
1196 "jod-thread 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1169 "jod-thread 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
1197 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1170 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
1198 "notify 4.0.14 (registry+https://github.com/rust-lang/crates.io-index)", 1171 "notify 4.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
1199 "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 1172 "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
1200 "relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1173 "relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
1201 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1174 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1202 "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 1175 "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1207,7 +1180,7 @@ name = "ra_vfs_glob"
1207version = "0.1.0" 1180version = "0.1.0"
1208dependencies = [ 1181dependencies = [
1209 "globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 1182 "globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
1210 "ra_vfs 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 1183 "ra_vfs 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
1211] 1184]
1212 1185
1213[[package]] 1186[[package]]
@@ -1423,17 +1396,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1423dependencies = [ 1396dependencies = [
1424 "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 1397 "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
1425 "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 1398 "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
1426 "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1399 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
1427] 1400]
1428 1401
1429[[package]] 1402[[package]]
1430name = "rowan" 1403name = "rowan"
1431version = "0.7.0" 1404version = "0.7.1"
1432source = "registry+https://github.com/rust-lang/crates.io-index" 1405source = "registry+https://github.com/rust-lang/crates.io-index"
1433dependencies = [ 1406dependencies = [
1434 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1407 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1435 "smol_str 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", 1408 "smol_str 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
1436 "text_unit 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 1409 "text_unit 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
1410 "thin-dst 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
1437] 1411]
1438 1412
1439[[package]] 1413[[package]]
@@ -1472,23 +1446,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1472 1446
1473[[package]] 1447[[package]]
1474name = "salsa" 1448name = "salsa"
1475version = "0.13.2" 1449version = "0.14.1"
1476source = "registry+https://github.com/rust-lang/crates.io-index" 1450source = "registry+https://github.com/rust-lang/crates.io-index"
1477dependencies = [ 1451dependencies = [
1478 "crossbeam 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", 1452 "crossbeam 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
1479 "derive-new 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)",
1480 "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 1453 "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
1481 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1454 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
1482 "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 1455 "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
1483 "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1456 "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
1484 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1457 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1485 "salsa-macros 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", 1458 "salsa-macros 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)",
1486 "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 1459 "smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
1487] 1460]
1488 1461
1489[[package]] 1462[[package]]
1490name = "salsa-macros" 1463name = "salsa-macros"
1491version = "0.13.2" 1464version = "0.14.1"
1492source = "registry+https://github.com/rust-lang/crates.io-index" 1465source = "registry+https://github.com/rust-lang/crates.io-index"
1493dependencies = [ 1466dependencies = [
1494 "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1467 "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1516,7 +1489,7 @@ version = "0.9.0"
1516source = "registry+https://github.com/rust-lang/crates.io-index" 1489source = "registry+https://github.com/rust-lang/crates.io-index"
1517dependencies = [ 1490dependencies = [
1518 "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 1491 "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
1519 "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1492 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
1520] 1493]
1521 1494
1522[[package]] 1495[[package]]
@@ -1526,15 +1499,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1526 1499
1527[[package]] 1500[[package]]
1528name = "serde" 1501name = "serde"
1529version = "1.0.102" 1502version = "1.0.103"
1530source = "registry+https://github.com/rust-lang/crates.io-index" 1503source = "registry+https://github.com/rust-lang/crates.io-index"
1531dependencies = [ 1504dependencies = [
1532 "serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1505 "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
1533] 1506]
1534 1507
1535[[package]] 1508[[package]]
1536name = "serde_derive" 1509name = "serde_derive"
1537version = "1.0.102" 1510version = "1.0.103"
1538source = "registry+https://github.com/rust-lang/crates.io-index" 1511source = "registry+https://github.com/rust-lang/crates.io-index"
1539dependencies = [ 1512dependencies = [
1540 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1513 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1544,12 +1517,12 @@ dependencies = [
1544 1517
1545[[package]] 1518[[package]]
1546name = "serde_json" 1519name = "serde_json"
1547version = "1.0.41" 1520version = "1.0.42"
1548source = "registry+https://github.com/rust-lang/crates.io-index" 1521source = "registry+https://github.com/rust-lang/crates.io-index"
1549dependencies = [ 1522dependencies = [
1550 "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 1523 "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
1551 "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1524 "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
1552 "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1525 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
1553] 1526]
1554 1527
1555[[package]] 1528[[package]]
@@ -1569,7 +1542,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1569dependencies = [ 1542dependencies = [
1570 "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 1543 "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
1571 "linked-hash-map 0.5.2 (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)",
1572 "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1545 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
1573 "yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 1546 "yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
1574] 1547]
1575 1548
@@ -1580,14 +1553,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1580 1553
1581[[package]] 1554[[package]]
1582name = "smallvec" 1555name = "smallvec"
1583version = "0.6.13"
1584source = "registry+https://github.com/rust-lang/crates.io-index"
1585dependencies = [
1586 "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
1587]
1588
1589[[package]]
1590name = "smallvec"
1591version = "1.0.0" 1556version = "1.0.0"
1592source = "registry+https://github.com/rust-lang/crates.io-index" 1557source = "registry+https://github.com/rust-lang/crates.io-index"
1593 1558
@@ -1596,7 +1561,7 @@ name = "smol_str"
1596version = "0.1.15" 1561version = "0.1.15"
1597source = "registry+https://github.com/rust-lang/crates.io-index" 1562source = "registry+https://github.com/rust-lang/crates.io-index"
1598dependencies = [ 1563dependencies = [
1599 "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1564 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
1600] 1565]
1601 1566
1602[[package]] 1567[[package]]
@@ -1652,7 +1617,7 @@ name = "test_utils"
1652version = "0.1.0" 1617version = "0.1.0"
1653dependencies = [ 1618dependencies = [
1654 "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1619 "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
1655 "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", 1620 "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
1656 "text_unit 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 1621 "text_unit 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
1657] 1622]
1658 1623
@@ -1662,6 +1627,11 @@ version = "0.1.9"
1662source = "registry+https://github.com/rust-lang/crates.io-index" 1627source = "registry+https://github.com/rust-lang/crates.io-index"
1663 1628
1664[[package]] 1629[[package]]
1630name = "thin-dst"
1631version = "1.0.0"
1632source = "registry+https://github.com/rust-lang/crates.io-index"
1633
1634[[package]]
1665name = "thread_local" 1635name = "thread_local"
1666version = "0.3.6" 1636version = "0.3.6"
1667source = "registry+https://github.com/rust-lang/crates.io-index" 1637source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1705,10 +1675,10 @@ dependencies = [
1705 1675
1706[[package]] 1676[[package]]
1707name = "unicode-normalization" 1677name = "unicode-normalization"
1708version = "0.1.9" 1678version = "0.1.11"
1709source = "registry+https://github.com/rust-lang/crates.io-index" 1679source = "registry+https://github.com/rust-lang/crates.io-index"
1710dependencies = [ 1680dependencies = [
1711 "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 1681 "smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
1712] 1682]
1713 1683
1714[[package]] 1684[[package]]
@@ -1717,11 +1687,6 @@ version = "1.6.0"
1717source = "registry+https://github.com/rust-lang/crates.io-index" 1687source = "registry+https://github.com/rust-lang/crates.io-index"
1718 1688
1719[[package]] 1689[[package]]
1720name = "unicode-width"
1721version = "0.1.6"
1722source = "registry+https://github.com/rust-lang/crates.io-index"
1723
1724[[package]]
1725name = "unicode-xid" 1690name = "unicode-xid"
1726version = "0.2.0" 1691version = "0.2.0"
1727source = "registry+https://github.com/rust-lang/crates.io-index" 1692source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1734,7 +1699,7 @@ dependencies = [
1734 "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1699 "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
1735 "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1700 "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
1736 "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1701 "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
1737 "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1702 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
1738] 1703]
1739 1704
1740[[package]] 1705[[package]]
@@ -1743,7 +1708,7 @@ version = "0.8.1"
1743source = "registry+https://github.com/rust-lang/crates.io-index" 1708source = "registry+https://github.com/rust-lang/crates.io-index"
1744dependencies = [ 1709dependencies = [
1745 "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1710 "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
1746 "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1711 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
1747] 1712]
1748 1713
1749[[package]] 1714[[package]]
@@ -1816,12 +1781,12 @@ dependencies = [
1816name = "xtask" 1781name = "xtask"
1817version = "0.1.0" 1782version = "0.1.0"
1818dependencies = [ 1783dependencies = [
1819 "anyhow 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", 1784 "anyhow 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)",
1820 "pico-args 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 1785 "pico-args 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
1821 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1786 "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
1822 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1787 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
1823 "ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 1788 "ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
1824 "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1789 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
1825 "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 1790 "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
1826] 1791]
1827 1792
@@ -1840,7 +1805,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1840 1805
1841[metadata] 1806[metadata]
1842"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" 1807"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d"
1843"checksum anyhow 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "e19f23ab207147bbdbcdfa7f7e4ca5e84963d79bae3937074682177ab9150968" 1808"checksum anyhow 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b412394828b7ca486b362f300b762d8e43dafd6f0d727b63f1cd2ade207c6cef"
1844"checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" 1809"checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8"
1845"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" 1810"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90"
1846"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" 1811"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"
@@ -1856,13 +1821,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1856"checksum cargo_metadata 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8d2d1617e838936c0d2323a65cc151e03ae19a7678dd24f72bccf27119b90a5d" 1821"checksum cargo_metadata 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8d2d1617e838936c0d2323a65cc151e03ae19a7678dd24f72bccf27119b90a5d"
1857"checksum cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)" = "aa87058dce70a3ff5621797f1506cb837edd02ac4c0ae642b4542dce802908b8" 1822"checksum cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)" = "aa87058dce70a3ff5621797f1506cb837edd02ac4c0ae642b4542dce802908b8"
1858"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 1823"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
1859"checksum chalk-derive 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)" = "<none>" 1824"checksum chalk-derive 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)" = "<none>"
1860"checksum chalk-engine 0.9.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)" = "<none>" 1825"checksum chalk-engine 0.9.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)" = "<none>"
1861"checksum chalk-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)" = "<none>" 1826"checksum chalk-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)" = "<none>"
1862"checksum chalk-macros 0.1.1 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)" = "<none>" 1827"checksum chalk-macros 0.1.1 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)" = "<none>"
1863"checksum chalk-rust-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)" = "<none>" 1828"checksum chalk-rust-ir 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)" = "<none>"
1864"checksum chalk-solve 0.1.0 (git+https://github.com/rust-lang/chalk.git?rev=a88cad7f0a69e05ba8f40b74c58a1c229c1b2478)" = "<none>" 1829"checksum chalk-solve 0.1.0 (git+https://github.com/jackh726/chalk.git?rev=095cd38a4f16337913bba487f2055b9ca0179f30)" = "<none>"
1865"checksum chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e8493056968583b0193c1bb04d6f7684586f3726992d6c573261941a895dbd68" 1830"checksum chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01"
1866"checksum clicolors-control 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90082ee5dcdd64dc4e9e0d37fbf3ee325419e39c0092191e0393df65518f741e" 1831"checksum clicolors-control 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90082ee5dcdd64dc4e9e0d37fbf3ee325419e39c0092191e0393df65518f741e"
1867"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" 1832"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
1868"checksum console 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f5d540c2d34ac9dd0deb5f3b5f54c36c79efa78f6b3ad19106a554d07a7b5d9f" 1833"checksum console 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f5d540c2d34ac9dd0deb5f3b5f54c36c79efa78f6b3ad19106a554d07a7b5d9f"
@@ -1872,7 +1837,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1872"checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" 1837"checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac"
1873"checksum crossbeam-queue 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfd6515864a82d2f877b42813d4553292c6659498c9a2aa31bab5a15243c2700" 1838"checksum crossbeam-queue 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfd6515864a82d2f877b42813d4553292c6659498c9a2aa31bab5a15243c2700"
1874"checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" 1839"checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4"
1875"checksum derive-new 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)" = "71f31892cd5c62e414316f2963c5689242c43d8e7bbcaaeca97e5e28c95d91d9"
1876"checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" 1840"checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
1877"checksum drop_bomb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "69b26e475fd29098530e709294e94e661974c851aed42512793f120fed4e199f" 1841"checksum drop_bomb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "69b26e475fd29098530e709294e94e661974c851aed42512793f120fed4e199f"
1878"checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" 1842"checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e"
@@ -1898,12 +1862,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1898"checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120" 1862"checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120"
1899"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" 1863"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
1900"checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2" 1864"checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2"
1901"checksum indicatif 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8572bccfb0665e70b7faf44ee28841b8e0823450cd4ad562a76b5a3c4bf48487"
1902"checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718" 1865"checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718"
1903"checksum inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0" 1866"checksum inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0"
1904"checksum insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0d499dc062e841590a67230d853bce62d0abeb91304927871670b7c55c461349" 1867"checksum insta 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0d499dc062e841590a67230d853bce62d0abeb91304927871670b7c55c461349"
1905"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" 1868"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
1906"checksum itertools 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "87fa75c9dea7b07be3138c49abbb83fd4bea199b5cdc76f9804458edc5da0d6e" 1869"checksum itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484"
1907"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" 1870"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f"
1908"checksum jemalloc-ctl 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c502a5ff9dd2924f1ed32ba96e3b65735d837b4bfd978d3161b1702e66aca4b7" 1871"checksum jemalloc-ctl 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c502a5ff9dd2924f1ed32ba96e3b65735d837b4bfd978d3161b1702e66aca4b7"
1909"checksum jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45" 1872"checksum jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45"
@@ -1916,27 +1879,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1916"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" 1879"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f"
1917"checksum libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)" = "1a31a0627fdf1f6a39ec0dd577e101440b7db22672c0901fe00a9a6fbb5c24e8" 1880"checksum libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)" = "1a31a0627fdf1f6a39ec0dd577e101440b7db22672c0901fe00a9a6fbb5c24e8"
1918"checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" 1881"checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83"
1919"checksum lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8912e782533a93a167888781b836336a6ca5da6175c05944c86cf28c31104dc" 1882"checksum lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e57b3997725d2b60dbec1297f6c2e2957cc383db1cebd6be812163f969c7d586"
1920"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" 1883"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
1921"checksum lsp-server 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ba36405bd742139ab79c246ca5adb7fde2fe1a0f495e2c8e2f607b607dedb12" 1884"checksum lsp-server 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ba36405bd742139ab79c246ca5adb7fde2fe1a0f495e2c8e2f607b607dedb12"
1922"checksum lsp-types 0.61.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa3268fbe8beb2795c2fb327bf44f4f3d24f5fe9ebc18d7e2980afd444d72bcf" 1885"checksum lsp-types 0.61.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa3268fbe8beb2795c2fb327bf44f4f3d24f5fe9ebc18d7e2980afd444d72bcf"
1923"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 1886"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
1924"checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
1925"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" 1887"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e"
1926"checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" 1888"checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9"
1927"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" 1889"checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f"
1928"checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40" 1890"checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40"
1929"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" 1891"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
1930"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" 1892"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
1931"checksum notify 4.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "199628fc33b21bc767baa057490b00b382ecbae030803a7b36292422d15b778b" 1893"checksum notify 4.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "199628fc33b21bc767baa057490b00b382ecbae030803a7b36292422d15b778b"
1932"checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" 1894"checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09"
1933"checksum num-traits 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "443c53b3c3531dfcbfa499d8893944db78474ad7a1d87fa2d94d1a2231693ac6" 1895"checksum num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c81ffc11c212fa327657cb19dd85eb7419e163b5b076bede2bdb5c974c07e4"
1934"checksum num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72" 1896"checksum num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72"
1935"checksum number_prefix 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a"
1936"checksum once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "891f486f630e5c5a4916c7e16c4b24a53e78c860b646e9f8e005e4f16847bfed" 1897"checksum once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "891f486f630e5c5a4916c7e16c4b24a53e78c860b646e9f8e005e4f16847bfed"
1937"checksum ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a86ed3f5f244b372d6b1a00b72ef7f8876d0bc6a78a4c9985c53614041512063" 1898"checksum ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a86ed3f5f244b372d6b1a00b72ef7f8876d0bc6a78a4c9985c53614041512063"
1938"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" 1899"checksum parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92e98c49ab0b7ce5b222f2cc9193fc4efe11c6d0bd4f648e374684a6857b1cfc"
1939"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" 1900"checksum parking_lot_core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7582838484df45743c8434fbff785e8edf260c28748353d44bc0da32e0ceabf1"
1940"checksum paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "423a519e1c6e828f1e73b720f9d9ed2fa643dce8a7737fb43235ce0b41eeaa49" 1901"checksum paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "423a519e1c6e828f1e73b720f9d9ed2fa643dce8a7737fb43235ce0b41eeaa49"
1941"checksum paste-impl 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5" 1902"checksum paste-impl 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5"
1942"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 1903"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
@@ -1949,7 +1910,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1949"checksum psm 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b14fc68b454f875abc8354c2555e1d56596f74833ddc0f77f87f4871ed6a30e0" 1910"checksum psm 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b14fc68b454f875abc8354c2555e1d56596f74833ddc0f77f87f4871ed6a30e0"
1950"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" 1911"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
1951"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" 1912"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
1952"checksum ra_vfs 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a95d3d1edc70a98d9e42f145bc92c2071dfdc532571591c9eac407c0e4feb89" 1913"checksum ra_vfs 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bc898f237e4b4498959ae0100c688793a23e77624d44ef710ba70094217f98e0"
1953"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" 1914"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca"
1954"checksum rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412" 1915"checksum rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412"
1955"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" 1916"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef"
@@ -1974,25 +1935,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1974"checksum relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bedde000f40f2921ce439ea165c9c53fd629bfa115140c72e22aceacb4a21954" 1935"checksum relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bedde000f40f2921ce439ea165c9c53fd629bfa115140c72e22aceacb4a21954"
1975"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" 1936"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e"
1976"checksum ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ece421e0c4129b90e4a35b6f625e472e96c552136f5093a2f4fa2bbb75a62d5" 1937"checksum ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ece421e0c4129b90e4a35b6f625e472e96c552136f5093a2f4fa2bbb75a62d5"
1977"checksum rowan 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a241900475bf2ba302061550ff50c82b45095ca95d23d1872345793fd42407" 1938"checksum rowan 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ca620bbf9c48c92b5cef19f96354a309ac36b7d8ef7c591e66117335c8b1988b"
1978"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" 1939"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
1979"checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" 1940"checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8"
1980"checksum rustc_lexer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c86aae0c77166108c01305ee1a36a1e77289d7dc6ca0a3cd91ff4992de2d16a5" 1941"checksum rustc_lexer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c86aae0c77166108c01305ee1a36a1e77289d7dc6ca0a3cd91ff4992de2d16a5"
1981"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 1942"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
1982"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" 1943"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"
1983"checksum salsa 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ec0865bdd9d8e614686a0cbb76979c735810131d287eb1683e91e4e64a58c387" 1944"checksum salsa 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4a006c56096acaaa5e82e5974c28d05ff1e84aa70615f19c53fecf8a1afb2fd2"
1984"checksum salsa-macros 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cac182212d3a1db75ddc42399ff1461b258a694b8318ee7e0baf6c976e39efee" 1945"checksum salsa-macros 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "038a09b6271446f1123f142fe7e5bef6d4687c4cf82e6986be574c2af3745530"
1985"checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" 1946"checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421"
1986"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" 1947"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d"
1987"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 1948"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
1988"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 1949"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
1989"checksum serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4b39bd9b0b087684013a792c59e3e07a46a01d2322518d8a1104641a0b1be0" 1950"checksum serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702"
1990"checksum serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)" = "ca13fc1a832f793322228923fbb3aba9f3f44444898f835d31ad1b74fa0a2bf8" 1951"checksum serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0"
1991"checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2" 1952"checksum serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)" = "1a3351dcbc1f067e2c92ab7c3c1f288ad1a4cffc470b5aaddb4c2e0a3ae80043"
1992"checksum serde_repr 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "cd02c7587ec314570041b2754829f84d873ced14a96d1fd1823531e11db40573" 1953"checksum serde_repr 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "cd02c7587ec314570041b2754829f84d873ced14a96d1fd1823531e11db40573"
1993"checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35" 1954"checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35"
1994"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" 1955"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
1995"checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6"
1996"checksum smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecf3b85f68e8abaa7555aa5abdb1153079387e60b718283d732f03897fcfc86" 1956"checksum smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecf3b85f68e8abaa7555aa5abdb1153079387e60b718283d732f03897fcfc86"
1997"checksum smol_str 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "34836c9a295c62c2ce3514471117c5cb269891e8421b2aafdd910050576c4d8b" 1957"checksum smol_str 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "34836c9a295c62c2ce3514471117c5cb269891e8421b2aafdd910050576c4d8b"
1998"checksum stacker 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d96fc4f13a0ac088e9a3cd9af1cc8c5cc1ab5deb2145cef661267dfc9c542f8a" 1958"checksum stacker 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d96fc4f13a0ac088e9a3cd9af1cc8c5cc1ab5deb2145cef661267dfc9c542f8a"
@@ -2001,14 +1961,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2001"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" 1961"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
2002"checksum termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "72b620c5ea021d75a735c943269bb07d30c9b77d6ac6b236bc8b5c496ef05625" 1962"checksum termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "72b620c5ea021d75a735c943269bb07d30c9b77d6ac6b236bc8b5c496ef05625"
2003"checksum text_unit 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e08bbcb7a3adbda0eb23431206b653bdad3d8dea311e72d36bf2215e27a42579" 1963"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"
2004"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 1965"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
2005"checksum threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" 1966"checksum threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865"
2006"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" 1967"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
2007"checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" 1968"checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
2008"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 1969"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
2009"checksum unicode-normalization 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "09c8070a9942f5e7cfccd93f490fdebd230ee3c3c9f107cb25bad5351ef671cf" 1970"checksum unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b561e267b2326bb4cebfc0ef9e68355c7abe6c6f522aeac2f5bf95d56c59bdcf"
2010"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" 1971"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0"
2011"checksum unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7007dbd421b92cc6e28410fe7362e2e0a2503394908f417b68ec8d1c364c4e20"
2012"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" 1972"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
2013"checksum url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75b414f6c464c879d7f9babf951f23bc3743fb7313c081b2e6ca719067ea9d61" 1973"checksum url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75b414f6c464c879d7f9babf951f23bc3743fb7313c081b2e6ca719067ea9d61"
2014"checksum uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11" 1974"checksum uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11"
diff --git a/README.md b/README.md
index ea1c25d7f..74c971c0d 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,7 @@ https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frls-2.2E0
56 56
57## Quick Links 57## Quick Links
58 58
59* API docs: https://rust-analyzer.github.io/rust-analyzer/ra_ide_api/ 59* API docs: https://rust-analyzer.github.io/rust-analyzer/ra_ide/
60 60
61 61
62## License 62## License
diff --git a/crates/ra_assists/src/assists/add_explicit_type.rs b/crates/ra_assists/src/assists/add_explicit_type.rs
index 562a09685..eeb4ff39f 100644
--- a/crates/ra_assists/src/assists/add_explicit_type.rs
+++ b/crates/ra_assists/src/assists/add_explicit_type.rs
@@ -1,4 +1,4 @@
1use hir::{db::HirDatabase, HirDisplay, Ty}; 1use hir::{db::HirDatabase, HirDisplay};
2use ra_syntax::{ 2use ra_syntax::{
3 ast::{self, AstNode, LetStmt, NameOwner}, 3 ast::{self, AstNode, LetStmt, NameOwner},
4 T, 4 T,
@@ -43,7 +43,7 @@ pub(crate) fn add_explicit_type(ctx: AssistCtx<impl HirDatabase>) -> Option<Assi
43 let analyzer = ctx.source_analyzer(stmt.syntax(), None); 43 let analyzer = ctx.source_analyzer(stmt.syntax(), None);
44 let ty = analyzer.type_of(db, &expr)?; 44 let ty = analyzer.type_of(db, &expr)?;
45 // Assist not applicable if the type is unknown 45 // Assist not applicable if the type is unknown
46 if is_unknown(&ty) { 46 if ty.contains_unknown() {
47 return None; 47 return None;
48 } 48 }
49 49
@@ -53,15 +53,6 @@ pub(crate) fn add_explicit_type(ctx: AssistCtx<impl HirDatabase>) -> Option<Assi
53 }) 53 })
54} 54}
55 55
56/// Returns true if any type parameter is unknown
57fn is_unknown(ty: &Ty) -> bool {
58 match ty {
59 Ty::Unknown => true,
60 Ty::Apply(a_ty) => a_ty.parameters.iter().any(is_unknown),
61 _ => false,
62 }
63}
64
65#[cfg(test)] 56#[cfg(test)]
66mod tests { 57mod tests {
67 use super::*; 58 use super::*;
diff --git a/crates/ra_assists/src/assists/add_new.rs b/crates/ra_assists/src/assists/add_new.rs
index ee8bff346..8f68bd5fb 100644
--- a/crates/ra_assists/src/assists/add_new.rs
+++ b/crates/ra_assists/src/assists/add_new.rs
@@ -35,8 +35,8 @@ pub(crate) fn add_new(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> {
35 let strukt = ctx.find_node_at_offset::<ast::StructDef>()?; 35 let strukt = ctx.find_node_at_offset::<ast::StructDef>()?;
36 36
37 // We want to only apply this to non-union structs with named fields 37 // We want to only apply this to non-union structs with named fields
38 let field_list = match (strukt.kind(), strukt.is_union()) { 38 let field_list = match strukt.kind() {
39 (StructKind::Record(named), false) => named, 39 StructKind::Record(named) => named,
40 _ => return None, 40 _ => return None,
41 }; 41 };
42 42
diff --git a/crates/ra_assists/src/assists/fill_match_arms.rs b/crates/ra_assists/src/assists/fill_match_arms.rs
index 8482897c5..b75bd44eb 100644
--- a/crates/ra_assists/src/assists/fill_match_arms.rs
+++ b/crates/ra_assists/src/assists/fill_match_arms.rs
@@ -83,10 +83,11 @@ fn resolve_enum_def(
83) -> Option<ast::EnumDef> { 83) -> Option<ast::EnumDef> {
84 let expr_ty = analyzer.type_of(db, &expr)?; 84 let expr_ty = analyzer.type_of(db, &expr)?;
85 85
86 analyzer.autoderef(db, expr_ty).find_map(|ty| match ty.as_adt() { 86 let res = expr_ty.autoderef(db).find_map(|ty| match ty.as_adt() {
87 Some((Adt::Enum(e), _)) => Some(e.source(db).value), 87 Some(Adt::Enum(e)) => Some(e.source(db).value),
88 _ => None, 88 _ => None,
89 }) 89 });
90 res
90} 91}
91 92
92fn build_pat(var: ast::EnumVariant) -> Option<ast::Pat> { 93fn build_pat(var: ast::EnumVariant) -> Option<ast::Pat> {
diff --git a/crates/ra_assists/src/test_db.rs b/crates/ra_assists/src/test_db.rs
index 5f96c974b..523259fd4 100644
--- a/crates/ra_assists/src/test_db.rs
+++ b/crates/ra_assists/src/test_db.rs
@@ -21,6 +21,9 @@ impl salsa::Database for TestDB {
21 fn salsa_runtime(&self) -> &salsa::Runtime<Self> { 21 fn salsa_runtime(&self) -> &salsa::Runtime<Self> {
22 &self.runtime 22 &self.runtime
23 } 23 }
24 fn salsa_runtime_mut(&mut self) -> &mut salsa::Runtime<Self> {
25 &mut self.runtime
26 }
24} 27}
25 28
26impl std::panic::RefUnwindSafe for TestDB {} 29impl std::panic::RefUnwindSafe for TestDB {}
diff --git a/crates/ra_batch/Cargo.toml b/crates/ra_batch/Cargo.toml
index 35626d77d..3bf351fe3 100644
--- a/crates/ra_batch/Cargo.toml
+++ b/crates/ra_batch/Cargo.toml
@@ -15,6 +15,6 @@ crossbeam-channel = "0.4.0"
15ra_vfs = "0.5.0" 15ra_vfs = "0.5.0"
16ra_vfs_glob = { path = "../ra_vfs_glob" } 16ra_vfs_glob = { path = "../ra_vfs_glob" }
17ra_db = { path = "../ra_db" } 17ra_db = { path = "../ra_db" }
18ra_ide_api = { path = "../ra_ide_api" } 18ra_ide = { path = "../ra_ide" }
19ra_hir = { path = "../ra_hir" } 19ra_hir = { path = "../ra_hir" }
20ra_project_model = { path = "../ra_project_model" } 20ra_project_model = { path = "../ra_project_model" }
diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs
index cb389eb26..2c9645c00 100644
--- a/crates/ra_batch/src/lib.rs
+++ b/crates/ra_batch/src/lib.rs
@@ -6,7 +6,7 @@ use rustc_hash::FxHashMap;
6 6
7use crossbeam_channel::{unbounded, Receiver}; 7use crossbeam_channel::{unbounded, Receiver};
8use ra_db::{CrateGraph, FileId, SourceRootId}; 8use ra_db::{CrateGraph, FileId, SourceRootId};
9use ra_ide_api::{AnalysisChange, AnalysisHost, FeatureFlags}; 9use ra_ide::{AnalysisChange, AnalysisHost, FeatureFlags};
10use ra_project_model::{get_rustc_cfg_options, PackageRoot, ProjectWorkspace}; 10use ra_project_model::{get_rustc_cfg_options, PackageRoot, ProjectWorkspace};
11use ra_vfs::{RootEntry, Vfs, VfsChange, VfsTask, Watch}; 11use ra_vfs::{RootEntry, Vfs, VfsChange, VfsTask, Watch};
12use ra_vfs_glob::RustPackageFilterBuilder; 12use ra_vfs_glob::RustPackageFilterBuilder;
diff --git a/crates/ra_cli/Cargo.toml b/crates/ra_cli/Cargo.toml
index c9d3bdb77..c7e0d0f0f 100644
--- a/crates/ra_cli/Cargo.toml
+++ b/crates/ra_cli/Cargo.toml
@@ -8,10 +8,9 @@ publish = false
8[dependencies] 8[dependencies]
9pico-args = "0.3.0" 9pico-args = "0.3.0"
10flexi_logger = "0.14.0" 10flexi_logger = "0.14.0"
11indicatif = "0.13.0"
12 11
13ra_syntax = { path = "../ra_syntax" } 12ra_syntax = { path = "../ra_syntax" }
14ra_ide_api = { path = "../ra_ide_api" } 13ra_ide = { path = "../ra_ide" }
15ra_batch = { path = "../ra_batch" } 14ra_batch = { path = "../ra_batch" }
16ra_hir = { path = "../ra_hir" } 15ra_hir = { path = "../ra_hir" }
17ra_db = { path = "../ra_db" } 16ra_db = { path = "../ra_db" }
diff --git a/crates/ra_cli/src/analysis_bench.rs b/crates/ra_cli/src/analysis_bench.rs
index 8bbe5d9e8..5485a38ff 100644
--- a/crates/ra_cli/src/analysis_bench.rs
+++ b/crates/ra_cli/src/analysis_bench.rs
@@ -10,7 +10,7 @@ use ra_db::{
10 salsa::{Database, Durability}, 10 salsa::{Database, Durability},
11 FileId, SourceDatabaseExt, 11 FileId, SourceDatabaseExt,
12}; 12};
13use ra_ide_api::{Analysis, AnalysisChange, AnalysisHost, FilePosition, LineCol}; 13use ra_ide::{Analysis, AnalysisChange, AnalysisHost, FilePosition, LineCol};
14 14
15use crate::Result; 15use crate::Result;
16 16
@@ -91,7 +91,7 @@ fn do_work<F: Fn(&Analysis) -> T, T>(host: &mut AnalysisHost, file_id: FileId, w
91 { 91 {
92 let start = Instant::now(); 92 let start = Instant::now();
93 eprint!("trivial change: "); 93 eprint!("trivial change: ");
94 host.raw_database().salsa_runtime().synthetic_write(Durability::LOW); 94 host.raw_database_mut().salsa_runtime_mut().synthetic_write(Durability::LOW);
95 work(&host.analysis()); 95 work(&host.analysis());
96 eprintln!("{:?}", start.elapsed()); 96 eprintln!("{:?}", start.elapsed());
97 } 97 }
@@ -111,7 +111,7 @@ fn do_work<F: Fn(&Analysis) -> T, T>(host: &mut AnalysisHost, file_id: FileId, w
111 { 111 {
112 let start = Instant::now(); 112 let start = Instant::now();
113 eprint!("const change: "); 113 eprint!("const change: ");
114 host.raw_database().salsa_runtime().synthetic_write(Durability::HIGH); 114 host.raw_database_mut().salsa_runtime_mut().synthetic_write(Durability::HIGH);
115 let res = work(&host.analysis()); 115 let res = work(&host.analysis());
116 eprintln!("{:?}", start.elapsed()); 116 eprintln!("{:?}", start.elapsed());
117 res 117 res
diff --git a/crates/ra_cli/src/analysis_stats.rs b/crates/ra_cli/src/analysis_stats.rs
index c4eb28245..9b1802a5f 100644
--- a/crates/ra_cli/src/analysis_stats.rs
+++ b/crates/ra_cli/src/analysis_stats.rs
@@ -6,7 +6,7 @@ use ra_db::SourceDatabaseExt;
6use ra_hir::{AssocItem, Crate, HasSource, HirDisplay, ModuleDef, Ty, TypeWalk}; 6use ra_hir::{AssocItem, Crate, HasSource, HirDisplay, ModuleDef, Ty, TypeWalk};
7use ra_syntax::AstNode; 7use ra_syntax::AstNode;
8 8
9use crate::{Result, Verbosity}; 9use crate::{progress_report::ProgressReport, Result, Verbosity};
10 10
11pub fn run( 11pub fn run(
12 verbosity: Verbosity, 12 verbosity: Verbosity,
@@ -75,17 +75,11 @@ pub fn run(
75 println!("Item Collection: {:?}, {}", analysis_time.elapsed(), ra_prof::memory_usage()); 75 println!("Item Collection: {:?}, {}", analysis_time.elapsed(), ra_prof::memory_usage());
76 76
77 let inference_time = Instant::now(); 77 let inference_time = Instant::now();
78 let bar = match verbosity { 78 let mut bar = match verbosity {
79 Verbosity::Verbose | Verbosity::Normal => indicatif::ProgressBar::with_draw_target( 79 Verbosity::Verbose | Verbosity::Normal => ProgressReport::new(funcs.len() as u64),
80 funcs.len() as u64, 80 Verbosity::Quiet => ProgressReport::hidden(),
81 indicatif::ProgressDrawTarget::stderr_nohz(),
82 ),
83 Verbosity::Quiet => indicatif::ProgressBar::hidden(),
84 }; 81 };
85 82
86 bar.set_style(
87 indicatif::ProgressStyle::default_bar().template("{wide_bar} {pos}/{len}\n{msg}"),
88 );
89 bar.tick(); 83 bar.tick();
90 let mut num_exprs = 0; 84 let mut num_exprs = 0;
91 let mut num_exprs_unknown = 0; 85 let mut num_exprs_unknown = 0;
diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs
index a31fd5d6a..fe847e611 100644
--- a/crates/ra_cli/src/main.rs
+++ b/crates/ra_cli/src/main.rs
@@ -3,12 +3,13 @@
3mod analysis_stats; 3mod analysis_stats;
4mod analysis_bench; 4mod analysis_bench;
5mod help; 5mod help;
6mod progress_report;
6 7
7use std::{error::Error, fmt::Write, io::Read}; 8use std::{error::Error, fmt::Write, io::Read};
8 9
9use flexi_logger::Logger; 10use flexi_logger::Logger;
10use pico_args::Arguments; 11use pico_args::Arguments;
11use ra_ide_api::{file_structure, Analysis}; 12use ra_ide::{file_structure, Analysis};
12use ra_prof::profile; 13use ra_prof::profile;
13use ra_syntax::{AstNode, SourceFile}; 14use ra_syntax::{AstNode, SourceFile};
14 15
diff --git a/crates/ra_cli/src/progress_report.rs b/crates/ra_cli/src/progress_report.rs
new file mode 100644
index 000000000..31867a1e9
--- /dev/null
+++ b/crates/ra_cli/src/progress_report.rs
@@ -0,0 +1,120 @@
1//! A simple progress bar
2//!
3//! A single thread non-optimized progress bar
4use std::io::Write;
5
6/// A Simple ASCII Progress Bar
7pub struct ProgressReport {
8 curr: f32,
9 text: String,
10 hidden: bool,
11
12 len: u64,
13 pos: u64,
14 msg: String,
15}
16
17impl ProgressReport {
18 pub fn new(len: u64) -> ProgressReport {
19 ProgressReport {
20 curr: 0.0,
21 text: String::new(),
22 hidden: false,
23 len,
24 pos: 0,
25 msg: String::new(),
26 }
27 }
28
29 pub fn hidden() -> ProgressReport {
30 ProgressReport {
31 curr: 0.0,
32 text: String::new(),
33 hidden: true,
34 len: 0,
35 pos: 0,
36 msg: String::new(),
37 }
38 }
39
40 pub fn set_message(&mut self, msg: &str) {
41 self.msg = msg.to_string();
42 self.tick();
43 }
44
45 pub fn println<I: Into<String>>(&mut self, msg: I) {
46 self.clear();
47 println!("{}", msg.into());
48 self.tick();
49 }
50
51 pub fn inc(&mut self, delta: u64) {
52 self.pos += delta;
53 if self.len == 0 {
54 self.set_value(0.0)
55 } else {
56 self.set_value((self.pos as f32) / (self.len as f32))
57 }
58 self.tick();
59 }
60
61 pub fn finish_and_clear(&mut self) {
62 self.clear();
63 }
64
65 pub fn tick(&mut self) {
66 if self.hidden {
67 return;
68 }
69 let percent = (self.curr * 100.0) as u32;
70 let text = format!("{}/{} {:3>}% {}", self.pos, self.len, percent, self.msg);
71 self.update_text(&text);
72 }
73
74 fn update_text(&mut self, text: &str) {
75 // Get length of common portion
76 let mut common_prefix_length = 0;
77 let common_length = usize::min(self.text.len(), text.len());
78
79 while common_prefix_length < common_length
80 && text.chars().nth(common_prefix_length).unwrap()
81 == self.text.chars().nth(common_prefix_length).unwrap()
82 {
83 common_prefix_length += 1;
84 }
85
86 // Backtrack to the first differing character
87 let mut output = String::new();
88 output += &'\x08'.to_string().repeat(self.text.len() - common_prefix_length);
89 // Output new suffix
90 output += &text[common_prefix_length..text.len()];
91
92 // If the new text is shorter than the old one: delete overlapping characters
93 if let Some(overlap_count) = self.text.len().checked_sub(text.len()) {
94 if overlap_count > 0 {
95 output += &" ".repeat(overlap_count);
96 output += &"\x08".repeat(overlap_count);
97 }
98 }
99
100 let _ = std::io::stdout().write(output.as_bytes());
101 let _ = std::io::stdout().flush();
102 self.text = text.to_string();
103 }
104
105 fn set_value(&mut self, value: f32) {
106 self.curr = f32::max(0.0, f32::min(1.0, value));
107 }
108
109 fn clear(&mut self) {
110 if self.hidden {
111 return;
112 }
113
114 // Fill all last text to space and return the cursor
115 let spaces = " ".repeat(self.text.len());
116 let backspaces = "\x08".repeat(self.text.len());
117 print!("{}{}{}", backspaces, spaces, backspaces);
118 self.text = String::new();
119 }
120}
diff --git a/crates/ra_db/Cargo.toml b/crates/ra_db/Cargo.toml
index 4ec09b6d9..7afa5d8fc 100644
--- a/crates/ra_db/Cargo.toml
+++ b/crates/ra_db/Cargo.toml
@@ -8,7 +8,7 @@ authors = ["rust-analyzer developers"]
8doctest = false 8doctest = false
9 9
10[dependencies] 10[dependencies]
11salsa = "0.13.0" 11salsa = "0.14.1"
12relative-path = "1.0.0" 12relative-path = "1.0.0"
13rustc-hash = "1.0" 13rustc-hash = "1.0"
14 14
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs
index e8852531b..21341b769 100644
--- a/crates/ra_db/src/lib.rs
+++ b/crates/ra_db/src/lib.rs
@@ -1,4 +1,4 @@
1//! ra_db defines basic database traits. The concrete DB is defined by ra_ide_api. 1//! ra_db defines basic database traits. The concrete DB is defined by ra_ide.
2mod cancellation; 2mod cancellation;
3mod input; 3mod input;
4pub mod fixture; 4pub mod fixture;
diff --git a/crates/ra_hir/Cargo.toml b/crates/ra_hir/Cargo.toml
index 42ddfecc9..e79361e7c 100644
--- a/crates/ra_hir/Cargo.toml
+++ b/crates/ra_hir/Cargo.toml
@@ -8,28 +8,11 @@ authors = ["rust-analyzer developers"]
8doctest = false 8doctest = false
9 9
10[dependencies] 10[dependencies]
11arrayvec = "0.5.1"
12log = "0.4.5" 11log = "0.4.5"
13rustc-hash = "1.0" 12rustc-hash = "1.0"
14parking_lot = "0.9.0"
15ena = "0.13"
16once_cell = "1.0.1"
17 13
18ra_syntax = { path = "../ra_syntax" } 14ra_syntax = { path = "../ra_syntax" }
19ra_arena = { path = "../ra_arena" }
20ra_cfg = { path = "../ra_cfg" }
21ra_db = { path = "../ra_db" } 15ra_db = { path = "../ra_db" }
22mbe = { path = "../ra_mbe", package = "ra_mbe" }
23tt = { path = "../ra_tt", package = "ra_tt" }
24hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } 16hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
25hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } 17hir_def = { path = "../ra_hir_def", package = "ra_hir_def" }
26test_utils = { path = "../test_utils" } 18hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" }
27ra_prof = { path = "../ra_prof" }
28
29chalk-solve = { git = "https://github.com/rust-lang/chalk.git", rev = "a88cad7f0a69e05ba8f40b74c58a1c229c1b2478" }
30chalk-rust-ir = { git = "https://github.com/rust-lang/chalk.git", rev = "a88cad7f0a69e05ba8f40b74c58a1c229c1b2478" }
31chalk-ir = { git = "https://github.com/rust-lang/chalk.git", rev = "a88cad7f0a69e05ba8f40b74c58a1c229c1b2478" }
32lalrpop-intern = "0.15.1"
33
34[dev-dependencies]
35insta = "0.12.0"
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 3f44a50c4..38d66c2a7 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -6,28 +6,31 @@ use std::sync::Arc;
6 6
7use hir_def::{ 7use hir_def::{
8 adt::VariantData, 8 adt::VariantData,
9 body::{Body, BodySourceMap},
9 builtin_type::BuiltinType, 10 builtin_type::BuiltinType,
10 docs::Documentation, 11 docs::Documentation,
12 expr::{BindingAnnotation, Pat, PatId},
11 per_ns::PerNs, 13 per_ns::PerNs,
12 resolver::{HasResolver, TypeNs}, 14 resolver::HasResolver,
13 type_ref::TypeRef, 15 type_ref::{Mutability, TypeRef},
14 AstItemDef, ConstId, ContainerId, EnumId, FunctionId, HasModule, ImplId, LocalEnumVariantId, 16 AdtId, AstItemDef, ConstId, ContainerId, DefWithBodyId, EnumId, FunctionId, GenericDefId,
15 LocalImportId, LocalModuleId, LocalStructFieldId, Lookup, ModuleId, StaticId, StructId, 17 HasModule, ImplId, LocalEnumVariantId, LocalImportId, LocalModuleId, LocalStructFieldId,
16 TraitId, TypeAliasId, UnionId, 18 Lookup, ModuleId, StaticId, StructId, TraitId, TypeAliasId, UnionId,
17}; 19};
18use hir_expand::{ 20use hir_expand::{
19 diagnostics::DiagnosticSink, 21 diagnostics::DiagnosticSink,
20 name::{self, AsName}, 22 name::{self, AsName},
21 AstId, MacroDefId, 23 AstId, MacroDefId,
22}; 24};
25use hir_ty::expr::ExprValidator;
23use ra_db::{CrateId, Edition, FileId, FilePosition}; 26use ra_db::{CrateId, Edition, FileId, FilePosition};
24use ra_syntax::{ast, AstNode, SyntaxNode}; 27use ra_syntax::{ast, AstNode, SyntaxNode};
25 28
26use crate::{ 29use crate::{
27 db::{DefDatabase, HirDatabase}, 30 db::{DefDatabase, HirDatabase},
28 expr::{BindingAnnotation, Body, BodySourceMap, ExprValidator, Pat, PatId}, 31 ty::display::HirFormatter,
29 ty::{InferenceResult, Namespace, TraitRef}, 32 ty::{self, InEnvironment, InferenceResult, TraitEnvironment, Ty, TyDefId, TypeCtor, TypeWalk},
30 Either, Name, Source, Ty, 33 CallableDef, Either, HirDisplay, Name, Source,
31}; 34};
32 35
33/// hir::Crate describes a single crate. It's the main interface with which 36/// hir::Crate describes a single crate. It's the main interface with which
@@ -168,15 +171,15 @@ pub use hir_def::attr::Attrs;
168 171
169impl Module { 172impl Module {
170 pub(crate) fn new(krate: Crate, crate_module_id: LocalModuleId) -> Module { 173 pub(crate) fn new(krate: Crate, crate_module_id: LocalModuleId) -> Module {
171 Module { id: ModuleId { krate: krate.crate_id, module_id: crate_module_id } } 174 Module { id: ModuleId { krate: krate.crate_id, local_id: crate_module_id } }
172 } 175 }
173 176
174 /// Name of this module. 177 /// Name of this module.
175 pub fn name(self, db: &impl DefDatabase) -> Option<Name> { 178 pub fn name(self, db: &impl DefDatabase) -> Option<Name> {
176 let def_map = db.crate_def_map(self.id.krate); 179 let def_map = db.crate_def_map(self.id.krate);
177 let parent = def_map[self.id.module_id].parent?; 180 let parent = def_map[self.id.local_id].parent?;
178 def_map[parent].children.iter().find_map(|(name, module_id)| { 181 def_map[parent].children.iter().find_map(|(name, module_id)| {
179 if *module_id == self.id.module_id { 182 if *module_id == self.id.local_id {
180 Some(name.clone()) 183 Some(name.clone())
181 } else { 184 } else {
182 None 185 None
@@ -200,14 +203,14 @@ impl Module {
200 /// Finds a child module with the specified name. 203 /// Finds a child module with the specified name.
201 pub fn child(self, db: &impl DefDatabase, name: &Name) -> Option<Module> { 204 pub fn child(self, db: &impl DefDatabase, name: &Name) -> Option<Module> {
202 let def_map = db.crate_def_map(self.id.krate); 205 let def_map = db.crate_def_map(self.id.krate);
203 let child_id = def_map[self.id.module_id].children.get(name)?; 206 let child_id = def_map[self.id.local_id].children.get(name)?;
204 Some(self.with_module_id(*child_id)) 207 Some(self.with_module_id(*child_id))
205 } 208 }
206 209
207 /// Iterates over all child modules. 210 /// Iterates over all child modules.
208 pub fn children(self, db: &impl DefDatabase) -> impl Iterator<Item = Module> { 211 pub fn children(self, db: &impl DefDatabase) -> impl Iterator<Item = Module> {
209 let def_map = db.crate_def_map(self.id.krate); 212 let def_map = db.crate_def_map(self.id.krate);
210 let children = def_map[self.id.module_id] 213 let children = def_map[self.id.local_id]
211 .children 214 .children
212 .iter() 215 .iter()
213 .map(|(_, module_id)| self.with_module_id(*module_id)) 216 .map(|(_, module_id)| self.with_module_id(*module_id))
@@ -218,7 +221,7 @@ impl Module {
218 /// Finds a parent module. 221 /// Finds a parent module.
219 pub fn parent(self, db: &impl DefDatabase) -> Option<Module> { 222 pub fn parent(self, db: &impl DefDatabase) -> Option<Module> {
220 let def_map = db.crate_def_map(self.id.krate); 223 let def_map = db.crate_def_map(self.id.krate);
221 let parent_id = def_map[self.id.module_id].parent?; 224 let parent_id = def_map[self.id.local_id].parent?;
222 Some(self.with_module_id(parent_id)) 225 Some(self.with_module_id(parent_id))
223 } 226 }
224 227
@@ -234,7 +237,7 @@ impl Module {
234 237
235 /// Returns a `ModuleScope`: a set of items, visible in this module. 238 /// Returns a `ModuleScope`: a set of items, visible in this module.
236 pub fn scope(self, db: &impl HirDatabase) -> Vec<(Name, ScopeDef, Option<Import>)> { 239 pub fn scope(self, db: &impl HirDatabase) -> Vec<(Name, ScopeDef, Option<Import>)> {
237 db.crate_def_map(self.id.krate)[self.id.module_id] 240 db.crate_def_map(self.id.krate)[self.id.local_id]
238 .scope 241 .scope
239 .entries() 242 .entries()
240 .map(|(name, res)| { 243 .map(|(name, res)| {
@@ -244,7 +247,7 @@ impl Module {
244 } 247 }
245 248
246 pub fn diagnostics(self, db: &impl HirDatabase, sink: &mut DiagnosticSink) { 249 pub fn diagnostics(self, db: &impl HirDatabase, sink: &mut DiagnosticSink) {
247 db.crate_def_map(self.id.krate).add_diagnostics(db, self.id.module_id, sink); 250 db.crate_def_map(self.id.krate).add_diagnostics(db, self.id.local_id, sink);
248 for decl in self.declarations(db) { 251 for decl in self.declarations(db) {
249 match decl { 252 match decl {
250 crate::ModuleDef::Function(f) => f.diagnostics(db, sink), 253 crate::ModuleDef::Function(f) => f.diagnostics(db, sink),
@@ -269,12 +272,12 @@ impl Module {
269 272
270 pub fn declarations(self, db: &impl DefDatabase) -> Vec<ModuleDef> { 273 pub fn declarations(self, db: &impl DefDatabase) -> Vec<ModuleDef> {
271 let def_map = db.crate_def_map(self.id.krate); 274 let def_map = db.crate_def_map(self.id.krate);
272 def_map[self.id.module_id].scope.declarations().map(ModuleDef::from).collect() 275 def_map[self.id.local_id].scope.declarations().map(ModuleDef::from).collect()
273 } 276 }
274 277
275 pub fn impl_blocks(self, db: &impl DefDatabase) -> Vec<ImplBlock> { 278 pub fn impl_blocks(self, db: &impl DefDatabase) -> Vec<ImplBlock> {
276 let def_map = db.crate_def_map(self.id.krate); 279 let def_map = db.crate_def_map(self.id.krate);
277 def_map[self.id.module_id].impls.iter().copied().map(ImplBlock::from).collect() 280 def_map[self.id.local_id].impls.iter().copied().map(ImplBlock::from).collect()
278 } 281 }
279 282
280 fn with_module_id(self, module_id: LocalModuleId) -> Module { 283 fn with_module_id(self, module_id: LocalModuleId) -> Module {
@@ -320,14 +323,14 @@ pub struct Struct {
320 323
321impl Struct { 324impl Struct {
322 pub fn module(self, db: &impl DefDatabase) -> Module { 325 pub fn module(self, db: &impl DefDatabase) -> Module {
323 Module { id: self.id.0.module(db) } 326 Module { id: self.id.module(db) }
324 } 327 }
325 328
326 pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> { 329 pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> {
327 Some(self.module(db).krate()) 330 Some(self.module(db).krate())
328 } 331 }
329 332
330 pub fn name(self, db: &impl DefDatabase) -> Option<Name> { 333 pub fn name(self, db: &impl DefDatabase) -> Name {
331 db.struct_data(self.id.into()).name.clone() 334 db.struct_data(self.id.into()).name.clone()
332 } 335 }
333 336
@@ -349,12 +352,12 @@ impl Struct {
349 .map(|(id, _)| StructField { parent: self.into(), id }) 352 .map(|(id, _)| StructField { parent: self.into(), id })
350 } 353 }
351 354
352 pub fn ty(self, db: &impl HirDatabase) -> Ty { 355 pub fn ty(self, db: &impl HirDatabase) -> Type {
353 db.type_for_def(self.into(), Namespace::Types) 356 Type::from_def(db, self.id.module(db).krate, self.id)
354 } 357 }
355 358
356 pub fn constructor_ty(self, db: &impl HirDatabase) -> Ty { 359 pub fn constructor_ty(self, db: &impl HirDatabase) -> Ty {
357 db.type_for_def(self.into(), Namespace::Values) 360 db.value_ty(self.id.into())
358 } 361 }
359 362
360 fn variant_data(self, db: &impl DefDatabase) -> Arc<VariantData> { 363 fn variant_data(self, db: &impl DefDatabase) -> Arc<VariantData> {
@@ -368,16 +371,38 @@ pub struct Union {
368} 371}
369 372
370impl Union { 373impl Union {
371 pub fn name(self, db: &impl DefDatabase) -> Option<Name> { 374 pub fn name(self, db: &impl DefDatabase) -> Name {
372 db.struct_data(self.id.into()).name.clone() 375 db.union_data(self.id).name.clone()
373 } 376 }
374 377
375 pub fn module(self, db: &impl DefDatabase) -> Module { 378 pub fn module(self, db: &impl DefDatabase) -> Module {
376 Module { id: self.id.0.module(db) } 379 Module { id: self.id.module(db) }
377 } 380 }
378 381
379 pub fn ty(self, db: &impl HirDatabase) -> Ty { 382 pub fn ty(self, db: &impl HirDatabase) -> Type {
380 db.type_for_def(self.into(), Namespace::Types) 383 Type::from_def(db, self.id.module(db).krate, self.id)
384 }
385
386 pub fn fields(self, db: &impl HirDatabase) -> Vec<StructField> {
387 db.union_data(self.id)
388 .variant_data
389 .fields()
390 .iter()
391 .map(|(id, _)| StructField { parent: self.into(), id })
392 .collect()
393 }
394
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> {
405 db.union_data(self.id).variant_data.clone()
381 } 406 }
382} 407}
383 408
@@ -395,7 +420,7 @@ impl Enum {
395 Some(self.module(db).krate()) 420 Some(self.module(db).krate())
396 } 421 }
397 422
398 pub fn name(self, db: &impl DefDatabase) -> Option<Name> { 423 pub fn name(self, db: &impl DefDatabase) -> Name {
399 db.enum_data(self.id).name.clone() 424 db.enum_data(self.id).name.clone()
400 } 425 }
401 426
@@ -408,15 +433,12 @@ impl Enum {
408 } 433 }
409 434
410 pub fn variant(self, db: &impl DefDatabase, name: &Name) -> Option<EnumVariant> { 435 pub fn variant(self, db: &impl DefDatabase, name: &Name) -> Option<EnumVariant> {
411 db.enum_data(self.id) 436 let id = db.enum_data(self.id).variant(name)?;
412 .variants 437 Some(EnumVariant { parent: self, id })
413 .iter()
414 .find(|(_id, data)| data.name.as_ref() == Some(name))
415 .map(|(id, _)| EnumVariant { parent: self, id })
416 } 438 }
417 439
418 pub fn ty(self, db: &impl HirDatabase) -> Ty { 440 pub fn ty(self, db: &impl HirDatabase) -> Type {
419 db.type_for_def(self.into(), Namespace::Types) 441 Type::from_def(db, self.id.module(db).krate, self.id)
420 } 442 }
421} 443}
422 444
@@ -434,7 +456,7 @@ impl EnumVariant {
434 self.parent 456 self.parent
435 } 457 }
436 458
437 pub fn name(self, db: &impl DefDatabase) -> Option<Name> { 459 pub fn name(self, db: &impl DefDatabase) -> Name {
438 db.enum_data(self.parent.id).variants[self.id].name.clone() 460 db.enum_data(self.parent.id).variants[self.id].name.clone()
439 } 461 }
440 462
@@ -469,12 +491,13 @@ pub enum Adt {
469impl_froms!(Adt: Struct, Union, Enum); 491impl_froms!(Adt: Struct, Union, Enum);
470 492
471impl Adt { 493impl Adt {
472 pub fn ty(self, db: &impl HirDatabase) -> Ty { 494 pub fn has_non_default_type_params(self, db: &impl HirDatabase) -> bool {
473 match self { 495 let subst = db.generic_defaults(self.into());
474 Adt::Struct(it) => it.ty(db), 496 subst.iter().any(|ty| ty == &Ty::Unknown)
475 Adt::Union(it) => it.ty(db), 497 }
476 Adt::Enum(it) => it.ty(db), 498 pub fn ty(self, db: &impl HirDatabase) -> Type {
477 } 499 let id = AdtId::from(self);
500 Type::from_def(db, id.module(db).krate, id)
478 } 501 }
479 502
480 pub fn module(self, db: &impl DefDatabase) -> Module { 503 pub fn module(self, db: &impl DefDatabase) -> Module {
@@ -493,28 +516,24 @@ impl Adt {
493#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] 516#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
494pub enum VariantDef { 517pub enum VariantDef {
495 Struct(Struct), 518 Struct(Struct),
519 Union(Union),
496 EnumVariant(EnumVariant), 520 EnumVariant(EnumVariant),
497} 521}
498impl_froms!(VariantDef: Struct, EnumVariant); 522impl_froms!(VariantDef: Struct, Union, EnumVariant);
499 523
500impl VariantDef { 524impl VariantDef {
501 pub fn fields(self, db: &impl HirDatabase) -> Vec<StructField> { 525 pub fn fields(self, db: &impl HirDatabase) -> Vec<StructField> {
502 match self { 526 match self {
503 VariantDef::Struct(it) => it.fields(db), 527 VariantDef::Struct(it) => it.fields(db),
528 VariantDef::Union(it) => it.fields(db),
504 VariantDef::EnumVariant(it) => it.fields(db), 529 VariantDef::EnumVariant(it) => it.fields(db),
505 } 530 }
506 } 531 }
507 532
508 pub(crate) fn field(self, db: &impl HirDatabase, name: &Name) -> Option<StructField> {
509 match self {
510 VariantDef::Struct(it) => it.field(db, name),
511 VariantDef::EnumVariant(it) => it.field(db, name),
512 }
513 }
514
515 pub fn module(self, db: &impl HirDatabase) -> Module { 533 pub fn module(self, db: &impl HirDatabase) -> Module {
516 match self { 534 match self {
517 VariantDef::Struct(it) => it.module(db), 535 VariantDef::Struct(it) => it.module(db),
536 VariantDef::Union(it) => it.module(db),
518 VariantDef::EnumVariant(it) => it.module(db), 537 VariantDef::EnumVariant(it) => it.module(db),
519 } 538 }
520 } 539 }
@@ -522,6 +541,7 @@ impl VariantDef {
522 pub(crate) fn variant_data(self, db: &impl DefDatabase) -> Arc<VariantData> { 541 pub(crate) fn variant_data(self, db: &impl DefDatabase) -> Arc<VariantData> {
523 match self { 542 match self {
524 VariantDef::Struct(it) => it.variant_data(db), 543 VariantDef::Struct(it) => it.variant_data(db),
544 VariantDef::Union(it) => it.variant_data(db),
525 VariantDef::EnumVariant(it) => it.variant_data(db), 545 VariantDef::EnumVariant(it) => it.variant_data(db),
526 } 546 }
527 } 547 }
@@ -538,14 +558,6 @@ pub enum DefWithBody {
538impl_froms!(DefWithBody: Function, Const, Static); 558impl_froms!(DefWithBody: Function, Const, Static);
539 559
540impl DefWithBody { 560impl DefWithBody {
541 pub(crate) fn krate(self, db: &impl HirDatabase) -> Option<Crate> {
542 match self {
543 DefWithBody::Const(c) => c.krate(db),
544 DefWithBody::Function(f) => f.krate(db),
545 DefWithBody::Static(s) => s.krate(db),
546 }
547 }
548
549 pub fn module(self, db: &impl HirDatabase) -> Module { 561 pub fn module(self, db: &impl HirDatabase) -> Module {
550 match self { 562 match self {
551 DefWithBody::Const(c) => c.module(db), 563 DefWithBody::Const(c) => c.module(db),
@@ -590,11 +602,11 @@ impl Function {
590 } 602 }
591 603
592 pub fn ty(self, db: &impl HirDatabase) -> Ty { 604 pub fn ty(self, db: &impl HirDatabase) -> Ty {
593 db.type_for_def(self.into(), Namespace::Values) 605 db.value_ty(self.id.into())
594 } 606 }
595 607
596 pub fn infer(self, db: &impl HirDatabase) -> Arc<InferenceResult> { 608 pub fn infer(self, db: &impl HirDatabase) -> Arc<InferenceResult> {
597 db.infer(self.into()) 609 db.infer(self.id.into())
598 } 610 }
599 611
600 /// The containing impl block, if this is a method. 612 /// The containing impl block, if this is a method.
@@ -623,8 +635,8 @@ impl Function {
623 635
624 pub fn diagnostics(self, db: &impl HirDatabase, sink: &mut DiagnosticSink) { 636 pub fn diagnostics(self, db: &impl HirDatabase, sink: &mut DiagnosticSink) {
625 let infer = self.infer(db); 637 let infer = self.infer(db);
626 infer.add_diagnostics(db, self, sink); 638 infer.add_diagnostics(db, self.id, sink);
627 let mut validator = ExprValidator::new(self, infer, sink); 639 let mut validator = ExprValidator::new(self.id, infer, sink);
628 validator.validate_body(db); 640 validator.validate_body(db);
629 } 641 }
630} 642}
@@ -648,7 +660,7 @@ impl Const {
648 } 660 }
649 661
650 pub fn infer(self, db: &impl HirDatabase) -> Arc<InferenceResult> { 662 pub fn infer(self, db: &impl HirDatabase) -> Arc<InferenceResult> {
651 db.infer(self.into()) 663 db.infer(self.id.into())
652 } 664 }
653 665
654 /// The containing impl block, if this is a type alias. 666 /// The containing impl block, if this is a type alias.
@@ -691,7 +703,7 @@ impl Static {
691 } 703 }
692 704
693 pub fn infer(self, db: &impl HirDatabase) -> Arc<InferenceResult> { 705 pub fn infer(self, db: &impl HirDatabase) -> Arc<InferenceResult> {
694 db.infer(self.into()) 706 db.infer(self.id.into())
695 } 707 }
696} 708}
697 709
@@ -705,73 +717,12 @@ impl Trait {
705 Module { id: self.id.module(db) } 717 Module { id: self.id.module(db) }
706 } 718 }
707 719
708 pub fn name(self, db: &impl DefDatabase) -> Option<Name> { 720 pub fn name(self, db: &impl DefDatabase) -> Name {
709 db.trait_data(self.id).name.clone() 721 db.trait_data(self.id).name.clone()
710 } 722 }
711 723
712 pub fn items(self, db: &impl DefDatabase) -> Vec<AssocItem> { 724 pub fn items(self, db: &impl DefDatabase) -> Vec<AssocItem> {
713 db.trait_data(self.id).items.iter().map(|it| (*it).into()).collect() 725 db.trait_data(self.id).items.iter().map(|(_name, it)| (*it).into()).collect()
714 }
715
716 fn direct_super_traits(self, db: &impl HirDatabase) -> Vec<Trait> {
717 let resolver = self.id.resolver(db);
718 // returning the iterator directly doesn't easily work because of
719 // lifetime problems, but since there usually shouldn't be more than a
720 // few direct traits this should be fine (we could even use some kind of
721 // SmallVec if performance is a concern)
722 db.generic_params(self.id.into())
723 .where_predicates
724 .iter()
725 .filter_map(|pred| match &pred.type_ref {
726 TypeRef::Path(p) if p.as_ident() == Some(&name::SELF_TYPE) => pred.bound.as_path(),
727 _ => None,
728 })
729 .filter_map(|path| match resolver.resolve_path_in_type_ns_fully(db, path) {
730 Some(TypeNs::TraitId(t)) => Some(t),
731 _ => None,
732 })
733 .map(Trait::from)
734 .collect()
735 }
736
737 /// Returns an iterator over the whole super trait hierarchy (including the
738 /// trait itself).
739 pub fn all_super_traits(self, db: &impl HirDatabase) -> Vec<Trait> {
740 // we need to take care a bit here to avoid infinite loops in case of cycles
741 // (i.e. if we have `trait A: B; trait B: A;`)
742 let mut result = vec![self];
743 let mut i = 0;
744 while i < result.len() {
745 let t = result[i];
746 // yeah this is quadratic, but trait hierarchies should be flat
747 // enough that this doesn't matter
748 for tt in t.direct_super_traits(db) {
749 if !result.contains(&tt) {
750 result.push(tt);
751 }
752 }
753 i += 1;
754 }
755 result
756 }
757
758 pub fn associated_type_by_name(self, db: &impl DefDatabase, name: &Name) -> Option<TypeAlias> {
759 let trait_data = db.trait_data(self.id);
760 let res =
761 trait_data.associated_types().map(TypeAlias::from).find(|t| &t.name(db) == name)?;
762 Some(res)
763 }
764
765 pub fn associated_type_by_name_including_super_traits(
766 self,
767 db: &impl HirDatabase,
768 name: &Name,
769 ) -> Option<TypeAlias> {
770 self.all_super_traits(db).into_iter().find_map(|t| t.associated_type_by_name(db, name))
771 }
772
773 pub fn trait_ref(self, db: &impl HirDatabase) -> TraitRef {
774 TraitRef::for_trait(db, self)
775 } 726 }
776 727
777 pub fn is_auto(self, db: &impl DefDatabase) -> bool { 728 pub fn is_auto(self, db: &impl DefDatabase) -> bool {
@@ -785,6 +736,11 @@ pub struct TypeAlias {
785} 736}
786 737
787impl TypeAlias { 738impl TypeAlias {
739 pub fn has_non_default_type_params(self, db: &impl HirDatabase) -> bool {
740 let subst = db.generic_defaults(self.id.into());
741 subst.iter().any(|ty| ty == &Ty::Unknown)
742 }
743
788 pub fn module(self, db: &impl DefDatabase) -> Module { 744 pub fn module(self, db: &impl DefDatabase) -> Module {
789 Module { id: self.id.lookup(db).module(db) } 745 Module { id: self.id.lookup(db).module(db) }
790 } 746 }
@@ -821,8 +777,8 @@ impl TypeAlias {
821 db.type_alias_data(self.id).type_ref.clone() 777 db.type_alias_data(self.id).type_ref.clone()
822 } 778 }
823 779
824 pub fn ty(self, db: &impl HirDatabase) -> Ty { 780 pub fn ty(self, db: &impl HirDatabase) -> Type {
825 db.type_for_def(self.into(), Namespace::Types) 781 Type::from_def(db, self.id.lookup(db).module(db).krate, self.id)
826 } 782 }
827 783
828 pub fn name(self, db: &impl DefDatabase) -> Name { 784 pub fn name(self, db: &impl DefDatabase) -> Name {
@@ -897,16 +853,6 @@ impl_froms!(
897 Const 853 Const
898); 854);
899 855
900impl From<AssocItem> for GenericDef {
901 fn from(item: AssocItem) -> Self {
902 match item {
903 AssocItem::Function(f) => f.into(),
904 AssocItem::Const(c) => c.into(),
905 AssocItem::TypeAlias(t) => t.into(),
906 }
907 }
908}
909
910#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] 856#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
911pub struct Local { 857pub struct Local {
912 pub(crate) parent: DefWithBody, 858 pub(crate) parent: DefWithBody,
@@ -945,9 +891,14 @@ impl Local {
945 self.parent.module(db) 891 self.parent.module(db)
946 } 892 }
947 893
948 pub fn ty(self, db: &impl HirDatabase) -> Ty { 894 pub fn ty(self, db: &impl HirDatabase) -> Type {
949 let infer = db.infer(self.parent); 895 let def = DefWithBodyId::from(self.parent);
950 infer[self.pat_id].clone() 896 let infer = db.infer(def);
897 let ty = infer[self.pat_id].clone();
898 let resolver = def.resolver(db);
899 let krate = def.module(db).krate;
900 let environment = TraitEnvironment::lower(db, &resolver);
901 Type { krate, ty: InEnvironment { value: ty, environment } }
951 } 902 }
952 903
953 pub fn source(self, db: &impl HirDatabase) -> Source<Either<ast::BindPat, ast::SelfParam>> { 904 pub fn source(self, db: &impl HirDatabase) -> Source<Either<ast::BindPat, ast::SelfParam>> {
@@ -960,7 +911,7 @@ impl Local {
960 911
961#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] 912#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
962pub struct GenericParam { 913pub struct GenericParam {
963 pub(crate) parent: GenericDef, 914 pub(crate) parent: GenericDefId,
964 pub(crate) idx: u32, 915 pub(crate) idx: u32,
965} 916}
966 917
@@ -970,6 +921,15 @@ pub struct ImplBlock {
970} 921}
971 922
972impl ImplBlock { 923impl ImplBlock {
924 pub fn all_in_crate(db: &impl HirDatabase, krate: Crate) -> Vec<ImplBlock> {
925 let impls = db.impls_in_crate(krate.crate_id);
926 impls.all_impls().map(Self::from).collect()
927 }
928 pub fn for_trait(db: &impl HirDatabase, krate: Crate, trait_: Trait) -> Vec<ImplBlock> {
929 let impls = db.impls_in_crate(krate.crate_id);
930 impls.lookup_impl_blocks_for_trait(trait_.id).map(Self::from).collect()
931 }
932
973 pub fn target_trait(&self, db: &impl DefDatabase) -> Option<TypeRef> { 933 pub fn target_trait(&self, db: &impl DefDatabase) -> Option<TypeRef> {
974 db.impl_data(self.id).target_trait.clone() 934 db.impl_data(self.id).target_trait.clone()
975 } 935 }
@@ -978,13 +938,12 @@ impl ImplBlock {
978 db.impl_data(self.id).target_type.clone() 938 db.impl_data(self.id).target_type.clone()
979 } 939 }
980 940
981 pub fn target_ty(&self, db: &impl HirDatabase) -> Ty { 941 pub fn target_ty(&self, db: &impl HirDatabase) -> Type {
982 Ty::from_hir(db, &self.id.resolver(db), &self.target_type(db)) 942 let impl_data = db.impl_data(self.id);
983 } 943 let resolver = self.id.resolver(db);
984 944 let environment = TraitEnvironment::lower(db, &resolver);
985 pub fn target_trait_ref(&self, db: &impl HirDatabase) -> Option<TraitRef> { 945 let ty = Ty::from_hir(db, &resolver, &impl_data.target_type);
986 let target_ty = self.target_ty(db); 946 Type { krate: self.id.module(db).krate, ty: InEnvironment { value: ty, environment } }
987 TraitRef::from_hir(db, &self.id.resolver(db), &self.target_trait(db)?, Some(target_ty))
988 } 947 }
989 948
990 pub fn items(&self, db: &impl DefDatabase) -> Vec<AssocItem> { 949 pub fn items(&self, db: &impl DefDatabase) -> Vec<AssocItem> {
@@ -1004,6 +963,194 @@ impl ImplBlock {
1004 } 963 }
1005} 964}
1006 965
966#[derive(Clone, PartialEq, Eq, Debug)]
967pub struct Type {
968 pub(crate) krate: CrateId,
969 pub(crate) ty: InEnvironment<Ty>,
970}
971
972impl Type {
973 fn from_def(
974 db: &impl HirDatabase,
975 krate: CrateId,
976 def: impl HasResolver + Into<TyDefId>,
977 ) -> Type {
978 let resolver = def.resolver(db);
979 let environment = TraitEnvironment::lower(db, &resolver);
980 let ty = db.ty(def.into());
981 Type { krate, ty: InEnvironment { value: ty, environment } }
982 }
983
984 pub fn is_bool(&self) -> bool {
985 match &self.ty.value {
986 Ty::Apply(a_ty) => match a_ty.ctor {
987 TypeCtor::Bool => true,
988 _ => false,
989 },
990 _ => false,
991 }
992 }
993
994 pub fn is_mutable_reference(&self) -> bool {
995 match &self.ty.value {
996 Ty::Apply(a_ty) => match a_ty.ctor {
997 TypeCtor::Ref(Mutability::Mut) => true,
998 _ => false,
999 },
1000 _ => false,
1001 }
1002 }
1003
1004 pub fn is_unknown(&self) -> bool {
1005 match &self.ty.value {
1006 Ty::Unknown => true,
1007 _ => false,
1008 }
1009 }
1010
1011 // FIXME: this method is broken, as it doesn't take closures into account.
1012 pub fn as_callable(&self) -> Option<CallableDef> {
1013 Some(self.ty.value.as_callable()?.0)
1014 }
1015
1016 pub fn contains_unknown(&self) -> bool {
1017 return go(&self.ty.value);
1018
1019 fn go(ty: &Ty) -> bool {
1020 match ty {
1021 Ty::Unknown => true,
1022 Ty::Apply(a_ty) => a_ty.parameters.iter().any(go),
1023 _ => false,
1024 }
1025 }
1026 }
1027
1028 pub fn fields(&self, db: &impl HirDatabase) -> Vec<(StructField, Type)> {
1029 if let Ty::Apply(a_ty) = &self.ty.value {
1030 match a_ty.ctor {
1031 ty::TypeCtor::Adt(AdtId::StructId(s)) => {
1032 let var_def = s.into();
1033 return db
1034 .field_types(var_def)
1035 .iter()
1036 .map(|(local_id, ty)| {
1037 let def = StructField { parent: var_def.into(), id: local_id };
1038 let ty = ty.clone().subst(&a_ty.parameters);
1039 (def, self.derived(ty))
1040 })
1041 .collect();
1042 }
1043 _ => {}
1044 }
1045 };
1046 Vec::new()
1047 }
1048
1049 pub fn tuple_fields(&self, _db: &impl HirDatabase) -> Vec<Type> {
1050 let mut res = Vec::new();
1051 if let Ty::Apply(a_ty) = &self.ty.value {
1052 match a_ty.ctor {
1053 ty::TypeCtor::Tuple { .. } => {
1054 for ty in a_ty.parameters.iter() {
1055 let ty = ty.clone().subst(&a_ty.parameters);
1056 res.push(self.derived(ty));
1057 }
1058 }
1059 _ => {}
1060 }
1061 };
1062 res
1063 }
1064
1065 pub fn variant_fields(
1066 &self,
1067 db: &impl HirDatabase,
1068 def: VariantDef,
1069 ) -> Vec<(StructField, Type)> {
1070 // FIXME: check that ty and def match
1071 match &self.ty.value {
1072 Ty::Apply(a_ty) => def
1073 .fields(db)
1074 .into_iter()
1075 .map(|it| (it, self.derived(it.ty(db).subst(&a_ty.parameters))))
1076 .collect(),
1077 _ => Vec::new(),
1078 }
1079 }
1080
1081 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
1083 // FIXME check that?
1084 let canonical = crate::ty::Canonical { value: self.ty.value.clone(), num_vars: 0 };
1085 let environment = self.ty.environment.clone();
1086 let ty = InEnvironment { value: canonical, environment: environment.clone() };
1087 ty::autoderef(db, Some(self.krate), ty)
1088 .map(|canonical| canonical.value)
1089 .map(move |ty| self.derived(ty))
1090 }
1091
1092 // This would be nicer if it just returned an iterator, but that runs into
1093 // lifetime problems, because we need to borrow temp `CrateImplBlocks`.
1094 pub fn iterate_impl_items<T>(
1095 self,
1096 db: &impl HirDatabase,
1097 krate: Crate,
1098 mut callback: impl FnMut(AssocItem) -> Option<T>,
1099 ) -> Option<T> {
1100 for krate in self.ty.value.def_crates(db, krate.crate_id)? {
1101 let impls = db.impls_in_crate(krate);
1102
1103 for impl_block in impls.lookup_impl_blocks(&self.ty.value) {
1104 for &item in db.impl_data(impl_block).items.iter() {
1105 if let Some(result) = callback(item.into()) {
1106 return Some(result);
1107 }
1108 }
1109 }
1110 }
1111 None
1112 }
1113
1114 // FIXME: remove
1115 pub fn into_ty(self) -> Ty {
1116 self.ty.value
1117 }
1118
1119 pub fn as_adt(&self) -> Option<Adt> {
1120 let (adt, _subst) = self.ty.value.as_adt()?;
1121 Some(adt.into())
1122 }
1123
1124 // FIXME: provide required accessors such that it becomes implementable from outside.
1125 pub fn is_equal_for_find_impls(&self, other: &Type) -> bool {
1126 match (&self.ty.value, &other.ty.value) {
1127 (Ty::Apply(a_original_ty), Ty::Apply(ty::ApplicationTy { ctor, parameters })) => {
1128 match ctor {
1129 TypeCtor::Ref(..) => match parameters.as_single() {
1130 Ty::Apply(a_ty) => a_original_ty.ctor == a_ty.ctor,
1131 _ => false,
1132 },
1133 _ => a_original_ty.ctor == *ctor,
1134 }
1135 }
1136 _ => false,
1137 }
1138 }
1139
1140 fn derived(&self, ty: Ty) -> Type {
1141 Type {
1142 krate: self.krate,
1143 ty: InEnvironment { value: ty, environment: self.ty.environment.clone() },
1144 }
1145 }
1146}
1147
1148impl HirDisplay for Type {
1149 fn hir_fmt(&self, f: &mut HirFormatter<impl HirDatabase>) -> std::fmt::Result {
1150 self.ty.value.hir_fmt(f)
1151 }
1152}
1153
1007/// For IDE only 1154/// For IDE only
1008pub enum ScopeDef { 1155pub enum ScopeDef {
1009 ModuleDef(ModuleDef), 1156 ModuleDef(ModuleDef),
diff --git a/crates/ra_hir/src/code_model/src.rs b/crates/ra_hir/src/code_model/src.rs
index a4e317c20..bf3ee0834 100644
--- a/crates/ra_hir/src/code_model/src.rs
+++ b/crates/ra_hir/src/code_model/src.rs
@@ -22,7 +22,7 @@ impl Module {
22 /// Returns a node which defines this module. That is, a file or a `mod foo {}` with items. 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> { 23 pub fn definition_source(self, db: &impl DefDatabase) -> Source<ModuleSource> {
24 let def_map = db.crate_def_map(self.id.krate); 24 let def_map = db.crate_def_map(self.id.krate);
25 let src = def_map[self.id.module_id].definition_source(db); 25 let src = def_map[self.id.local_id].definition_source(db);
26 src.map(|it| match it { 26 src.map(|it| match it {
27 Either::A(it) => ModuleSource::SourceFile(it), 27 Either::A(it) => ModuleSource::SourceFile(it),
28 Either::B(it) => ModuleSource::Module(it), 28 Either::B(it) => ModuleSource::Module(it),
@@ -33,7 +33,7 @@ impl Module {
33 /// `None` for the crate root. 33 /// `None` for the crate root.
34 pub fn declaration_source(self, db: &impl DefDatabase) -> Option<Source<ast::Module>> { 34 pub fn declaration_source(self, db: &impl DefDatabase) -> Option<Source<ast::Module>> {
35 let def_map = db.crate_def_map(self.id.krate); 35 let def_map = db.crate_def_map(self.id.krate);
36 def_map[self.id.module_id].declaration_source(db) 36 def_map[self.id.local_id].declaration_source(db)
37 } 37 }
38} 38}
39 39
@@ -51,13 +51,13 @@ impl HasSource for StructField {
51impl HasSource for Struct { 51impl HasSource for Struct {
52 type Ast = ast::StructDef; 52 type Ast = ast::StructDef;
53 fn source(self, db: &impl DefDatabase) -> Source<ast::StructDef> { 53 fn source(self, db: &impl DefDatabase) -> Source<ast::StructDef> {
54 self.id.0.source(db) 54 self.id.source(db)
55 } 55 }
56} 56}
57impl HasSource for Union { 57impl HasSource for Union {
58 type Ast = ast::StructDef; 58 type Ast = ast::UnionDef;
59 fn source(self, db: &impl DefDatabase) -> Source<ast::StructDef> { 59 fn source(self, db: &impl DefDatabase) -> Source<ast::UnionDef> {
60 self.id.0.source(db) 60 self.id.source(db)
61 } 61 }
62} 62}
63impl HasSource for Enum { 63impl HasSource for Enum {
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs
index 5084bbacf..bfae3660b 100644
--- a/crates/ra_hir/src/db.rs
+++ b/crates/ra_hir/src/db.rs
@@ -1,130 +1,22 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use std::sync::Arc; 3pub use hir_def::db::{
4 4 BodyQuery, BodyWithSourceMapQuery, ConstDataQuery, CrateDefMapQuery, CrateLangItemsQuery,
5use ra_arena::map::ArenaMap; 5 DefDatabase, DefDatabaseStorage, DocumentationQuery, EnumDataQuery, ExprScopesQuery,
6use ra_db::salsa; 6 FunctionDataQuery, GenericParamsQuery, ImplDataQuery, InternDatabase, InternDatabaseStorage,
7 7 LangItemQuery, ModuleLangItemsQuery, RawItemsQuery, RawItemsWithSourceMapQuery,
8use crate::{ 8 StaticDataQuery, StructDataQuery, TraitDataQuery, TypeAliasDataQuery,
9 ty::{
10 method_resolution::CrateImplBlocks,
11 traits::{AssocTyValue, Impl},
12 CallableDef, FnSig, GenericPredicate, InferenceResult, Namespace, Substs, Ty, TypableDef,
13 TypeCtor,
14 },
15 Crate, DefWithBody, GenericDef, ImplBlock, Trait,
16};
17
18pub use hir_def::{
19 db::{
20 BodyQuery, BodyWithSourceMapQuery, ConstDataQuery, CrateDefMapQuery, CrateLangItemsQuery,
21 DefDatabase, DefDatabaseStorage, DocumentationQuery, EnumDataQuery, ExprScopesQuery,
22 FunctionDataQuery, GenericParamsQuery, ImplDataQuery, InternDatabase,
23 InternDatabaseStorage, LangItemQuery, ModuleLangItemsQuery, RawItemsQuery,
24 RawItemsWithSourceMapQuery, StaticDataQuery, StructDataQuery, TraitDataQuery,
25 TypeAliasDataQuery,
26 },
27 LocalStructFieldId, VariantId,
28}; 9};
29pub use hir_expand::db::{ 10pub use hir_expand::db::{
30 AstDatabase, AstDatabaseStorage, AstIdMapQuery, MacroArgQuery, MacroDefQuery, MacroExpandQuery, 11 AstDatabase, AstDatabaseStorage, AstIdMapQuery, MacroArgQuery, MacroDefQuery, MacroExpandQuery,
31 ParseMacroQuery, 12 ParseMacroQuery,
32}; 13};
33 14pub use hir_ty::db::{
34#[salsa::query_group(HirDatabaseStorage)] 15 AssociatedTyDataQuery, CallableItemSignatureQuery, FieldTypesQuery, GenericDefaultsQuery,
35#[salsa::requires(salsa::Database)] 16 GenericPredicatesQuery, HirDatabase, HirDatabaseStorage, ImplDatumQuery, ImplsForTraitQuery,
36pub trait HirDatabase: DefDatabase { 17 ImplsInCrateQuery, InferQuery, StructDatumQuery, TraitDatumQuery, TraitSolveQuery, TyQuery,
37 #[salsa::invoke(crate::ty::infer_query)] 18 ValueTyQuery,
38 fn infer(&self, def: DefWithBody) -> Arc<InferenceResult>; 19};
39
40 #[salsa::invoke(crate::ty::type_for_def)]
41 fn type_for_def(&self, def: TypableDef, ns: Namespace) -> Ty;
42
43 #[salsa::invoke(crate::ty::field_types_query)]
44 fn field_types(&self, var: VariantId) -> Arc<ArenaMap<LocalStructFieldId, Ty>>;
45
46 #[salsa::invoke(crate::ty::callable_item_sig)]
47 fn callable_item_signature(&self, def: CallableDef) -> FnSig;
48
49 #[salsa::invoke(crate::ty::generic_predicates_for_param_query)]
50 fn generic_predicates_for_param(
51 &self,
52 def: GenericDef,
53 param_idx: u32,
54 ) -> Arc<[GenericPredicate]>;
55
56 #[salsa::invoke(crate::ty::generic_predicates_query)]
57 fn generic_predicates(&self, def: GenericDef) -> Arc<[GenericPredicate]>;
58
59 #[salsa::invoke(crate::ty::generic_defaults_query)]
60 fn generic_defaults(&self, def: GenericDef) -> Substs;
61
62 #[salsa::invoke(crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query)]
63 fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>;
64
65 #[salsa::invoke(crate::ty::traits::impls_for_trait_query)]
66 fn impls_for_trait(&self, krate: Crate, trait_: Trait) -> Arc<[ImplBlock]>;
67
68 /// This provides the Chalk trait solver instance. Because Chalk always
69 /// works from a specific crate, this query is keyed on the crate; and
70 /// because Chalk does its own internal caching, the solver is wrapped in a
71 /// Mutex and the query does an untracked read internally, to make sure the
72 /// cached state is thrown away when input facts change.
73 #[salsa::invoke(crate::ty::traits::trait_solver_query)]
74 fn trait_solver(&self, krate: Crate) -> crate::ty::traits::TraitSolver;
75
76 // Interned IDs for Chalk integration
77 #[salsa::interned]
78 fn intern_type_ctor(&self, type_ctor: TypeCtor) -> crate::ty::TypeCtorId;
79 #[salsa::interned]
80 fn intern_chalk_impl(&self, impl_: Impl) -> crate::ty::traits::GlobalImplId;
81 #[salsa::interned]
82 fn intern_assoc_ty_value(
83 &self,
84 assoc_ty_value: AssocTyValue,
85 ) -> crate::ty::traits::AssocTyValueId;
86
87 #[salsa::invoke(crate::ty::traits::chalk::associated_ty_data_query)]
88 fn associated_ty_data(
89 &self,
90 id: chalk_ir::TypeId,
91 ) -> Arc<chalk_rust_ir::AssociatedTyDatum<chalk_ir::family::ChalkIr>>;
92
93 #[salsa::invoke(crate::ty::traits::chalk::trait_datum_query)]
94 fn trait_datum(
95 &self,
96 krate: Crate,
97 trait_id: chalk_ir::TraitId,
98 ) -> Arc<chalk_rust_ir::TraitDatum<chalk_ir::family::ChalkIr>>;
99
100 #[salsa::invoke(crate::ty::traits::chalk::struct_datum_query)]
101 fn struct_datum(
102 &self,
103 krate: Crate,
104 struct_id: chalk_ir::StructId,
105 ) -> Arc<chalk_rust_ir::StructDatum<chalk_ir::family::ChalkIr>>;
106
107 #[salsa::invoke(crate::ty::traits::chalk::impl_datum_query)]
108 fn impl_datum(
109 &self,
110 krate: Crate,
111 impl_id: chalk_ir::ImplId,
112 ) -> Arc<chalk_rust_ir::ImplDatum<chalk_ir::family::ChalkIr>>;
113
114 #[salsa::invoke(crate::ty::traits::chalk::associated_ty_value_query)]
115 fn associated_ty_value(
116 &self,
117 krate: Crate,
118 id: chalk_rust_ir::AssociatedTyValueId,
119 ) -> Arc<chalk_rust_ir::AssociatedTyValue<chalk_ir::family::ChalkIr>>;
120
121 #[salsa::invoke(crate::ty::traits::trait_solve_query)]
122 fn trait_solve(
123 &self,
124 krate: Crate,
125 goal: crate::ty::Canonical<crate::ty::InEnvironment<crate::ty::Obligation>>,
126 ) -> Option<crate::ty::traits::Solution>;
127}
128 20
129#[test] 21#[test]
130fn hir_database_is_object_safe() { 22fn hir_database_is_object_safe() {
diff --git a/crates/ra_hir/src/diagnostics.rs b/crates/ra_hir/src/diagnostics.rs
index dafacba70..a9040ea3d 100644
--- a/crates/ra_hir/src/diagnostics.rs
+++ b/crates/ra_hir/src/diagnostics.rs
@@ -1,88 +1,4 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2
3use std::any::Any;
4
5use hir_expand::HirFileId;
6use ra_syntax::{ast, AstNode, AstPtr, SyntaxNodePtr};
7
8use crate::{db::AstDatabase, Name, Source};
9
10pub use hir_def::diagnostics::UnresolvedModule; 2pub use hir_def::diagnostics::UnresolvedModule;
11pub use hir_expand::diagnostics::{AstDiagnostic, Diagnostic, DiagnosticSink}; 3pub use hir_expand::diagnostics::{AstDiagnostic, Diagnostic, DiagnosticSink};
12 4pub use hir_ty::diagnostics::{MissingFields, MissingOkInTailExpr, NoSuchField};
13#[derive(Debug)]
14pub struct NoSuchField {
15 pub file: HirFileId,
16 pub field: AstPtr<ast::RecordField>,
17}
18
19impl Diagnostic for NoSuchField {
20 fn message(&self) -> String {
21 "no such field".to_string()
22 }
23
24 fn source(&self) -> Source<SyntaxNodePtr> {
25 Source { file_id: self.file, value: self.field.into() }
26 }
27
28 fn as_any(&self) -> &(dyn Any + Send + 'static) {
29 self
30 }
31}
32
33#[derive(Debug)]
34pub struct MissingFields {
35 pub file: HirFileId,
36 pub field_list: AstPtr<ast::RecordFieldList>,
37 pub missed_fields: Vec<Name>,
38}
39
40impl Diagnostic for MissingFields {
41 fn message(&self) -> String {
42 "fill structure fields".to_string()
43 }
44 fn source(&self) -> Source<SyntaxNodePtr> {
45 Source { file_id: self.file, value: self.field_list.into() }
46 }
47 fn as_any(&self) -> &(dyn Any + Send + 'static) {
48 self
49 }
50}
51
52impl AstDiagnostic for MissingFields {
53 type AST = ast::RecordFieldList;
54
55 fn ast(&self, db: &impl AstDatabase) -> Self::AST {
56 let root = db.parse_or_expand(self.source().file_id).unwrap();
57 let node = self.source().value.to_node(&root);
58 ast::RecordFieldList::cast(node).unwrap()
59 }
60}
61
62#[derive(Debug)]
63pub struct MissingOkInTailExpr {
64 pub file: HirFileId,
65 pub expr: AstPtr<ast::Expr>,
66}
67
68impl Diagnostic for MissingOkInTailExpr {
69 fn message(&self) -> String {
70 "wrap return expression in Ok".to_string()
71 }
72 fn source(&self) -> Source<SyntaxNodePtr> {
73 Source { file_id: self.file, value: self.expr.into() }
74 }
75 fn as_any(&self) -> &(dyn Any + Send + 'static) {
76 self
77 }
78}
79
80impl AstDiagnostic for MissingOkInTailExpr {
81 type AST = ast::Expr;
82
83 fn ast(&self, db: &impl AstDatabase) -> Self::AST {
84 let root = db.parse_or_expand(self.file).unwrap();
85 let node = self.source().value.to_node(&root);
86 ast::Expr::cast(node).unwrap()
87 }
88}
diff --git a/crates/ra_hir/src/from_id.rs b/crates/ra_hir/src/from_id.rs
index 529ac8251..e96a18d12 100644
--- a/crates/ra_hir/src/from_id.rs
+++ b/crates/ra_hir/src/from_id.rs
@@ -4,14 +4,13 @@
4//! are splitting the hir. 4//! are splitting the hir.
5 5
6use hir_def::{ 6use hir_def::{
7 AdtId, AssocItemId, AttrDefId, ConstId, DefWithBodyId, EnumId, EnumVariantId, FunctionId, 7 AdtId, AssocItemId, AttrDefId, DefWithBodyId, EnumVariantId, GenericDefId, ModuleDefId,
8 GenericDefId, ModuleDefId, StaticId, StructFieldId, StructId, TypeAliasId, UnionId, VariantId, 8 StructFieldId, VariantId,
9}; 9};
10 10
11use crate::{ 11use crate::{
12 ty::{CallableDef, TypableDef}, 12 Adt, AssocItem, AttrDef, Crate, DefWithBody, EnumVariant, GenericDef, ModuleDef, StructField,
13 Adt, AssocItem, AttrDef, Const, Crate, DefWithBody, EnumVariant, Function, GenericDef, 13 VariantDef,
14 ModuleDef, Static, StructField, TypeAlias, VariantDef,
15}; 14};
16 15
17impl From<ra_db::CrateId> for Crate { 16impl From<ra_db::CrateId> for Crate {
@@ -138,72 +137,6 @@ impl From<GenericDef> for GenericDefId {
138 } 137 }
139} 138}
140 139
141impl From<GenericDefId> for GenericDef {
142 fn from(def: GenericDefId) -> Self {
143 match def {
144 GenericDefId::FunctionId(it) => GenericDef::Function(it.into()),
145 GenericDefId::AdtId(it) => GenericDef::Adt(it.into()),
146 GenericDefId::TraitId(it) => GenericDef::Trait(it.into()),
147 GenericDefId::TypeAliasId(it) => GenericDef::TypeAlias(it.into()),
148 GenericDefId::ImplId(it) => GenericDef::ImplBlock(it.into()),
149 GenericDefId::EnumVariantId(it) => GenericDef::EnumVariant(it.into()),
150 GenericDefId::ConstId(it) => GenericDef::Const(it.into()),
151 }
152 }
153}
154
155impl From<AdtId> for TypableDef {
156 fn from(id: AdtId) -> Self {
157 Adt::from(id).into()
158 }
159}
160
161impl From<StructId> for TypableDef {
162 fn from(id: StructId) -> Self {
163 AdtId::StructId(id).into()
164 }
165}
166
167impl From<UnionId> for TypableDef {
168 fn from(id: UnionId) -> Self {
169 AdtId::UnionId(id).into()
170 }
171}
172
173impl From<EnumId> for TypableDef {
174 fn from(id: EnumId) -> Self {
175 AdtId::EnumId(id).into()
176 }
177}
178
179impl From<EnumVariantId> for TypableDef {
180 fn from(id: EnumVariantId) -> Self {
181 EnumVariant::from(id).into()
182 }
183}
184
185impl From<TypeAliasId> for TypableDef {
186 fn from(id: TypeAliasId) -> Self {
187 TypeAlias::from(id).into()
188 }
189}
190
191impl From<FunctionId> for TypableDef {
192 fn from(id: FunctionId) -> Self {
193 Function::from(id).into()
194 }
195}
196impl From<ConstId> for TypableDef {
197 fn from(id: ConstId) -> Self {
198 Const::from(id).into()
199 }
200}
201impl From<StaticId> for TypableDef {
202 fn from(id: StaticId) -> Self {
203 Static::from(id).into()
204 }
205}
206
207impl From<Adt> for GenericDefId { 140impl From<Adt> for GenericDefId {
208 fn from(id: Adt) -> Self { 141 fn from(id: Adt) -> Self {
209 match id { 142 match id {
@@ -214,14 +147,12 @@ impl From<Adt> for GenericDefId {
214 } 147 }
215} 148}
216 149
217impl From<CallableDef> for GenericDefId { 150impl From<VariantId> for VariantDef {
218 fn from(def: CallableDef) -> Self { 151 fn from(def: VariantId) -> Self {
219 match def { 152 match def {
220 CallableDef::Function(it) => it.id.into(), 153 VariantId::StructId(it) => VariantDef::Struct(it.into()),
221 CallableDef::Struct(it) => it.id.into(), 154 VariantId::EnumVariantId(it) => VariantDef::EnumVariant(it.into()),
222 CallableDef::EnumVariant(it) => { 155 VariantId::UnionId(it) => VariantDef::Union(it.into()),
223 EnumVariantId { parent: it.parent.id, local_id: it.id }.into()
224 }
225 } 156 }
226 } 157 }
227} 158}
@@ -231,6 +162,7 @@ impl From<VariantDef> for VariantId {
231 match def { 162 match def {
232 VariantDef::Struct(it) => VariantId::StructId(it.id), 163 VariantDef::Struct(it) => VariantId::StructId(it.id),
233 VariantDef::EnumVariant(it) => VariantId::EnumVariantId(it.into()), 164 VariantDef::EnumVariant(it) => VariantId::EnumVariantId(it.into()),
165 VariantDef::Union(it) => VariantId::UnionId(it.id),
234 } 166 }
235 } 167 }
236} 168}
@@ -241,6 +173,12 @@ impl From<StructField> for StructFieldId {
241 } 173 }
242} 174}
243 175
176impl From<StructFieldId> for StructField {
177 fn from(def: StructFieldId) -> Self {
178 StructField { parent: def.parent.into(), id: def.local_id }
179 }
180}
181
244impl From<AttrDef> for AttrDefId { 182impl From<AttrDef> for AttrDefId {
245 fn from(def: AttrDef) -> Self { 183 fn from(def: AttrDef) -> Self {
246 match def { 184 match def {
@@ -257,3 +195,13 @@ impl From<AttrDef> for AttrDefId {
257 } 195 }
258 } 196 }
259} 197}
198
199impl From<AssocItem> for GenericDefId {
200 fn from(item: AssocItem) -> Self {
201 match item {
202 AssocItem::Function(f) => f.id.into(),
203 AssocItem::Const(c) => c.id.into(),
204 AssocItem::TypeAlias(t) => t.id.into(),
205 }
206 }
207}
diff --git a/crates/ra_hir/src/from_source.rs b/crates/ra_hir/src/from_source.rs
index 1e7c22774..9f7c22b21 100644
--- a/crates/ra_hir/src/from_source.rs
+++ b/crates/ra_hir/src/from_source.rs
@@ -1,6 +1,6 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use hir_def::{AstItemDef, LocationCtx, ModuleId, StructId, StructOrUnionId, UnionId}; 3use hir_def::{AstItemDef, LocationCtx, ModuleId};
4use hir_expand::{name::AsName, AstId, MacroDefId, MacroDefKind}; 4use hir_expand::{name::AsName, AstId, MacroDefId, MacroDefKind};
5use ra_syntax::{ 5use ra_syntax::{
6 ast::{self, AstNode, NameOwner}, 6 ast::{self, AstNode, NameOwner},
@@ -19,19 +19,18 @@ pub trait FromSource: Sized {
19 fn from_source(db: &(impl DefDatabase + AstDatabase), src: Source<Self::Ast>) -> Option<Self>; 19 fn from_source(db: &(impl DefDatabase + AstDatabase), src: Source<Self::Ast>) -> Option<Self>;
20} 20}
21 21
22// FIXIME: these two impls are wrong, `ast::StructDef` might produce either a struct or a union
23impl FromSource for Struct { 22impl FromSource for Struct {
24 type Ast = ast::StructDef; 23 type Ast = ast::StructDef;
25 fn from_source(db: &(impl DefDatabase + AstDatabase), src: Source<Self::Ast>) -> Option<Self> { 24 fn from_source(db: &(impl DefDatabase + AstDatabase), src: Source<Self::Ast>) -> Option<Self> {
26 let id: StructOrUnionId = from_source(db, src)?; 25 let id = from_source(db, src)?;
27 Some(Struct { id: StructId(id) }) 26 Some(Struct { id })
28 } 27 }
29} 28}
30impl FromSource for Union { 29impl FromSource for Union {
31 type Ast = ast::StructDef; 30 type Ast = ast::UnionDef;
32 fn from_source(db: &(impl DefDatabase + AstDatabase), src: Source<Self::Ast>) -> Option<Self> { 31 fn from_source(db: &(impl DefDatabase + AstDatabase), src: Source<Self::Ast>) -> Option<Self> {
33 let id: StructOrUnionId = from_source(db, src)?; 32 let id = from_source(db, src)?;
34 Some(Union { id: UnionId(id) }) 33 Some(Union { id })
35 } 34 }
36} 35}
37impl FromSource for Enum { 36impl FromSource for Enum {
@@ -263,13 +262,12 @@ impl Module {
263 262
264 let original_file = src.file_id.original_file(db); 263 let original_file = src.file_id.original_file(db);
265 264
266 let (krate, module_id) = 265 let (krate, local_id) = db.relevant_crates(original_file).iter().find_map(|&crate_id| {
267 db.relevant_crates(original_file).iter().find_map(|&crate_id| { 266 let crate_def_map = db.crate_def_map(crate_id);
268 let crate_def_map = db.crate_def_map(crate_id); 267 let local_id = crate_def_map.modules_for_file(original_file).next()?;
269 let local_module_id = crate_def_map.modules_for_file(original_file).next()?; 268 Some((crate_id, local_id))
270 Some((crate_id, local_module_id)) 269 })?;
271 })?; 270 Some(Module { id: ModuleId { krate, local_id } })
272 Some(Module { id: ModuleId { krate, module_id } })
273 } 271 }
274} 272}
275 273
diff --git a/crates/ra_hir/src/lib.rs b/crates/ra_hir/src/lib.rs
index 843ce6a88..3c12c61f0 100644
--- a/crates/ra_hir/src/lib.rs
+++ b/crates/ra_hir/src/lib.rs
@@ -32,28 +32,20 @@ pub mod db;
32pub mod source_binder; 32pub mod source_binder;
33 33
34mod ty; 34mod ty;
35mod expr;
36pub mod diagnostics; 35pub mod diagnostics;
37mod util;
38 36
39mod from_id; 37mod from_id;
40mod code_model; 38mod code_model;
41 39
42pub mod from_source; 40pub mod from_source;
43 41
44#[cfg(test)]
45mod test_db;
46#[cfg(test)]
47mod marks;
48
49pub use crate::{ 42pub use crate::{
50 code_model::{ 43 code_model::{
51 src::HasSource, Adt, AssocItem, AttrDef, Const, Container, Crate, CrateDependency, 44 src::HasSource, Adt, AssocItem, AttrDef, Const, Container, Crate, CrateDependency,
52 DefWithBody, Docs, Enum, EnumVariant, FieldSource, Function, GenericDef, GenericParam, 45 DefWithBody, Docs, Enum, EnumVariant, FieldSource, Function, GenericDef, GenericParam,
53 HasAttrs, ImplBlock, Import, Local, MacroDef, Module, ModuleDef, ModuleSource, ScopeDef, 46 HasAttrs, ImplBlock, Import, Local, MacroDef, Module, ModuleDef, ModuleSource, ScopeDef,
54 Static, Struct, StructField, Trait, TypeAlias, Union, VariantDef, 47 Static, Struct, StructField, Trait, Type, TypeAlias, Union, VariantDef,
55 }, 48 },
56 expr::ExprScopes,
57 from_source::FromSource, 49 from_source::FromSource,
58 source_binder::{PathResolution, ScopeEntryWithSyntax, SourceAnalyzer}, 50 source_binder::{PathResolution, ScopeEntryWithSyntax, SourceAnalyzer},
59 ty::{ 51 ty::{
@@ -64,6 +56,7 @@ pub use crate::{
64}; 56};
65 57
66pub use hir_def::{ 58pub use hir_def::{
59 body::scope::ExprScopes,
67 builtin_type::BuiltinType, 60 builtin_type::BuiltinType,
68 docs::Documentation, 61 docs::Documentation,
69 path::{Path, PathKind}, 62 path::{Path, PathKind},
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 31390bb7f..76c493f1a 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -8,13 +8,17 @@
8use std::sync::Arc; 8use std::sync::Arc;
9 9
10use hir_def::{ 10use hir_def::{
11 body::{
12 scope::{ExprScopes, ScopeId},
13 BodySourceMap,
14 },
11 expr::{ExprId, PatId}, 15 expr::{ExprId, PatId},
12 path::known, 16 path::known,
13 resolver::{self, resolver_for_scope, HasResolver, Resolver, TypeNs, ValueNs}, 17 resolver::{self, resolver_for_scope, HasResolver, Resolver, TypeNs, ValueNs},
14 DefWithBodyId, 18 AssocItemId, DefWithBodyId,
15}; 19};
16use hir_expand::{ 20use hir_expand::{
17 name::AsName, AstId, HirFileId, MacroCallId, MacroCallLoc, MacroFileKind, Source, 21 hygiene::Hygiene, name::AsName, AstId, HirFileId, MacroCallId, MacroFileKind, Source,
18}; 22};
19use ra_syntax::{ 23use ra_syntax::{
20 ast::{self, AstNode}, 24 ast::{self, AstNode},
@@ -25,10 +29,12 @@ use ra_syntax::{
25 29
26use crate::{ 30use crate::{
27 db::HirDatabase, 31 db::HirDatabase,
28 expr::{BodySourceMap, ExprScopes, ScopeId}, 32 ty::{
29 ty::method_resolution::{self, implements_trait}, 33 method_resolution::{self, implements_trait},
34 InEnvironment, TraitEnvironment, Ty,
35 },
30 Adt, AssocItem, Const, DefWithBody, Either, Enum, EnumVariant, FromSource, Function, 36 Adt, AssocItem, Const, DefWithBody, Either, Enum, EnumVariant, FromSource, Function,
31 GenericParam, Local, MacroDef, Name, Path, ScopeDef, Static, Struct, Trait, Ty, TypeAlias, 37 GenericParam, Local, MacroDef, Name, Path, ScopeDef, Static, Struct, Trait, Type, TypeAlias,
32}; 38};
33 39
34fn try_get_resolver_for_node(db: &impl HirDatabase, node: Source<&SyntaxNode>) -> Option<Resolver> { 40fn try_get_resolver_for_node(db: &impl HirDatabase, node: Source<&SyntaxNode>) -> Option<Resolver> {
@@ -88,7 +94,7 @@ pub struct SourceAnalyzer {
88 body_owner: Option<DefWithBody>, 94 body_owner: Option<DefWithBody>,
89 body_source_map: Option<Arc<BodySourceMap>>, 95 body_source_map: Option<Arc<BodySourceMap>>,
90 infer: Option<Arc<crate::ty::InferenceResult>>, 96 infer: Option<Arc<crate::ty::InferenceResult>>,
91 scopes: Option<Arc<crate::expr::ExprScopes>>, 97 scopes: Option<Arc<ExprScopes>>,
92} 98}
93 99
94#[derive(Debug, Clone, PartialEq, Eq)] 100#[derive(Debug, Clone, PartialEq, Eq)]
@@ -165,7 +171,7 @@ impl SourceAnalyzer {
165 resolver, 171 resolver,
166 body_owner: Some(def), 172 body_owner: Some(def),
167 body_source_map: Some(source_map), 173 body_source_map: Some(source_map),
168 infer: Some(db.infer(def)), 174 infer: Some(db.infer(def.into())),
169 scopes: Some(scopes), 175 scopes: Some(scopes),
170 file_id: node.file_id, 176 file_id: node.file_id,
171 } 177 }
@@ -195,48 +201,52 @@ impl SourceAnalyzer {
195 self.body_source_map.as_ref()?.node_pat(src) 201 self.body_source_map.as_ref()?.node_pat(src)
196 } 202 }
197 203
198 pub fn type_of(&self, _db: &impl HirDatabase, expr: &ast::Expr) -> Option<crate::Ty> { 204 pub fn type_of(&self, db: &impl HirDatabase, expr: &ast::Expr) -> Option<Type> {
199 let expr_id = self.expr_id(expr)?; 205 let expr_id = self.expr_id(expr)?;
200 Some(self.infer.as_ref()?[expr_id].clone()) 206 let ty = self.infer.as_ref()?[expr_id].clone();
207 let environment = TraitEnvironment::lower(db, &self.resolver);
208 Some(Type { krate: self.resolver.krate()?, ty: InEnvironment { value: ty, environment } })
201 } 209 }
202 210
203 pub fn type_of_pat(&self, _db: &impl HirDatabase, pat: &ast::Pat) -> Option<crate::Ty> { 211 pub fn type_of_pat(&self, db: &impl HirDatabase, pat: &ast::Pat) -> Option<Type> {
204 let pat_id = self.pat_id(pat)?; 212 let pat_id = self.pat_id(pat)?;
205 Some(self.infer.as_ref()?[pat_id].clone()) 213 let ty = self.infer.as_ref()?[pat_id].clone();
214 let environment = TraitEnvironment::lower(db, &self.resolver);
215 Some(Type { krate: self.resolver.krate()?, ty: InEnvironment { value: ty, environment } })
206 } 216 }
207 217
208 pub fn resolve_method_call(&self, call: &ast::MethodCallExpr) -> Option<Function> { 218 pub fn resolve_method_call(&self, call: &ast::MethodCallExpr) -> Option<Function> {
209 let expr_id = self.expr_id(&call.clone().into())?; 219 let expr_id = self.expr_id(&call.clone().into())?;
210 self.infer.as_ref()?.method_resolution(expr_id) 220 self.infer.as_ref()?.method_resolution(expr_id).map(Function::from)
211 } 221 }
212 222
213 pub fn resolve_field(&self, field: &ast::FieldExpr) -> Option<crate::StructField> { 223 pub fn resolve_field(&self, field: &ast::FieldExpr) -> Option<crate::StructField> {
214 let expr_id = self.expr_id(&field.clone().into())?; 224 let expr_id = self.expr_id(&field.clone().into())?;
215 self.infer.as_ref()?.field_resolution(expr_id) 225 self.infer.as_ref()?.field_resolution(expr_id).map(|it| it.into())
216 } 226 }
217 227
218 pub fn resolve_record_field(&self, field: &ast::RecordField) -> Option<crate::StructField> { 228 pub fn resolve_record_field(&self, field: &ast::RecordField) -> Option<crate::StructField> {
219 let expr_id = self.expr_id(&field.expr()?)?; 229 let expr_id = self.expr_id(&field.expr()?)?;
220 self.infer.as_ref()?.record_field_resolution(expr_id) 230 self.infer.as_ref()?.record_field_resolution(expr_id).map(|it| it.into())
221 } 231 }
222 232
223 pub fn resolve_record_literal(&self, record_lit: &ast::RecordLit) -> Option<crate::VariantDef> { 233 pub fn resolve_record_literal(&self, record_lit: &ast::RecordLit) -> Option<crate::VariantDef> {
224 let expr_id = self.expr_id(&record_lit.clone().into())?; 234 let expr_id = self.expr_id(&record_lit.clone().into())?;
225 self.infer.as_ref()?.variant_resolution_for_expr(expr_id) 235 self.infer.as_ref()?.variant_resolution_for_expr(expr_id).map(|it| it.into())
226 } 236 }
227 237
228 pub fn resolve_record_pattern(&self, record_pat: &ast::RecordPat) -> Option<crate::VariantDef> { 238 pub fn resolve_record_pattern(&self, record_pat: &ast::RecordPat) -> Option<crate::VariantDef> {
229 let pat_id = self.pat_id(&record_pat.clone().into())?; 239 let pat_id = self.pat_id(&record_pat.clone().into())?;
230 self.infer.as_ref()?.variant_resolution_for_pat(pat_id) 240 self.infer.as_ref()?.variant_resolution_for_pat(pat_id).map(|it| it.into())
231 } 241 }
232 242
233 pub fn resolve_macro_call( 243 pub fn resolve_macro_call(
234 &self, 244 &self,
235 db: &impl HirDatabase, 245 db: &impl HirDatabase,
236 macro_call: &ast::MacroCall, 246 macro_call: Source<&ast::MacroCall>,
237 ) -> Option<MacroDef> { 247 ) -> Option<MacroDef> {
238 // This must be a normal source file rather than macro file. 248 let hygiene = Hygiene::new(db, macro_call.file_id);
239 let path = macro_call.path().and_then(Path::from_ast)?; 249 let path = macro_call.value.path().and_then(