Allow iterators instead of requiring slices that will get turned into iterators

This commit is contained in:
Oli Scherer 2022-11-17 13:00:35 +00:00
parent bd40c10751
commit ec8d01fdcc
35 changed files with 69 additions and 68 deletions

View file

@ -143,7 +143,7 @@ pub fn type_known_to_meet_bound_modulo_regions<'tcx>(
def_id: DefId,
span: Span,
) -> bool {
let trait_ref = ty::Binder::dummy(infcx.tcx.mk_trait_ref(def_id, ty, &[]));
let trait_ref = ty::Binder::dummy(infcx.tcx.mk_trait_ref(def_id, ty, []));
pred_known_to_hold_modulo_regions(infcx, param_env, trait_ref.without_const(), span)
}
@ -902,7 +902,7 @@ pub fn vtable_trait_upcasting_coercion_new_vptr_slot<'tcx>(
// this has been typecked-before, so diagnostics is not really needed.
let unsize_trait_did = tcx.require_lang_item(LangItem::Unsize, None);
let trait_ref = tcx.mk_trait_ref(unsize_trait_did, source, &[target.into()]);
let trait_ref = tcx.mk_trait_ref(unsize_trait_did, source, [target.into()]);
match tcx.codegen_select_candidate((ty::ParamEnv::reveal_all(), ty::Binder::dummy(trait_ref))) {
Ok(ImplSource::TraitUpcasting(implsrc_traitcasting)) => {