aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir/src/lib.rs')
-rw-r--r--crates/hir/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index add1b55c2..003821981 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -516,7 +516,7 @@ impl Field {
516 VariantDef::Variant(it) => it.parent.id.into(), 516 VariantDef::Variant(it) => it.parent.id.into(),
517 }; 517 };
518 let substs = TyBuilder::type_params_subst(db, generic_def_id); 518 let substs = TyBuilder::type_params_subst(db, generic_def_id);
519 let ty = db.field_types(var_id)[self.id].clone().substitute(&substs); 519 let ty = db.field_types(var_id)[self.id].clone().substitute(&Interner, &substs);
520 Type::new(db, self.parent.module(db).id.krate(), var_id, ty) 520 Type::new(db, self.parent.module(db).id.krate(), var_id, ty)
521 } 521 }
522 522
@@ -1503,7 +1503,7 @@ impl TypeParam {
1503 let krate = self.id.parent.module(db.upcast()).krate(); 1503 let krate = self.id.parent.module(db.upcast()).krate();
1504 let ty = params.get(local_idx)?.clone(); 1504 let ty = params.get(local_idx)?.clone();
1505 let subst = TyBuilder::type_params_subst(db, self.id.parent); 1505 let subst = TyBuilder::type_params_subst(db, self.id.parent);
1506 let ty = ty.substitute(&subst.prefix(local_idx)); 1506 let ty = ty.substitute(&Interner, &subst.prefix(local_idx));
1507 Some(Type::new_with_resolver_inner(db, krate, &resolver, ty)) 1507 Some(Type::new_with_resolver_inner(db, krate, &resolver, ty))
1508 } 1508 }
1509} 1509}
@@ -1916,7 +1916,7 @@ impl Type {
1916 .iter() 1916 .iter()
1917 .map(|(local_id, ty)| { 1917 .map(|(local_id, ty)| {
1918 let def = Field { parent: variant_id.into(), id: local_id }; 1918 let def = Field { parent: variant_id.into(), id: local_id };
1919 let ty = ty.clone().substitute(substs); 1919 let ty = ty.clone().substitute(&Interner, substs);
1920 (def, self.derived(ty)) 1920 (def, self.derived(ty))
1921 }) 1921 })
1922 .collect() 1922 .collect()