Remove CallableSig::from_substs

This commit is contained in:
Florian Diebold 2021-04-03 22:47:29 +02:00
parent ac8fee006a
commit 505ca65216

View File

@ -754,7 +754,7 @@ impl CallableSig {
pub fn from_fn_ptr(fn_ptr: &FnPointer) -> CallableSig {
CallableSig {
// FIXME: what to do about lifetime params?
// FIXME: what to do about lifetime params? -> return PolyFnSig
params_and_return: fn_ptr
.substs
.clone()
@ -767,16 +767,6 @@ impl CallableSig {
}
}
pub fn from_substs(substs: &Substitution) -> CallableSig {
CallableSig {
params_and_return: substs
.iter(&Interner)
.map(|arg| arg.assert_ty_ref(&Interner).clone())
.collect(),
is_varargs: false,
}
}
pub fn params(&self) -> &[Ty] {
&self.params_and_return[0..self.params_and_return.len() - 1]
}