diff options
| author | lcnr <rust@lcnr.de> | 2024-07-23 14:21:52 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2024-08-12 10:33:04 +0200 |
| commit | 7b86c98068f0b4280598f36e655b5e83d21f9258 (patch) | |
| tree | b3174843c3a3459fa3d8c81d6f86e0569f4919f3 /compiler/rustc_trait_selection/src | |
| parent | 1d8f135b20fac63c493d5963ce02963b46ca0986 (diff) | |
| download | rust-7b86c98068f0b4280598f36e655b5e83d21f9258.tar.gz rust-7b86c98068f0b4280598f36e655b5e83d21f9258.zip | |
do not use the global solver cache for proof trees
doing so requires overwriting global cache entries and generally adds significant complexity to the solver. This is also only ever done for root goals, so it feels easier to wrap the `evaluate_canonical_goal` in an ordinary query if necessary.
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/inspect/analyse.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/inspect/analyse.rs b/compiler/rustc_trait_selection/src/solve/inspect/analyse.rs index e8de8457440..4e4022830d4 100644 --- a/compiler/rustc_trait_selection/src/solve/inspect/analyse.rs +++ b/compiler/rustc_trait_selection/src/solve/inspect/analyse.rs @@ -332,13 +332,9 @@ impl<'a, 'tcx> InspectGoal<'a, 'tcx> { pub fn candidates(&'a self) -> Vec<InspectCandidate<'a, 'tcx>> { let mut candidates = vec![]; - let last_eval_step = match self.evaluation_kind { - inspect::CanonicalGoalEvaluationKind::Overflow - | inspect::CanonicalGoalEvaluationKind::CycleInStack - | inspect::CanonicalGoalEvaluationKind::ProvisionalCacheHit => { - warn!("unexpected root evaluation: {:?}", self.evaluation_kind); - return vec![]; - } + let last_eval_step = match &self.evaluation_kind { + // An annoying edge case in case the recursion limit is 0. + inspect::CanonicalGoalEvaluationKind::Overflow => return vec![], inspect::CanonicalGoalEvaluationKind::Evaluation { final_revision } => final_revision, }; |
