From 584d1c9e5bc39402e2855d0ffa9394ae5a066060 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 4 Apr 2021 12:48:10 +0200 Subject: Replace last uses of SubstsBuilder by TyBuilder --- crates/hir_ty/src/infer/path.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'crates/hir_ty/src/infer/path.rs') diff --git a/crates/hir_ty/src/infer/path.rs b/crates/hir_ty/src/infer/path.rs index c9219776b..d55ae4900 100644 --- a/crates/hir_ty/src/infer/path.rs +++ b/crates/hir_ty/src/infer/path.rs @@ -93,16 +93,13 @@ impl<'a> InferenceContext<'a> { ValueNs::GenericParam(it) => return Some(self.db.const_param_ty(it)), }; - let ty = self.db.value_ty(typable); - // self_subst is just for the parent let parent_substs = self_subst.unwrap_or_else(|| Substitution::empty(&Interner)); let ctx = crate::lower::TyLoweringContext::new(self.db, &self.resolver); let substs = ctx.substs_from_path(path, typable, true); - let full_substs = Substitution::builder(substs.len(&Interner)) + let ty = TyBuilder::value_ty(self.db, typable) .use_parent_substs(&parent_substs) .fill(substs.interned(&Interner)[parent_substs.len(&Interner)..].iter().cloned()) .build(); - let ty = ty.subst(&full_substs); Some(ty) } -- cgit v1.2.3