mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Replace remaining uses of Substitution::build_for_def
This commit is contained in:
parent
77333a571f
commit
5d2b488aeb
6 changed files with 46 additions and 21 deletions
|
@ -1702,10 +1702,9 @@ impl Type {
|
|||
fn from_def(
|
||||
db: &dyn HirDatabase,
|
||||
krate: CrateId,
|
||||
def: impl HasResolver + Into<TyDefId> + Into<GenericDefId>,
|
||||
def: impl HasResolver + Into<TyDefId>,
|
||||
) -> Type {
|
||||
let substs = Substitution::build_for_def(db, def).fill_with_unknown().build();
|
||||
let ty = db.ty(def.into()).subst(&substs);
|
||||
let ty = TyBuilder::def_ty(db, def.into()).fill_with_unknown().build();
|
||||
Type::new(db, krate, def, ty)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue