We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e759c1 commit 0e94e3dCopy full SHA for 0e94e3d
chalk-recursive/src/solve.rs
@@ -179,6 +179,12 @@ trait SolveIterationHelpers<I: Interner>: SolveDatabase<I> {
179
} else {
180
debug!("Error");
181
}
182
+
183
+ if let Some((cur_solution, _)) = cur_solution {
184
+ if cur_solution.is_trivial_and_always_true(self.interner()) {
185
+ break;
186
+ }
187
188
189
190
if let Some((s, _)) = cur_solution {
chalk-solve/src/solve.rs
@@ -101,7 +101,7 @@ impl<I: Interner> Solution<I> {
101
Solution::Ambig(guidance)
102
103
104
- fn is_trivial_and_always_true(&self, interner: I) -> bool {
+ pub fn is_trivial_and_always_true(&self, interner: I) -> bool {
105
match self {
106
Solution::Unique(constrained_subst) => {
107
constrained_subst.value.subst.is_identity_subst(interner)
0 commit comments