diff options
author | Florian Diebold <[email protected]> | 2021-03-15 20:02:34 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-03-16 16:58:17 +0000 |
commit | ce2cae45b5242d59b744018dd79bc2ab74670edc (patch) | |
tree | dc4ed41e25efae7b6f76fcf18b6b6eb68170e7a9 /crates/hir_ty/src/infer.rs | |
parent | 00c80b208bcbe52b13bbd03cb62e24b2d2075edf (diff) |
Rename Substs -> Substitution
Diffstat (limited to 'crates/hir_ty/src/infer.rs')
-rw-r--r-- | crates/hir_ty/src/infer.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs index 9c385b845..2610c9279 100644 --- a/crates/hir_ty/src/infer.rs +++ b/crates/hir_ty/src/infer.rs | |||
@@ -38,7 +38,7 @@ use syntax::SmolStr; | |||
38 | 38 | ||
39 | use super::{ | 39 | use super::{ |
40 | traits::{Guidance, Obligation, ProjectionPredicate, Solution}, | 40 | traits::{Guidance, Obligation, ProjectionPredicate, Solution}, |
41 | InEnvironment, ProjectionTy, Substs, TraitEnvironment, TraitRef, Ty, TypeWalk, | 41 | InEnvironment, ProjectionTy, Substitution, TraitEnvironment, TraitRef, Ty, TypeWalk, |
42 | }; | 42 | }; |
43 | use crate::{ | 43 | use crate::{ |
44 | db::HirDatabase, infer::diagnostics::InferenceDiagnostic, lower::ImplTraitLoweringMode, | 44 | db::HirDatabase, infer::diagnostics::InferenceDiagnostic, lower::ImplTraitLoweringMode, |
@@ -390,7 +390,7 @@ impl<'a> InferenceContext<'a> { | |||
390 | _ => panic!("resolve_associated_type called with non-associated type"), | 390 | _ => panic!("resolve_associated_type called with non-associated type"), |
391 | }; | 391 | }; |
392 | let ty = self.table.new_type_var(); | 392 | let ty = self.table.new_type_var(); |
393 | let substs = Substs::build_for_def(self.db, res_assoc_ty) | 393 | let substs = Substitution::build_for_def(self.db, res_assoc_ty) |
394 | .push(inner_ty) | 394 | .push(inner_ty) |
395 | .fill(params.iter().cloned()) | 395 | .fill(params.iter().cloned()) |
396 | .build(); | 396 | .build(); |
@@ -469,7 +469,7 @@ impl<'a> InferenceContext<'a> { | |||
469 | } | 469 | } |
470 | TypeNs::SelfType(impl_id) => { | 470 | TypeNs::SelfType(impl_id) => { |
471 | let generics = crate::utils::generics(self.db.upcast(), impl_id.into()); | 471 | let generics = crate::utils::generics(self.db.upcast(), impl_id.into()); |
472 | let substs = Substs::type_params_for_generics(self.db, &generics); | 472 | let substs = Substitution::type_params_for_generics(self.db, &generics); |
473 | let ty = self.db.impl_self_ty(impl_id).subst(&substs); | 473 | let ty = self.db.impl_self_ty(impl_id).subst(&substs); |
474 | match unresolved { | 474 | match unresolved { |
475 | None => { | 475 | None => { |
@@ -496,7 +496,7 @@ impl<'a> InferenceContext<'a> { | |||
496 | } | 496 | } |
497 | } | 497 | } |
498 | TypeNs::TypeAliasId(it) => { | 498 | TypeNs::TypeAliasId(it) => { |
499 | let substs = Substs::build_for_def(self.db, it) | 499 | let substs = Substitution::build_for_def(self.db, it) |
500 | .fill(std::iter::repeat_with(|| self.table.new_type_var())) | 500 | .fill(std::iter::repeat_with(|| self.table.new_type_var())) |
501 | .build(); | 501 | .build(); |
502 | let ty = self.db.ty(it.into()).subst(&substs); | 502 | let ty = self.db.ty(it.into()).subst(&substs); |