Use IntoIterator
for mk_fn_sig
.
This makes a lot of call sites nicer.
This commit is contained in:
parent
c8237db3ee
commit
2017aeff88
11 changed files with 28 additions and 35 deletions
|
@ -2012,7 +2012,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||
let sig = match inputs.kind() {
|
||||
ty::Tuple(inputs) if infcx.tcx.is_fn_trait(trait_ref.def_id()) => {
|
||||
infcx.tcx.mk_fn_sig(
|
||||
inputs.iter(),
|
||||
*inputs,
|
||||
infcx.next_ty_var(TypeVariableOrigin {
|
||||
span: DUMMY_SP,
|
||||
kind: TypeVariableOriginKind::MiscVariable,
|
||||
|
@ -2023,7 +2023,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||
)
|
||||
}
|
||||
_ => infcx.tcx.mk_fn_sig(
|
||||
std::iter::once(inputs),
|
||||
[inputs],
|
||||
infcx.next_ty_var(TypeVariableOrigin {
|
||||
span: DUMMY_SP,
|
||||
kind: TypeVariableOriginKind::MiscVariable,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue