@@ -160,7 +160,7 @@ fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: LocalDef
160
160
use rustc_type_ir:: sty:: TyKind :: * ;
161
161
match ( source. kind ( ) , target. kind ( ) ) {
162
162
( & Ref ( r_a, _, mutbl_a) , Ref ( r_b, _, mutbl_b) )
163
- if infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: No , r_a, * r_b) . is_ok ( )
163
+ if infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: Yes , r_a, * r_b) . is_ok ( )
164
164
&& mutbl_a == * mutbl_b => { }
165
165
( & RawPtr ( tm_a) , & RawPtr ( tm_b) ) if tm_a. mutbl == tm_b. mutbl => ( ) ,
166
166
( & Adt ( def_a, substs_a) , & Adt ( def_b, substs_b) )
@@ -205,7 +205,7 @@ fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: LocalDef
205
205
}
206
206
207
207
if let Ok ( ok) =
208
- infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: No , ty_a, ty_b)
208
+ infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: Yes , ty_a, ty_b)
209
209
{
210
210
if ok. obligations . is_empty ( ) {
211
211
create_err (
@@ -427,7 +427,7 @@ pub fn coerce_unsized_info<'tcx>(tcx: TyCtxt<'tcx>, impl_did: LocalDefId) -> Coe
427
427
// we may have to evaluate constraint
428
428
// expressions in the course of execution.)
429
429
// See e.g., #41936.
430
- if let Ok ( ok) = infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: No , a, b) {
430
+ if let Ok ( ok) = infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: Yes , a, b) {
431
431
if ok. obligations . is_empty ( ) {
432
432
return None ;
433
433
}
0 commit comments