fix bad assertion
This commit is contained in:
@@ -55,13 +55,6 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
|
|||||||
let goals_certainty = self.try_evaluate_added_goals()?;
|
let goals_certainty = self.try_evaluate_added_goals()?;
|
||||||
let certainty = certainty.unify_and(goals_certainty);
|
let certainty = certainty.unify_and(goals_certainty);
|
||||||
|
|
||||||
if let Certainty::Yes = certainty {
|
|
||||||
assert!(
|
|
||||||
self.nested_goals.is_empty(),
|
|
||||||
"Cannot be certain of query response if unevaluated goals exist"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
let external_constraints = self.compute_external_query_constraints()?;
|
let external_constraints = self.compute_external_query_constraints()?;
|
||||||
|
|
||||||
let response = Response { var_values: self.var_values, external_constraints, certainty };
|
let response = Response { var_values: self.var_values, external_constraints, certainty };
|
||||||
|
|||||||
@@ -88,12 +88,10 @@ impl<'tcx> InferCtxtEvalExt<'tcx> for InferCtxt<'tcx> {
|
|||||||
};
|
};
|
||||||
let result = ecx.evaluate_goal(IsNormalizesToHack::No, goal);
|
let result = ecx.evaluate_goal(IsNormalizesToHack::No, goal);
|
||||||
|
|
||||||
if let Ok((_, Certainty::Yes)) = result {
|
assert!(
|
||||||
assert!(
|
ecx.nested_goals.is_empty(),
|
||||||
ecx.nested_goals.is_empty(),
|
"root `EvalCtxt` should not have any goals added to it"
|
||||||
"Cannot be certain of query response if unevaluated goals exist"
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
assert!(search_graph.is_empty());
|
assert!(search_graph.is_empty());
|
||||||
result
|
result
|
||||||
|
|||||||
Reference in New Issue
Block a user