@@ -190,7 +190,7 @@ fn visit_implementation_of_dispatch_from_dyn(checker: &Checker<'_>) -> Result<()
190
190
use rustc_type_ir:: TyKind :: * ;
191
191
match ( source. kind ( ) , target. kind ( ) ) {
192
192
( & Ref ( r_a, _, mutbl_a) , Ref ( r_b, _, mutbl_b) )
193
- if infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: No , r_a, * r_b) . is_ok ( )
193
+ if infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: Yes , r_a, * r_b) . is_ok ( )
194
194
&& mutbl_a == * mutbl_b =>
195
195
{
196
196
Ok ( ( ) )
@@ -231,7 +231,7 @@ fn visit_implementation_of_dispatch_from_dyn(checker: &Checker<'_>) -> Result<()
231
231
}
232
232
233
233
if let Ok ( ok) =
234
- infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: No , ty_a, ty_b)
234
+ infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: Yes , ty_a, ty_b)
235
235
{
236
236
if ok. obligations . is_empty ( ) {
237
237
res = Err ( tcx. dcx ( ) . emit_err ( errors:: DispatchFromDynZST {
@@ -437,7 +437,7 @@ pub fn coerce_unsized_info<'tcx>(
437
437
// we may have to evaluate constraint
438
438
// expressions in the course of execution.)
439
439
// See e.g., #41936.
440
- if let Ok ( ok) = infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: No , a, b) {
440
+ if let Ok ( ok) = infcx. at ( & cause, param_env) . eq ( DefineOpaqueTypes :: Yes , a, b) {
441
441
if ok. obligations . is_empty ( ) {
442
442
return None ;
443
443
}
0 commit comments