aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/traits
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-04-07 18:35:24 +0100
committerFlorian Diebold <[email protected]>2021-04-09 10:21:31 +0100
commitfdd721e9ef4d330351769a7498d459a198bf0a0b (patch)
tree5faf803211bb427d97d82e2e44ddc1b4ae6ca3c4 /crates/hir_ty/src/traits
parent354151df3556c5e2989746aa01a5aeb620ee9baa (diff)
Improve indexing of impls
Store impls for e.g. &Foo with the ones for Foo instead of the big "other" bucket. This can improve performance and simplifies the HIR impl search a bit.
Diffstat (limited to 'crates/hir_ty/src/traits')
-rw-r--r--crates/hir_ty/src/traits/chalk.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_ty/src/traits/chalk.rs b/crates/hir_ty/src/traits/chalk.rs
index b8c390b2e..cd511477b 100644
--- a/crates/hir_ty/src/traits/chalk.rs
+++ b/crates/hir_ty/src/traits/chalk.rs
@@ -101,7 +101,7 @@ impl<'a> chalk_solve::RustIrDatabase<Interner> for ChalkContext<'a> {
101 None 101 None
102 } 102 }
103 103
104 let self_ty_fp = TyFingerprint::for_impl(&ty); 104 let self_ty_fp = TyFingerprint::for_trait_impl(&ty);
105 let fps: &[TyFingerprint] = match binder_kind(&ty, binders) { 105 let fps: &[TyFingerprint] = match binder_kind(&ty, binders) {
106 Some(chalk_ir::TyVariableKind::Integer) => &ALL_INT_FPS, 106 Some(chalk_ir::TyVariableKind::Integer) => &ALL_INT_FPS,
107 Some(chalk_ir::TyVariableKind::Float) => &ALL_FLOAT_FPS, 107 Some(chalk_ir::TyVariableKind::Float) => &ALL_FLOAT_FPS,