File tree 2 files changed +4
-13
lines changed
compiler/rustc_trait_selection/src/solve
2 files changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,6 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
55
55
let goals_certainty = self . try_evaluate_added_goals ( ) ?;
56
56
let certainty = certainty. unify_and ( goals_certainty) ;
57
57
58
- if let Certainty :: Yes = certainty {
59
- assert ! (
60
- self . nested_goals. is_empty( ) ,
61
- "Cannot be certain of query response if unevaluated goals exist"
62
- ) ;
63
- }
64
-
65
58
let external_constraints = self . compute_external_query_constraints ( ) ?;
66
59
67
60
let response = Response { var_values : self . var_values , external_constraints, certainty } ;
Original file line number Diff line number Diff line change @@ -88,12 +88,10 @@ impl<'tcx> InferCtxtEvalExt<'tcx> for InferCtxt<'tcx> {
88
88
} ;
89
89
let result = ecx. evaluate_goal ( IsNormalizesToHack :: No , goal) ;
90
90
91
- if let Ok ( ( _, Certainty :: Yes ) ) = result {
92
- assert ! (
93
- ecx. nested_goals. is_empty( ) ,
94
- "Cannot be certain of query response if unevaluated goals exist"
95
- ) ;
96
- }
91
+ assert ! (
92
+ ecx. nested_goals. is_empty( ) ,
93
+ "root `EvalCtxt` should not have any goals added to it"
94
+ ) ;
97
95
98
96
assert ! ( search_graph. is_empty( ) ) ;
99
97
result
You can’t perform that action at this time.
0 commit comments