1
Fork 0

Use iterators instead of slices at more sites

This commit is contained in:
Oli Scherer 2022-11-17 13:06:37 +00:00
parent ec8d01fdcc
commit 9e4c3f41c1
7 changed files with 10 additions and 9 deletions

View file

@ -316,7 +316,7 @@ fn visit_implementation_of_dispatch_from_dyn<'tcx>(tcx: TyCtxt<'tcx>, impl_did:
dispatch_from_dyn_trait,
0,
field.ty(tcx, substs_a),
&[field.ty(tcx, substs_b).into()],
[field.ty(tcx, substs_b).into()],
)
}),
);
@ -558,7 +558,7 @@ pub fn coerce_unsized_info<'tcx>(tcx: TyCtxt<'tcx>, impl_did: DefId) -> CoerceUn
// Register an obligation for `A: Trait<B>`.
let cause = traits::ObligationCause::misc(span, impl_hir_id);
let predicate =
predicate_for_trait_def(tcx, param_env, cause, trait_def_id, 0, source, &[target.into()]);
predicate_for_trait_def(tcx, param_env, cause, trait_def_id, 0, source, [target.into()]);
let errors = traits::fully_solve_obligation(&infcx, predicate);
if !errors.is_empty() {
infcx.err_ctxt().report_fulfillment_errors(&errors, None);