From 28184e749160d4707d5006b52ee7aeff8ba9a9b5 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 16 Feb 2023 11:55:23 +1100 Subject: [PATCH] Clarify `mk_fn_sig` signature. Giving the item type a name `T` avoids duplication. --- compiler/rustc_middle/src/ty/context.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 79879ea20ab..a28e236d860 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -2210,16 +2210,17 @@ impl<'tcx> TyCtxt<'tcx> { if ts.is_empty() { List::empty() } else { self._intern_bound_variable_kinds(ts) } } - pub fn mk_fn_sig( + pub fn mk_fn_sig( self, inputs: I, output: I::Item, c_variadic: bool, unsafety: hir::Unsafety, abi: abi::Abi, - ) -> , ty::FnSig<'tcx>>>::Output + ) -> T::Output where - I: Iterator, ty::FnSig<'tcx>>>, + I: Iterator, + T: InternIteratorElement, ty::FnSig<'tcx>>, { inputs.chain(iter::once(output)).intern_with(|xs| ty::FnSig { inputs_and_output: self.intern_type_list(xs),