region error cleanup

- require `TypeErrCtxt` to always result in an error
- move `resolve_regions_and_report_errors` to the `ObligationCtxt`
- merge `process_registered_region_obligations` into `resolve_regions`
This commit is contained in:
lcnr
2023-04-12 10:24:36 +02:00
parent 0d7ed3ba84
commit a19adefa0e
13 changed files with 183 additions and 236 deletions

View File

@@ -117,10 +117,6 @@ pub fn type_allowed_to_implement_copy<'tcx>(
FxIndexSet::from_iter([self_type]),
),
);
infcx.process_registered_region_obligations(
outlives_env.region_bound_pairs(),
param_env,
);
let errors = infcx.resolve_regions(&outlives_env);
if !errors.is_empty() {
infringing.push((field, ty, InfringingFieldsReason::Regions(errors)));