split out AliasTy -> AliasTerm
This commit is contained in:
parent
ecbe3fd550
commit
3bcdf3058e
70 changed files with 715 additions and 414 deletions
|
|
@ -7,7 +7,7 @@ use rustc_infer::infer::InferCtxt;
|
|||
use rustc_infer::traits::TraitEngineExt;
|
||||
use rustc_infer::traits::{FulfillmentError, Obligation, TraitEngine};
|
||||
use rustc_middle::traits::ObligationCause;
|
||||
use rustc_middle::ty::{self, AliasTy, Ty, TyCtxt, UniverseIndex};
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt, UniverseIndex};
|
||||
use rustc_middle::ty::{FallibleTypeFolder, TypeFolder, TypeSuperFoldable};
|
||||
use rustc_middle::ty::{TypeFoldable, TypeVisitableExt};
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ impl<'tcx> NormalizationFolder<'_, 'tcx> {
|
|||
};
|
||||
|
||||
self.at.infcx.err_ctxt().report_overflow_error(
|
||||
OverflowCause::DeeplyNormalize(data),
|
||||
OverflowCause::DeeplyNormalize(data.into()),
|
||||
self.at.cause.span,
|
||||
true,
|
||||
|_| {},
|
||||
|
|
@ -108,7 +108,7 @@ impl<'tcx> NormalizationFolder<'_, 'tcx> {
|
|||
let recursion_limit = tcx.recursion_limit();
|
||||
if !recursion_limit.value_within_limit(self.depth) {
|
||||
self.at.infcx.err_ctxt().report_overflow_error(
|
||||
OverflowCause::DeeplyNormalize(ty::AliasTy::new(tcx, uv.def, uv.args)),
|
||||
OverflowCause::DeeplyNormalize(uv.into()),
|
||||
self.at.cause.span,
|
||||
true,
|
||||
|_| {},
|
||||
|
|
@ -122,10 +122,7 @@ impl<'tcx> NormalizationFolder<'_, 'tcx> {
|
|||
tcx,
|
||||
self.at.cause.clone(),
|
||||
self.at.param_env,
|
||||
ty::NormalizesTo {
|
||||
alias: AliasTy::new(tcx, uv.def, uv.args),
|
||||
term: new_infer_ct.into(),
|
||||
},
|
||||
ty::NormalizesTo { alias: uv.into(), term: new_infer_ct.into() },
|
||||
);
|
||||
|
||||
let result = if infcx.predicate_may_hold(&obligation) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue