aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/infer
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-04-16 13:50:19 +0100
committerGitHub <[email protected]>2020-04-16 13:50:19 +0100
commit7d60a446fca0923f698c4b8d10236ae246012f4e (patch)
tree266feed101e657c3cc494f19843c65e19f29fe31 /crates/ra_hir_ty/src/infer
parent364415b7d66bc9d42f21181d7f642e9f911c4711 (diff)
parent39fe3a6486a2cbdf00bce8bd4861a900e0ff5811 (diff)
Merge #3990
3990: Switch to Chalk recursive solver r=matklad a=flodiebold Before: ``` Expressions of unknown type: 5526 (3%) Expressions of partially unknown type: 5415 (3%) ``` After: ``` Expressions of unknown type: 4600 (2%) Expressions of partially unknown type: 4645 (2%) ``` On the other hand, ``` './target/release/rust-analyzer analysis-stats -q . # old solver' ran 1.24 ± 0.04 times faster than 'rust-analyzer analysis-stats -q . # new solver' ``` I think part of this just comes from the fact that we're inferring more types now; but apart from that, it should be possible to improve the performance a bunch, and I'll make looking into that a priority. Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_hir_ty/src/infer')
-rw-r--r--crates/ra_hir_ty/src/infer/unify.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/infer/unify.rs b/crates/ra_hir_ty/src/infer/unify.rs
index ac25f8a80..5f6cea8d3 100644
--- a/crates/ra_hir_ty/src/infer/unify.rs
+++ b/crates/ra_hir_ty/src/infer/unify.rs
@@ -32,6 +32,7 @@ where
32 var_stack: Vec<TypeVarId>, 32 var_stack: Vec<TypeVarId>,
33} 33}
34 34
35#[derive(Debug)]
35pub(super) struct Canonicalized<T> { 36pub(super) struct Canonicalized<T> {
36 pub value: Canonical<T>, 37 pub value: Canonical<T>,
37 free_vars: Vec<InferTy>, 38 free_vars: Vec<InferTy>,