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
|
@ -61,7 +61,7 @@ impl<'tcx> Bounds<'tcx> {
|
|||
// If it could be sized, and is, add the `Sized` predicate.
|
||||
let sized_predicate = self.implicitly_sized.and_then(|span| {
|
||||
tcx.lang_items().sized_trait().map(move |sized| {
|
||||
let trait_ref = ty::Binder::dummy(tcx.mk_trait_ref(sized, param_ty, &[]));
|
||||
let trait_ref = ty::Binder::dummy(tcx.mk_trait_ref(sized, param_ty, []));
|
||||
(trait_ref.without_const().to_predicate(tcx), span)
|
||||
})
|
||||
});
|
||||
|
|
|
@ -1782,7 +1782,7 @@ fn receiver_is_implemented<'tcx>(
|
|||
receiver_ty: Ty<'tcx>,
|
||||
) -> bool {
|
||||
let tcx = wfcx.tcx();
|
||||
let trait_ref = ty::Binder::dummy(tcx.mk_trait_ref(receiver_trait_def_id, receiver_ty, &[]));
|
||||
let trait_ref = ty::Binder::dummy(tcx.mk_trait_ref(receiver_trait_def_id, receiver_ty, []));
|
||||
|
||||
let obligation = traits::Obligation::new(tcx, cause, wfcx.param_env, trait_ref.without_const());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue