From 8e8d2ffecbc9e260ee5f0d37ba057b660e16076f Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Fri, 26 Jun 2020 16:36:59 +0200 Subject: (Partially) fix handling of type params depending on type params If the first type parameter gets inferred, that's still not handled correctly; it'll require some more refactoring: E.g. if we have `Thing T>` and then instantiate `Thing<_>`, that gets turned into `Thing<_, fn() -> _>` before the `_` is instantiated into a type variable -- so afterwards, we have two type variables without any connection to each other. --- crates/ra_hir_ty/src/db.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir_ty/src/db.rs') diff --git a/crates/ra_hir_ty/src/db.rs b/crates/ra_hir_ty/src/db.rs index 7889b8d2c..cad553273 100644 --- a/crates/ra_hir_ty/src/db.rs +++ b/crates/ra_hir_ty/src/db.rs @@ -14,7 +14,7 @@ use crate::{ method_resolution::CrateImplDefs, traits::{chalk, AssocTyValue, Impl}, Binders, CallableDef, GenericPredicate, InferenceResult, OpaqueTyId, PolyFnSig, - ReturnTypeImplTraits, Substs, TraitRef, Ty, TyDefId, TypeCtor, ValueTyDefId, + ReturnTypeImplTraits, TraitRef, Ty, TyDefId, TypeCtor, ValueTyDefId, }; use hir_expand::name::Name; @@ -65,7 +65,7 @@ pub trait HirDatabase: DefDatabase + Upcast { fn generic_predicates(&self, def: GenericDefId) -> Arc<[Binders]>; #[salsa::invoke(crate::lower::generic_defaults_query)] - fn generic_defaults(&self, def: GenericDefId) -> Substs; + fn generic_defaults(&self, def: GenericDefId) -> Arc<[Binders]>; #[salsa::invoke(crate::method_resolution::CrateImplDefs::impls_in_crate_query)] fn impls_in_crate(&self, krate: CrateId) -> Arc; -- cgit v1.2.3