Deeply normalize when processing registered region obligations

This commit is contained in:
Michael Goulet
2023-12-18 22:45:34 +00:00
parent e11a6a9cac
commit 028d29301f
17 changed files with 90 additions and 12 deletions

View File

@@ -179,7 +179,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
}
let outlives_env = OutlivesEnvironment::new(full_env);
infcx.process_registered_region_obligations(&outlives_env);
let _ = infcx.process_registered_region_obligations::<!>(&outlives_env, |ty| Ok(ty));
let region_data =
infcx.inner.borrow_mut().unwrap_region_constraints().region_constraint_data().clone();

View File

@@ -6,6 +6,7 @@
use crate::infer::outlives::env::OutlivesEnvironment;
use crate::infer::InferOk;
use crate::regions::InferCtxtRegionExt;
use crate::solve::inspect::{InspectGoal, ProofTreeInferCtxtExt, ProofTreeVisitor};
use crate::solve::{deeply_normalize_for_diagnostics, inspect};
use crate::traits::engine::TraitEngineExt;

View File

@@ -3,6 +3,7 @@ use std::fmt::Debug;
use super::FulfillmentContext;
use super::TraitEngine;
use crate::regions::InferCtxtRegionExt;
use crate::solve::FulfillmentCtxt as NextFulfillmentCtxt;
use crate::traits::error_reporting::TypeErrCtxtExt;
use crate::traits::NormalizeExt;

View File

@@ -1,5 +1,6 @@
//! Miscellaneous type-system utilities that are too small to deserve their own modules.
use crate::regions::InferCtxtRegionExt;
use crate::traits::{self, ObligationCause, ObligationCtxt};
use hir::LangItem;

View File

@@ -25,6 +25,7 @@ pub mod wf;
use crate::infer::outlives::env::OutlivesEnvironment;
use crate::infer::{InferCtxt, TyCtxtInferExt};
use crate::regions::InferCtxtRegionExt;
use crate::traits::error_reporting::TypeErrCtxtExt as _;
use crate::traits::query::evaluate_obligation::InferCtxtExt as _;
use rustc_errors::ErrorGuaranteed;