1
Fork 0

Rollup merge of #114314 - compiler-errors:sized-crit, r=lcnr

Tweaks to `adt_sized_constraint`

fixes a comment, but also some other nits.

r? lcnr
This commit is contained in:
Matthias Krüger 2023-08-02 06:22:49 +02:00 committed by GitHub
commit 3d29ce7484
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 27 additions and 25 deletions

View file

@ -150,7 +150,7 @@ pub(in crate::solve) fn instantiate_constituent_tys_for_sized_trait<'tcx>(
ty::Adt(def, args) => {
let sized_crit = def.sized_constraint(ecx.tcx());
Ok(sized_crit.iter_instantiated_copied(ecx.tcx(), args).collect())
Ok(sized_crit.iter_instantiated(ecx.tcx(), args).collect())
}
}
}

View file

@ -2099,7 +2099,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
Where(
obligation
.predicate
.rebind(sized_crit.iter_instantiated_copied(self.tcx(), args).collect()),
.rebind(sized_crit.iter_instantiated(self.tcx(), args).collect()),
)
}