refactor: use cast() instead of interning GenericArgData

This commit is contained in:
Ryo Yoshida 2022-10-02 18:39:42 +09:00
parent 5c28ad1932
commit f8f5a5ea57
No known key found for this signature in database
GPG key ID: E25698A930586171
5 changed files with 34 additions and 61 deletions

View file

@ -152,7 +152,7 @@ impl TyExt for Ty {
TyKind::FnDef(def, parameters) => {
let callable_def = db.lookup_intern_callable_def((*def).into());
let sig = db.callable_item_signature(callable_def);
Some(sig.substitute(Interner, &parameters))
Some(sig.substitute(Interner, parameters))
}
TyKind::Closure(.., substs) => {
let sig_param = substs.at(Interner, 0).assert_ty_ref(Interner);