Replace Substitution::type_params

This commit is contained in:
Florian Diebold 2021-04-04 13:16:16 +02:00
parent a4d7bdf1c8
commit ebdfc932e7
6 changed files with 15 additions and 16 deletions

View file

@ -99,6 +99,11 @@ impl TyBuilder<()> {
}
}
pub fn type_params_subst(db: &dyn HirDatabase, def: impl Into<GenericDefId>) -> Substitution {
let params = generics(db.upcast(), def.into());
params.type_params_subst(db)
}
pub fn subst_for_def(db: &dyn HirDatabase, def: impl Into<GenericDefId>) -> TyBuilder<()> {
let def = def.into();
let params = generics(db.upcast(), def);