mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
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:
parent
61d6b20cd8
commit
eb4d7c7adf
@ -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)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user