diff options
author | Florian Diebold <[email protected]> | 2021-04-03 21:18:02 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-04 12:16:38 +0100 |
commit | 5d2b488aeb17410aec3b89eac69038c51f332448 (patch) | |
tree | 30ef50eb5dc4e8c572c6bec969ce96b3ed2f3e68 /crates/hir_ty/src/infer | |
parent | 77333a571ffb401a6765bbc80dea082ad08238d9 (diff) |
Replace remaining uses of Substitution::build_for_def
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r-- | crates/hir_ty/src/infer/coerce.rs | 5 | ||||
-rw-r--r-- | crates/hir_ty/src/infer/path.rs | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/crates/hir_ty/src/infer/coerce.rs b/crates/hir_ty/src/infer/coerce.rs index ed8c677a8..028a4d568 100644 --- a/crates/hir_ty/src/infer/coerce.rs +++ b/crates/hir_ty/src/infer/coerce.rs | |||
@@ -7,10 +7,7 @@ | |||
7 | use chalk_ir::{cast::Cast, Mutability, TyVariableKind}; | 7 | use chalk_ir::{cast::Cast, Mutability, TyVariableKind}; |
8 | use hir_def::lang_item::LangItemTarget; | 8 | use hir_def::lang_item::LangItemTarget; |
9 | 9 | ||
10 | use crate::{ | 10 | use crate::{autoderef, traits::Solution, Interner, Ty, TyBuilder, TyKind}; |
11 | autoderef, traits::Solution, Interner, Ty, | ||
12 | TyBuilder, TyKind, | ||
13 | }; | ||
14 | 11 | ||
15 | use super::{InEnvironment, InferenceContext}; | 12 | use super::{InEnvironment, InferenceContext}; |
16 | 13 | ||
diff --git a/crates/hir_ty/src/infer/path.rs b/crates/hir_ty/src/infer/path.rs index 282dd499f..c9219776b 100644 --- a/crates/hir_ty/src/infer/path.rs +++ b/crates/hir_ty/src/infer/path.rs | |||
@@ -243,7 +243,7 @@ impl<'a> InferenceContext<'a> { | |||
243 | }; | 243 | }; |
244 | let substs = match container { | 244 | let substs = match container { |
245 | AssocContainerId::ImplId(impl_id) => { | 245 | AssocContainerId::ImplId(impl_id) => { |
246 | let impl_substs = Substitution::build_for_def(self.db, impl_id) | 246 | let impl_substs = TyBuilder::subst_for_def(self.db, impl_id) |
247 | .fill(iter::repeat_with(|| self.table.new_type_var())) | 247 | .fill(iter::repeat_with(|| self.table.new_type_var())) |
248 | .build(); | 248 | .build(); |
249 | let impl_self_ty = self.db.impl_self_ty(impl_id).subst(&impl_substs); | 249 | let impl_self_ty = self.db.impl_self_ty(impl_id).subst(&impl_substs); |