Use iterators instead of slices at more sites
This commit is contained in:
parent
ec8d01fdcc
commit
9e4c3f41c1
7 changed files with 10 additions and 9 deletions
|
@ -11,6 +11,7 @@
|
|||
//! This API is completely unstable and subject to change.
|
||||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||
#![feature(associated_type_bounds)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(control_flow_enum)]
|
||||
#![feature(drain_filter)]
|
||||
|
|
|
@ -1108,7 +1108,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
obligation.predicate.def_id(),
|
||||
obligation.recursion_depth + 1,
|
||||
source_tail,
|
||||
&[target_tail.into()],
|
||||
[target_tail.into()],
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -1139,7 +1139,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
obligation.predicate.def_id(),
|
||||
obligation.recursion_depth + 1,
|
||||
a_last,
|
||||
&[b_last.into()],
|
||||
[b_last.into()],
|
||||
)
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -2101,7 +2101,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
trait_def_id,
|
||||
recursion_depth,
|
||||
normalized_ty,
|
||||
&[],
|
||||
[],
|
||||
);
|
||||
obligations.push(placeholder_obligation);
|
||||
obligations
|
||||
|
|
|
@ -239,9 +239,9 @@ pub fn predicate_for_trait_def<'tcx>(
|
|||
trait_def_id: DefId,
|
||||
recursion_depth: usize,
|
||||
self_ty: Ty<'tcx>,
|
||||
params: &[GenericArg<'tcx>],
|
||||
params: impl IntoIterator<Item = GenericArg<'tcx>, IntoIter: ExactSizeIterator>,
|
||||
) -> PredicateObligation<'tcx> {
|
||||
let trait_ref = tcx.mk_trait_ref(trait_def_id, self_ty, params.iter().copied());
|
||||
let trait_ref = tcx.mk_trait_ref(trait_def_id, self_ty, params);
|
||||
predicate_for_trait_ref(tcx, cause, param_env, trait_ref, recursion_depth)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue