Rollup merge of #106164 - compiler-errors:check-region-tweak, r=oli-obk

Move `check_region_obligations_and_report_errors` to `TypeErrCtxt`

Makes sense for this function to live with its sibling `resolve_regions_and_report_errors`, around which it's basically just a wrapper.
This commit is contained in:
fee1-dead
2023-01-09 23:35:29 +08:00
committed by GitHub
7 changed files with 34 additions and 31 deletions

View File

@@ -116,7 +116,9 @@ pub(super) fn enter_wf_checking_ctxt<'tcx, F>(
let outlives_environment =
OutlivesEnvironment::with_bounds(param_env, Some(infcx), implied_bounds);
let _ = infcx.check_region_obligations_and_report_errors(body_def_id, &outlives_environment);
let _ = infcx
.err_ctxt()
.check_region_obligations_and_report_errors(body_def_id, &outlives_environment);
}
fn check_well_formed(tcx: TyCtxt<'_>, def_id: hir::OwnerId) {