all to any

don't really know why, but it is a lot easier for me to think
about cycles that way.
This commit is contained in:
lcnr 2024-01-08 10:41:55 +01:00
parent 61d6b20cd8
commit eb4d7c7adf

View File

@ -260,13 +260,13 @@ impl<'tcx> SearchGraph<'tcx> {
} else { } else {
// If we don't have a provisional result yet we're in the first iteration, // If we don't have a provisional result yet we're in the first iteration,
// so we start with no constraints. // so we start with no constraints.
let is_coinductive = self.stack.raw[stack_depth.index()..] let is_inductive = self.stack.raw[stack_depth.index()..]
.iter() .iter()
.all(|entry| entry.input.value.goal.predicate.is_coinductive(tcx)); .any(|entry| !entry.input.value.goal.predicate.is_coinductive(tcx));
if is_coinductive { if is_inductive {
Self::response_no_constraints(tcx, input, Certainty::Yes)
} else {
Self::response_no_constraints(tcx, input, Certainty::OVERFLOW) Self::response_no_constraints(tcx, input, Certainty::OVERFLOW)
} else {
Self::response_no_constraints(tcx, input, Certainty::Yes)
} }
}; };
} }