Rollup merge of #126258 - oli-obk:recursive_rpit, r=lcnr

Do not define opaque types when selecting impls

fixes #126117

r? `@lcnr` for inconsistency with next solver
This commit is contained in:
许杰友 Jieyou Xu (Joe)
2024-06-11 14:16:47 +01:00
committed by GitHub
22 changed files with 139 additions and 69 deletions

View File

@@ -2563,7 +2563,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
let InferOk { obligations, .. } = self
.infcx
.at(&cause, obligation.param_env)
.eq(DefineOpaqueTypes::Yes, placeholder_obligation_trait_ref, impl_trait_ref)
.eq(DefineOpaqueTypes::No, placeholder_obligation_trait_ref, impl_trait_ref)
.map_err(|e| {
debug!("match_impl: failed eq_trait_refs due to `{}`", e.to_string(self.tcx()))
})?;