@@ -165,7 +165,7 @@ fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: LocalDef
165
165
use rustc_type_ir:: TyKind :: * ;
166
166
match ( source. kind ( ) , target. kind ( ) ) {
167
167
( & 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 ( )
169
169
&& mutbl_a == * mutbl_b => { }
170
170
( & RawPtr ( tm_a) , & RawPtr ( tm_b) ) if tm_a. mutbl == tm_b. mutbl => ( ) ,
171
171
( & 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
204
204
}
205
205
206
206
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)
208
208
{
209
209
if ok. obligations . is_empty ( ) {
210
210
tcx. sess . emit_err ( errors:: DispatchFromDynZST {
@@ -406,7 +406,7 @@ pub fn coerce_unsized_info<'tcx>(tcx: TyCtxt<'tcx>, impl_did: LocalDefId) -> Coe
406
406
// we may have to evaluate constraint
407
407
// expressions in the course of execution.)
408
408
// 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) {
410
410
if ok. obligations . is_empty ( ) {
411
411
return None ;
412
412
}
0 commit comments