Skip to content

Commit eb4d7c7

Browse files
committed
all to any
don't really know why, but it is a lot easier for me to think about cycles that way.
1 parent 61d6b20 commit eb4d7c7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compiler/rustc_trait_selection/src/solve/search_graph.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,13 @@ impl<'tcx> SearchGraph<'tcx> {
260260
} else {
261261
// If we don't have a provisional result yet we're in the first iteration,
262262
// so we start with no constraints.
263-
let is_coinductive = self.stack.raw[stack_depth.index()..]
263+
let is_inductive = self.stack.raw[stack_depth.index()..]
264264
.iter()
265-
.all(|entry| entry.input.value.goal.predicate.is_coinductive(tcx));
266-
if is_coinductive {
267-
Self::response_no_constraints(tcx, input, Certainty::Yes)
268-
} else {
265+
.any(|entry| !entry.input.value.goal.predicate.is_coinductive(tcx));
266+
if is_inductive {
269267
Self::response_no_constraints(tcx, input, Certainty::OVERFLOW)
268+
} else {
269+
Self::response_no_constraints(tcx, input, Certainty::Yes)
270270
}
271271
};
272272
}

0 commit comments

Comments
 (0)