1
Fork 0

Auto merge of #110031 - compiler-errors:generic-elaboration, r=b-naber

Make elaboration generic over input

Combines all the `elaborate_*` family of functions into just one, which is an iterator over the same type that you pass in (e.g. elaborating `Predicate` gives `Predicate`s, elaborating `Obligation`s gives `Obligation`s, etc.)
This commit is contained in:
bors 2023-04-09 00:18:10 +00:00
commit f8ed97ecc1
22 changed files with 163 additions and 164 deletions

View file

@ -115,10 +115,7 @@ impl<'tcx> MirPass<'tcx> for ConstProp {
.predicates
.iter()
.filter_map(|(p, _)| if p.is_global() { Some(*p) } else { None });
if traits::impossible_predicates(
tcx,
traits::elaborate_predicates(tcx, predicates).collect(),
) {
if traits::impossible_predicates(tcx, traits::elaborate(tcx, predicates).collect()) {
trace!("ConstProp skipped for {:?}: found unsatisfiable predicates", def_id);
return;
}