aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 15f46f720..42ae53c66 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -1702,10 +1702,9 @@ impl Type {
1702 fn from_def( 1702 fn from_def(
1703 db: &dyn HirDatabase, 1703 db: &dyn HirDatabase,
1704 krate: CrateId, 1704 krate: CrateId,
1705 def: impl HasResolver + Into<TyDefId> + Into<GenericDefId>, 1705 def: impl HasResolver + Into<TyDefId>,
1706 ) -> Type { 1706 ) -> Type {
1707 let substs = Substitution::build_for_def(db, def).fill_with_unknown().build(); 1707 let ty = TyBuilder::def_ty(db, def.into()).fill_with_unknown().build();
1708 let ty = db.ty(def.into()).subst(&substs);
1709 Type::new(db, krate, def, ty) 1708 Type::new(db, krate, def, ty)
1710 } 1709 }
1711 1710