From 6bff7f45f1d32d1494cf8ebe48956ca4e5baf315 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Mon, 22 Apr 2024 13:11:29 +0000 Subject: [PATCH] Use `DefiningOpaqueTypes::Yes`, as the `InferCtxt` we use has no opaque types it may define --- compiler/rustc_trait_selection/src/traits/auto_trait.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_trait_selection/src/traits/auto_trait.rs b/compiler/rustc_trait_selection/src/traits/auto_trait.rs index 73e94da165f..eb6118ba13d 100644 --- a/compiler/rustc_trait_selection/src/traits/auto_trait.rs +++ b/compiler/rustc_trait_selection/src/traits/auto_trait.rs @@ -789,7 +789,7 @@ impl<'tcx> AutoTraitFinder<'tcx> { match (evaluate(c1), evaluate(c2)) { (Ok(c1), Ok(c2)) => { - match selcx.infcx.at(&obligation.cause, obligation.param_env).eq(DefineOpaqueTypes::No,c1, c2) + match selcx.infcx.at(&obligation.cause, obligation.param_env).eq(DefineOpaqueTypes::Yes,c1, c2) { Ok(_) => (), Err(_) => return false,