where
T: ToTrace<'tcx>,
{
- Ok(self.ocx.register_infer_ok_obligations(
- self.ocx
- .infcx
- .at(&ObligationCause::dummy_with_span(self.span), self.param_env)
- .eq(a, b)?,
- ))
+ Ok(self.ocx.eq(&ObligationCause::dummy_with_span(self.span), self.param_env, a, b)?)
}
fn prove_predicate(&self, predicate: Predicate<'tcx>, cause: ObligationCause<'tcx>) {
) -> Result<&'tcx Canonical<'tcx, QueryResponse<'tcx, ()>>, NoSolution> {
tcx.infer_ctxt().enter_canonical_trait_query(&canonicalized, |ocx, key| {
let (param_env, Eq { a, b }) = key.into_parts();
- ocx.register_infer_ok_obligations(
- ocx.infcx.at(&ObligationCause::dummy(), param_env).eq(a, b)?,
- );
- Ok(())
+ Ok(ocx.eq(&ObligationCause::dummy(), param_env, a, b)?)
})
}
) -> Result<&'tcx Canonical<'tcx, QueryResponse<'tcx, ()>>, NoSolution> {
tcx.infer_ctxt().enter_canonical_trait_query(&canonicalized, |ocx, key| {
let (param_env, Subtype { sub, sup }) = key.into_parts();
- ocx.register_infer_ok_obligations(
- ocx.infcx.at(&ObligationCause::dummy(), param_env).sup(sup, sub)?,
- );
- Ok(())
+ Ok(ocx.sup(&ObligationCause::dummy(), param_env, sup, sub)?)
})
}