1
Fork 0

Uplift TypeRelation and Relate

This commit is contained in:
Michael Goulet 2024-06-04 16:02:36 -04:00
parent 82ef3ad980
commit 91274c84b9
34 changed files with 1114 additions and 866 deletions

View file

@ -37,11 +37,11 @@ pub(super) mod canonical;
mod probe;
mod select;
pub struct EvalCtxt<
'a,
pub struct EvalCtxt<'a, Infcx, I = <Infcx as InferCtxtLike>::Interner>
where
Infcx: InferCtxtLike<Interner = I>,
I: Interner = <Infcx as InferCtxtLike>::Interner,
> {
I: Interner,
{
/// The inference context that backs (mostly) inference and placeholder terms
/// instantiated while solving goals.
///

View file

@ -32,6 +32,8 @@ use rustc_data_structures::stack::ensure_sufficient_stack;
use rustc_errors::{Diag, EmissionGuarantee};
use rustc_hir as hir;
use rustc_hir::def_id::DefId;
use rustc_infer::infer::relate::MatchAgainstFreshVars;
use rustc_infer::infer::relate::TypeRelation;
use rustc_infer::infer::BoundRegionConversionTime;
use rustc_infer::infer::BoundRegionConversionTime::HigherRankedType;
use rustc_infer::infer::DefineOpaqueTypes;
@ -40,11 +42,9 @@ use rustc_middle::bug;
use rustc_middle::dep_graph::dep_kinds;
use rustc_middle::dep_graph::DepNodeIndex;
use rustc_middle::mir::interpret::ErrorHandled;
use rustc_middle::ty::_match::MatchAgainstFreshVars;
use rustc_middle::ty::abstract_const::NotConstEvaluatable;
use rustc_middle::ty::error::TypeErrorToStringExt;
use rustc_middle::ty::print::PrintTraitRefExt as _;
use rustc_middle::ty::relate::TypeRelation;
use rustc_middle::ty::GenericArgsRef;
use rustc_middle::ty::{self, PolyProjectionPredicate, Upcast};
use rustc_middle::ty::{Ty, TyCtxt, TypeFoldable, TypeVisitableExt};