only use FnCtxt
for regionck inside of bodies
This commit is contained in:
parent
edd45f9d41
commit
68d70fc5bd
7 changed files with 54 additions and 54 deletions
|
@ -69,6 +69,7 @@ use crate::traits::{ObligationCause, ObligationCauseCode};
|
|||
use rustc_middle::ty::subst::GenericArgKind;
|
||||
use rustc_middle::ty::{self, Region, Ty, TyCtxt, TypeFoldable};
|
||||
|
||||
use crate::infer::outlives::env::OutlivesEnvironment;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::undo_log::UndoLogs;
|
||||
use rustc_hir as hir;
|
||||
|
@ -177,6 +178,18 @@ impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn check_region_obligations_and_report_errors(
|
||||
&self,
|
||||
outlives_env: &OutlivesEnvironment<'tcx>,
|
||||
) {
|
||||
self.process_registered_region_obligations(
|
||||
outlives_env.region_bound_pairs_map(),
|
||||
outlives_env.param_env,
|
||||
);
|
||||
|
||||
self.resolve_regions_and_report_errors(outlives_env)
|
||||
}
|
||||
}
|
||||
|
||||
/// The `TypeOutlives` struct has the job of "lowering" a `T: 'a`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue