@@ -165,7 +165,8 @@ 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 :: No , r_a, * r_b) . is_ok ( )
168
+ // FIXME: No tests currently validate the behavior with DefineOpaqueTypes::Yes
169
+ if infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: Yes , r_a, * r_b) . is_ok ( )
169
170
&& mutbl_a == * mutbl_b => { }
170
171
( & RawPtr ( tm_a) , & RawPtr ( tm_b) ) if tm_a. mutbl == tm_b. mutbl => ( ) ,
171
172
( & Adt ( def_a, args_a) , & Adt ( def_b, args_b) ) if def_a. is_struct ( ) && def_b. is_struct ( ) => {
@@ -204,7 +205,8 @@ fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: LocalDef
204
205
}
205
206
206
207
if let Ok ( ok) =
207
- infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: No , ty_a, ty_b)
208
+ // FIXME: No tests currently validate the behavior with DefineOpaqueTypes::Yes
209
+ infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: Yes , ty_a, ty_b)
208
210
{
209
211
if ok. obligations . is_empty ( ) {
210
212
tcx. sess . emit_err ( errors:: DispatchFromDynZST {
0 commit comments