@@ -165,7 +165,7 @@ fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: LocalDef
165165 use rustc_type_ir:: TyKind :: * ;
166166 match ( source. kind ( ) , target. kind ( ) ) {
167167 ( & Ref ( r_a, _, mutbl_a) , Ref ( r_b, _, mutbl_b) )
168- if infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: Yes , r_a, * r_b) . is_ok ( )
168+ if infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: No , r_a, * r_b) . is_ok ( )
169169 && mutbl_a == * mutbl_b => { }
170170 ( & RawPtr ( tm_a) , & RawPtr ( tm_b) ) if tm_a. mutbl == tm_b. mutbl => ( ) ,
171171 ( & Adt ( def_a, args_a) , & Adt ( def_b, args_b) ) if def_a. is_struct ( ) && def_b. is_struct ( ) => {
@@ -204,7 +204,7 @@ fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: LocalDef
204204 }
205205
206206 if let Ok ( ok) =
207- infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: Yes , ty_a, ty_b)
207+ infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: No , ty_a, ty_b)
208208 {
209209 if ok. obligations . is_empty ( ) {
210210 tcx. sess . emit_err ( errors:: DispatchFromDynZST {
@@ -406,7 +406,7 @@ pub fn coerce_unsized_info<'tcx>(tcx: TyCtxt<'tcx>, impl_did: LocalDefId) -> Coe
406406 // we may have to evaluate constraint
407407 // expressions in the course of execution.)
408408 // See e.g., #41936.
409- if let Ok ( ok) = infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: Yes , a, b) {
409+ if let Ok ( ok) = infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: No , a, b) {
410410 if ok. obligations . is_empty ( ) {
411411 return None ;
412412 }
0 commit comments