Support constraining opaque types while trait upcasting with binders

This commit is contained in:
Oli Scherer 2024-04-17 10:48:20 +00:00
parent 7f292f41a0
commit 4387eea7f7
3 changed files with 3 additions and 11 deletions

View file

@ -2594,7 +2594,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
self.infcx
.at(&obligation.cause, obligation.param_env)
.eq(
DefineOpaqueTypes::No,
DefineOpaqueTypes::Yes,
upcast_principal.map_bound(|trait_ref| {
ty::ExistentialTraitRef::erase_self_ty(tcx, trait_ref)
}),