Clarify mk_fn_sig
signature.
Giving the item type a name `T` avoids duplication.
This commit is contained in:
parent
bcf0ec0191
commit
28184e7491
@ -2210,16 +2210,17 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||||||
if ts.is_empty() { List::empty() } else { self._intern_bound_variable_kinds(ts) }
|
if ts.is_empty() { List::empty() } else { self._intern_bound_variable_kinds(ts) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn mk_fn_sig<I>(
|
pub fn mk_fn_sig<I, T>(
|
||||||
self,
|
self,
|
||||||
inputs: I,
|
inputs: I,
|
||||||
output: I::Item,
|
output: I::Item,
|
||||||
c_variadic: bool,
|
c_variadic: bool,
|
||||||
unsafety: hir::Unsafety,
|
unsafety: hir::Unsafety,
|
||||||
abi: abi::Abi,
|
abi: abi::Abi,
|
||||||
) -> <I::Item as InternIteratorElement<Ty<'tcx>, ty::FnSig<'tcx>>>::Output
|
) -> T::Output
|
||||||
where
|
where
|
||||||
I: Iterator<Item: InternIteratorElement<Ty<'tcx>, ty::FnSig<'tcx>>>,
|
I: Iterator<Item = T>,
|
||||||
|
T: InternIteratorElement<Ty<'tcx>, ty::FnSig<'tcx>>,
|
||||||
{
|
{
|
||||||
inputs.chain(iter::once(output)).intern_with(|xs| ty::FnSig {
|
inputs.chain(iter::once(output)).intern_with(|xs| ty::FnSig {
|
||||||
inputs_and_output: self.intern_type_list(xs),
|
inputs_and_output: self.intern_type_list(xs),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user