Skip to content

Commit 28184e7

Browse files
committed
Clarify mk_fn_sig signature.
Giving the item type a name `T` avoids duplication.
1 parent bcf0ec0 commit 28184e7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

compiler/rustc_middle/src/ty/context.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2210,16 +2210,17 @@ impl<'tcx> TyCtxt<'tcx> {
22102210
if ts.is_empty() { List::empty() } else { self._intern_bound_variable_kinds(ts) }
22112211
}
22122212

2213-
pub fn mk_fn_sig<I>(
2213+
pub fn mk_fn_sig<I, T>(
22142214
self,
22152215
inputs: I,
22162216
output: I::Item,
22172217
c_variadic: bool,
22182218
unsafety: hir::Unsafety,
22192219
abi: abi::Abi,
2220-
) -> <I::Item as InternIteratorElement<Ty<'tcx>, ty::FnSig<'tcx>>>::Output
2220+
) -> T::Output
22212221
where
2222-
I: Iterator<Item: InternIteratorElement<Ty<'tcx>, ty::FnSig<'tcx>>>,
2222+
I: Iterator<Item = T>,
2223+
T: InternIteratorElement<Ty<'tcx>, ty::FnSig<'tcx>>,
22232224
{
22242225
inputs.chain(iter::once(output)).intern_with(|xs| ty::FnSig {
22252226
inputs_and_output: self.intern_type_list(xs),

0 commit comments

Comments
 (0)