Don't elaborate non-obligations into obligations

This commit is contained in:
Michael Goulet
2023-03-26 20:33:54 +00:00
parent 96bd50dd47
commit 1ce4b37900
20 changed files with 112 additions and 131 deletions

View File

@@ -367,8 +367,8 @@ fn negative_impl_exists<'tcx>(
}
// Try to prove a negative obligation exists for super predicates
for o in util::elaborate_predicates(infcx.tcx, iter::once(o.predicate)) {
if resolve_negative_obligation(infcx.fork(), &o, body_def_id) {
for pred in util::elaborate_predicates(infcx.tcx, iter::once(o.predicate)) {
if resolve_negative_obligation(infcx.fork(), &o.with(infcx.tcx, pred), body_def_id) {
return true;
}
}