Rollup merge of #134827 - compiler-errors:borrowck-nits, r=lqd
Some random region tweaks Remove a redundant function and add an assertion that I think is useful
This commit is contained in:
commit
2d96f2a48f
3 changed files with 7 additions and 6 deletions
|
@ -140,6 +140,12 @@ pub(crate) fn type_check<'a, 'tcx>(
|
|||
&mut constraints,
|
||||
);
|
||||
|
||||
let pre_obligations = infcx.take_registered_region_obligations();
|
||||
assert!(
|
||||
pre_obligations.is_empty(),
|
||||
"there should be no incoming region obligations = {pre_obligations:#?}",
|
||||
);
|
||||
|
||||
debug!(?normalized_inputs_and_output);
|
||||
|
||||
let mut typeck = TypeChecker {
|
||||
|
|
|
@ -299,10 +299,6 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
|
|||
self.storage.var_infos.len()
|
||||
}
|
||||
|
||||
pub fn region_constraint_data(&self) -> &RegionConstraintData<'tcx> {
|
||||
&self.storage.data
|
||||
}
|
||||
|
||||
/// Takes (and clears) the current set of constraints. Note that
|
||||
/// the set of variables remains intact, but all relationships
|
||||
/// between them are reset. This is used during NLL checking to
|
||||
|
|
|
@ -161,8 +161,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
|
|||
let outlives_env = OutlivesEnvironment::new(full_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();
|
||||
let region_data = infcx.inner.borrow_mut().unwrap_region_constraints().data().clone();
|
||||
|
||||
let vid_to_region = self.map_vid_to_region(®ion_data);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue