diff options
Diffstat (limited to 'crates/hir/src/lib.rs')
-rw-r--r-- | crates/hir/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 42ae53c66..19901ed33 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -514,7 +514,7 @@ impl Field { | |||
514 | VariantDef::Union(it) => it.id.into(), | 514 | VariantDef::Union(it) => it.id.into(), |
515 | VariantDef::Variant(it) => it.parent.id.into(), | 515 | VariantDef::Variant(it) => it.parent.id.into(), |
516 | }; | 516 | }; |
517 | let substs = Substitution::type_params(db, generic_def_id); | 517 | let substs = TyBuilder::type_params_subst(db, generic_def_id); |
518 | let ty = db.field_types(var_id)[self.id].clone().subst(&substs); | 518 | let ty = db.field_types(var_id)[self.id].clone().subst(&substs); |
519 | Type::new(db, self.parent.module(db).id.krate(), var_id, ty) | 519 | Type::new(db, self.parent.module(db).id.krate(), var_id, ty) |
520 | } | 520 | } |
@@ -1501,7 +1501,7 @@ impl TypeParam { | |||
1501 | let resolver = self.id.parent.resolver(db.upcast()); | 1501 | let resolver = self.id.parent.resolver(db.upcast()); |
1502 | let krate = self.id.parent.module(db.upcast()).krate(); | 1502 | let krate = self.id.parent.module(db.upcast()).krate(); |
1503 | let ty = params.get(local_idx)?.clone(); | 1503 | let ty = params.get(local_idx)?.clone(); |
1504 | let subst = Substitution::type_params(db, self.id.parent); | 1504 | let subst = TyBuilder::type_params_subst(db, self.id.parent); |
1505 | let ty = ty.subst(&subst.prefix(local_idx)); | 1505 | let ty = ty.subst(&subst.prefix(local_idx)); |
1506 | Some(Type::new_with_resolver_inner(db, krate, &resolver, ty)) | 1506 | Some(Type::new_with_resolver_inner(db, krate, &resolver, ty)) |
1507 | } | 1507 | } |