@@ -572,7 +572,9 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
572572 if let Ok ( new_obligations) = infcx
573573 . at ( & obligation. cause , obligation. param_env )
574574 . trace ( c1, c2)
575- . eq ( DefineOpaqueTypes :: No , a. args , b. args )
575+ // Can define opaque types as this is only reachable with
576+ // `generic_const_exprs`
577+ . eq ( DefineOpaqueTypes :: Yes , a. args , b. args )
576578 {
577579 return ProcessResult :: Changed ( mk_pending (
578580 new_obligations. into_obligations ( ) ,
@@ -583,7 +585,9 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
583585 ( _, _) => {
584586 if let Ok ( new_obligations) = infcx
585587 . at ( & obligation. cause , obligation. param_env )
586- . eq ( DefineOpaqueTypes :: No , c1, c2)
588+ // Can define opaque types as this is only reachable with
589+ // `generic_const_exprs`
590+ . eq ( DefineOpaqueTypes :: Yes , c1, c2)
587591 {
588592 return ProcessResult :: Changed ( mk_pending (
589593 new_obligations. into_obligations ( ) ,
@@ -624,7 +628,9 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
624628 match ( evaluate ( c1) , evaluate ( c2) ) {
625629 ( Ok ( c1) , Ok ( c2) ) => {
626630 match self . selcx . infcx . at ( & obligation. cause , obligation. param_env ) . eq (
627- DefineOpaqueTypes :: No ,
631+ // Can define opaque types as this is only reachable with
632+ // `generic_const_exprs`
633+ DefineOpaqueTypes :: Yes ,
628634 c1,
629635 c2,
630636 ) {
0 commit comments