1
Fork 0

Deeply normalize obligations in refining_impl_trait

This commit is contained in:
Michael Goulet 2024-02-28 16:09:06 +00:00
parent ef324565d0
commit 75e15f7cf4
3 changed files with 38 additions and 5 deletions

View file

@ -107,6 +107,15 @@ impl<'a, 'tcx> ObligationCtxt<'a, 'tcx> {
self.register_infer_ok_obligations(infer_ok)
}
pub fn deeply_normalize<T: TypeFoldable<TyCtxt<'tcx>>>(
&self,
cause: &ObligationCause<'tcx>,
param_env: ty::ParamEnv<'tcx>,
value: T,
) -> Result<T, Vec<FulfillmentError<'tcx>>> {
self.infcx.at(cause, param_env).deeply_normalize(value, &mut **self.engine.borrow_mut())
}
/// Makes `expected <: actual`.
pub fn eq_exp<T>(
&self,