Allow iterators instead of requiring slices that will get turned into iterators
This commit is contained in:
parent
bd40c10751
commit
ec8d01fdcc
35 changed files with 69 additions and 68 deletions
|
@ -346,7 +346,7 @@ impl<'tcx> CloneShimBuilder<'tcx> {
|
|||
// we must subst the self_ty because it's
|
||||
// otherwise going to be TySelf and we can't index
|
||||
// or access fields of a Place of type TySelf.
|
||||
let substs = tcx.mk_substs_trait(self_ty, &[]);
|
||||
let substs = tcx.mk_substs_trait(self_ty, []);
|
||||
let sig = tcx.bound_fn_sig(def_id).subst(tcx, substs);
|
||||
let sig = tcx.erase_late_bound_regions(sig);
|
||||
let span = tcx.def_span(def_id);
|
||||
|
@ -427,7 +427,7 @@ impl<'tcx> CloneShimBuilder<'tcx> {
|
|||
) {
|
||||
let tcx = self.tcx;
|
||||
|
||||
let substs = tcx.mk_substs_trait(ty, &[]);
|
||||
let substs = tcx.mk_substs_trait(ty, []);
|
||||
|
||||
// `func == Clone::clone(&ty) -> ty`
|
||||
let func_ty = tcx.mk_fn_def(self.def_id, substs);
|
||||
|
@ -586,7 +586,7 @@ fn build_call_shim<'tcx>(
|
|||
|
||||
// Create substitutions for the `Self` and `Args` generic parameters of the shim body.
|
||||
let arg_tup = tcx.mk_tup(untuple_args.iter());
|
||||
let sig_substs = tcx.mk_substs_trait(ty, &[ty::subst::GenericArg::from(arg_tup)]);
|
||||
let sig_substs = tcx.mk_substs_trait(ty, [ty::subst::GenericArg::from(arg_tup)]);
|
||||
|
||||
(Some(sig_substs), Some(untuple_args))
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue