mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
Remove CallableSig::from_substs
This commit is contained in:
parent
ac8fee006a
commit
505ca65216
@ -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]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user