diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-16 13:50:19 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-16 13:50:19 +0100 |
commit | 7d60a446fca0923f698c4b8d10236ae246012f4e (patch) | |
tree | 266feed101e657c3cc494f19843c65e19f29fe31 /crates/ra_hir_ty/src/traits | |
parent | 364415b7d66bc9d42f21181d7f642e9f911c4711 (diff) | |
parent | 39fe3a6486a2cbdf00bce8bd4861a900e0ff5811 (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/traits')
-rw-r--r-- | crates/ra_hir_ty/src/traits/chalk.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir_ty/src/traits/chalk.rs b/crates/ra_hir_ty/src/traits/chalk.rs index b43e2a539..60d70d18e 100644 --- a/crates/ra_hir_ty/src/traits/chalk.rs +++ b/crates/ra_hir_ty/src/traits/chalk.rs | |||
@@ -511,13 +511,13 @@ impl ToChalk for ProjectionTy { | |||
511 | } | 511 | } |
512 | 512 | ||
513 | impl ToChalk for super::ProjectionPredicate { | 513 | impl ToChalk for super::ProjectionPredicate { |
514 | type Chalk = chalk_ir::Normalize<Interner>; | 514 | type Chalk = chalk_ir::AliasEq<Interner>; |
515 | 515 | ||
516 | fn to_chalk(self, db: &dyn HirDatabase) -> chalk_ir::Normalize<Interner> { | 516 | fn to_chalk(self, db: &dyn HirDatabase) -> chalk_ir::AliasEq<Interner> { |
517 | chalk_ir::Normalize { alias: self.projection_ty.to_chalk(db), ty: self.ty.to_chalk(db) } | 517 | chalk_ir::AliasEq { alias: self.projection_ty.to_chalk(db), ty: self.ty.to_chalk(db) } |
518 | } | 518 | } |
519 | 519 | ||
520 | fn from_chalk(_db: &dyn HirDatabase, _normalize: chalk_ir::Normalize<Interner>) -> Self { | 520 | fn from_chalk(_db: &dyn HirDatabase, _normalize: chalk_ir::AliasEq<Interner>) -> Self { |
521 | unimplemented!() | 521 | unimplemented!() |
522 | } | 522 | } |
523 | } | 523 | } |