differentiate root and nested goals

This commit is contained in:
lcnr 2023-09-14 15:10:45 +02:00
parent 1b141b6d73
commit 0cb800ec34
6 changed files with 76 additions and 35 deletions

View file

@ -19,7 +19,8 @@ use rustc_infer::infer::canonical::{Canonical, CanonicalVarValues};
use rustc_infer::traits::query::NoSolution;
use rustc_middle::infer::canonical::CanonicalVarInfos;
use rustc_middle::traits::solve::{
CanonicalResponse, Certainty, ExternalConstraintsData, Goal, QueryResult, Response,
CanonicalResponse, Certainty, ExternalConstraintsData, Goal, IsNormalizesToHack, QueryResult,
Response,
};
use rustc_middle::ty::{self, Ty, TyCtxt, UniverseIndex};
use rustc_middle::ty::{
@ -59,6 +60,12 @@ enum SolverMode {
Coherence,
}
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
enum GoalEvaluationKind {
Root,
Nested { is_normalizes_to_hack: IsNormalizesToHack },
}
trait CanonicalResponseExt {
fn has_no_inference_or_external_constraints(&self) -> bool;