@@ -190,7 +190,7 @@ fn visit_implementation_of_dispatch_from_dyn(checker: &Checker<'_>) -> Result<()
190190 use rustc_type_ir:: TyKind :: * ;
191191 match ( source. kind ( ) , target. kind ( ) ) {
192192 ( & 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 ( )
194194 && mutbl_a == * mutbl_b =>
195195 {
196196 Ok ( ( ) )
@@ -231,7 +231,7 @@ fn visit_implementation_of_dispatch_from_dyn(checker: &Checker<'_>) -> Result<()
231231 }
232232
233233 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)
235235 {
236236 if ok. obligations . is_empty ( ) {
237237 res = Err ( tcx. dcx ( ) . emit_err ( errors:: DispatchFromDynZST {
@@ -437,7 +437,7 @@ pub fn coerce_unsized_info<'tcx>(
437437 // we may have to evaluate constraint
438438 // expressions in the course of execution.)
439439 // 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) {
441441 if ok. obligations . is_empty ( ) {
442442 return None ;
443443 }
0 commit comments