Rollup merge of #121745 - compiler-errors:refining-impl-trait-deeply-norm, r=lcnr
Deeply normalize obligations in `refining_impl_trait` We somewhat awkwardly use semantic comparison when checking the `refining_impl_trait` lint. This relies on us being able to normalize bounds eagerly to avoid cases where an unnormalized alias is not considered equal to a normalized alias. Since `normalize` in the new solver is a noop, let's use `deeply_normalize` instead. r? lcnr cc ``@tmandry,`` this should fix your bug lol
This commit is contained in:
commit
23351388d0
3 changed files with 38 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue