diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-02-16 16:05:08 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-02-17 22:24:34 +1100 |
| commit | 2017aeff8887617fb7eef66d4b8dc81ca6e925c5 (patch) | |
| tree | ddb8be7f08e54a1c2ace316e414f0db3d43d968a /compiler/rustc_trait_selection/src/traits | |
| parent | c8237db3eed2c91c14ce46b482b3d479a39d328d (diff) | |
| download | rust-2017aeff8887617fb7eef66d4b8dc81ca6e925c5.tar.gz rust-2017aeff8887617fb7eef66d4b8dc81ca6e925c5.zip | |
Use `IntoIterator` for `mk_fn_sig`.
This makes a lot of call sites nicer.
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index a0c67f480d0..91b463800a8 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -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, |
