No need to probe when computing goals
This commit is contained in:
parent
7919ef0ec5
commit
ff2413db1b
1 changed files with 17 additions and 21 deletions
|
@ -337,7 +337,6 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
|
||||||
// That won't actually reflect in the query response, so it seems moot.
|
// That won't actually reflect in the query response, so it seems moot.
|
||||||
self.make_canonical_response(Certainty::AMBIGUOUS)
|
self.make_canonical_response(Certainty::AMBIGUOUS)
|
||||||
} else {
|
} else {
|
||||||
self.infcx.probe(|_| {
|
|
||||||
let InferOk { value: (), obligations } = self
|
let InferOk { value: (), obligations } = self
|
||||||
.infcx
|
.infcx
|
||||||
.at(&ObligationCause::dummy(), goal.param_env)
|
.at(&ObligationCause::dummy(), goal.param_env)
|
||||||
|
@ -345,7 +344,6 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
|
||||||
self.evaluate_all_and_make_canonical_response(
|
self.evaluate_all_and_make_canonical_response(
|
||||||
obligations.into_iter().map(|pred| pred.into()).collect(),
|
obligations.into_iter().map(|pred| pred.into()).collect(),
|
||||||
)
|
)
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -378,7 +376,6 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
|
||||||
&mut self,
|
&mut self,
|
||||||
goal: Goal<'tcx, ty::GenericArg<'tcx>>,
|
goal: Goal<'tcx, ty::GenericArg<'tcx>>,
|
||||||
) -> QueryResult<'tcx> {
|
) -> QueryResult<'tcx> {
|
||||||
self.infcx.probe(|_| {
|
|
||||||
match crate::traits::wf::unnormalized_obligations(
|
match crate::traits::wf::unnormalized_obligations(
|
||||||
self.infcx,
|
self.infcx,
|
||||||
goal.param_env,
|
goal.param_env,
|
||||||
|
@ -389,7 +386,6 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
|
||||||
),
|
),
|
||||||
None => self.make_canonical_response(Certainty::AMBIGUOUS),
|
None => self.make_canonical_response(Certainty::AMBIGUOUS),
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue