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

@@ -421,11 +421,8 @@ impl<'tcx> WfPredicates<'tcx> {
fn require_sized(&mut self, subty: Ty<'tcx>, cause: traits::ObligationCauseCode<'tcx>) {
if !subty.has_escaping_bound_vars() {
let cause = self.cause(cause);
let trait_ref = self.tcx.mk_trait_ref(
self.tcx.require_lang_item(LangItem::Sized, None),
subty,
&[],
);
let trait_ref =
self.tcx.mk_trait_ref(self.tcx.require_lang_item(LangItem::Sized, None), subty, []);
self.out.push(traits::Obligation::with_depth(
self.tcx,
cause,