diff options
| author | lcnr <rust@lcnr.de> | 2024-01-08 10:41:55 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2024-01-08 10:41:55 +0100 |
| commit | eb4d7c7adf55a7480a9ef3e3b990d015ef3ea07c (patch) | |
| tree | fd83234fe1ba264a3bf4c6d19be488977eecdb95 /compiler/rustc_trait_selection/src | |
| parent | 61d6b20cd87ac6bacc854482921f0a1ed80351e0 (diff) | |
| download | rust-eb4d7c7adf55a7480a9ef3e3b990d015ef3ea07c.tar.gz rust-eb4d7c7adf55a7480a9ef3e3b990d015ef3ea07c.zip | |
`all` to `any`
don't really know why, but it is a lot easier for me to think about cycles that way.
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/search_graph.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/search_graph.rs b/compiler/rustc_trait_selection/src/solve/search_graph.rs index 8a8221f85a4..523025cabe2 100644 --- a/compiler/rustc_trait_selection/src/solve/search_graph.rs +++ b/compiler/rustc_trait_selection/src/solve/search_graph.rs @@ -260,13 +260,13 @@ impl<'tcx> SearchGraph<'tcx> { } else { // If we don't have a provisional result yet we're in the first iteration, // 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() - .all(|entry| entry.input.value.goal.predicate.is_coinductive(tcx)); - if is_coinductive { - Self::response_no_constraints(tcx, input, Certainty::Yes) - } else { + .any(|entry| !entry.input.value.goal.predicate.is_coinductive(tcx)); + if is_inductive { Self::response_no_constraints(tcx, input, Certainty::OVERFLOW) + } else { + Self::response_no_constraints(tcx, input, Certainty::Yes) } }; } |
