From 05eba0db3dd76f016aabdd49af6211e70a1812ed Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Mon, 5 Apr 2021 18:39:53 +0200 Subject: Binders::subst -> substitute --- crates/hir/src/display.rs | 2 +- crates/hir/src/lib.rs | 6 +++--- crates/hir/src/source_analyzer.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/hir') diff --git a/crates/hir/src/display.rs b/crates/hir/src/display.rs index 993772aac..d4e477a85 100644 --- a/crates/hir/src/display.rs +++ b/crates/hir/src/display.rs @@ -235,7 +235,7 @@ impl HirDisplay for TypeParam { write!(f, "{}", self.name(f.db))?; let bounds = f.db.generic_predicates_for_param(self.id); let substs = TyBuilder::type_params_subst(f.db, self.id.parent); - let predicates = bounds.iter().cloned().map(|b| b.subst(&substs)).collect::>(); + let predicates = bounds.iter().cloned().map(|b| b.substitute(&substs)).collect::>(); if !(predicates.is_empty() || f.omit_verbose_types()) { write_bounds_like_dyn_trait_with_prefix(":", &predicates, f)?; } diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index ccfe348a4..add1b55c2 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -516,7 +516,7 @@ impl Field { VariantDef::Variant(it) => it.parent.id.into(), }; let substs = TyBuilder::type_params_subst(db, generic_def_id); - let ty = db.field_types(var_id)[self.id].clone().subst(&substs); + let ty = db.field_types(var_id)[self.id].clone().substitute(&substs); Type::new(db, self.parent.module(db).id.krate(), var_id, ty) } @@ -1503,7 +1503,7 @@ impl TypeParam { let krate = self.id.parent.module(db.upcast()).krate(); let ty = params.get(local_idx)?.clone(); let subst = TyBuilder::type_params_subst(db, self.id.parent); - let ty = ty.subst(&subst.prefix(local_idx)); + let ty = ty.substitute(&subst.prefix(local_idx)); Some(Type::new_with_resolver_inner(db, krate, &resolver, ty)) } } @@ -1916,7 +1916,7 @@ impl Type { .iter() .map(|(local_id, ty)| { let def = Field { parent: variant_id.into(), id: local_id }; - let ty = ty.clone().subst(substs); + let ty = ty.clone().substitute(substs); (def, self.derived(ty)) }) .collect() diff --git a/crates/hir/src/source_analyzer.rs b/crates/hir/src/source_analyzer.rs index 8e9ea0a03..82807ea09 100644 --- a/crates/hir/src/source_analyzer.rs +++ b/crates/hir/src/source_analyzer.rs @@ -339,7 +339,7 @@ impl SourceAnalyzer { .into_iter() .map(|local_id| { let field = FieldId { parent: variant, local_id }; - let ty = field_types[local_id].clone().subst(substs); + let ty = field_types[local_id].clone().substitute(substs); (field.into(), Type::new_with_resolver_inner(db, krate, &self.resolver, ty)) }) .collect() -- cgit v1.2.3