From b64f687cb01641c7e7a2d7b951f2e2d9c5044741 Mon Sep 17 00:00:00 2001 From: lcnr Date: Thu, 25 Apr 2024 20:19:01 +0000 Subject: [PATCH] use `EagerResolver` --- compiler/rustc_trait_selection/src/solve/inspect/analyse.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_trait_selection/src/solve/inspect/analyse.rs b/compiler/rustc_trait_selection/src/solve/inspect/analyse.rs index dbded4cbd37..f137780c536 100644 --- a/compiler/rustc_trait_selection/src/solve/inspect/analyse.rs +++ b/compiler/rustc_trait_selection/src/solve/inspect/analyse.rs @@ -11,6 +11,7 @@ use rustc_ast_ir::try_visit; use rustc_ast_ir::visit::VisitorResult; +use rustc_infer::infer::resolve::EagerResolver; use rustc_infer::infer::type_variable::TypeVariableOrigin; use rustc_infer::infer::{DefineOpaqueTypes, InferCtxt, InferOk}; use rustc_middle::infer::unify_key::ConstVariableOrigin; @@ -19,6 +20,7 @@ use rustc_middle::traits::solve::{Certainty, Goal}; use rustc_middle::traits::ObligationCause; use rustc_middle::ty; +use rustc_middle::ty::TypeFoldable; use rustc_span::Span; use crate::solve::eval_ctxt::canonical; @@ -254,7 +256,7 @@ fn new( infcx, depth, orig_values, - goal: infcx.resolve_vars_if_possible(root.uncanonicalized_goal), + goal: root.uncanonicalized_goal.fold_with(&mut EagerResolver::new(infcx)), evaluation: root, }, inspect::GoalEvaluationKind::Nested { .. } => unreachable!(),