Rollup merge of #110220 - lcnr:regionzz, r=compiler-errors

cleanup our region error API

- require `TypeErrCtxt` to always result in an error, closing #108810
- move `resolve_regions_and_report_errors` to the `ObligationCtxt`
- call `process_registered_region_obligations` in `resolve_regions`
- move `resolve_regions` into the `outlives` submodule
- add `#[must_use]` to functions returning lists of errors

r? types
This commit is contained in:
Matthias Krüger 2023-04-13 11:21:05 +02:00 committed by GitHub
commit 6f1500aec2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 192 additions and 237 deletions

View file

@ -186,7 +186,8 @@ impl<'tcx> AutoTraitFinder<'tcx> {
panic!("Unable to fulfill trait {:?} for '{:?}': {:?}", trait_did, ty, errors);
}
infcx.process_registered_region_obligations(&Default::default(), full_env);
let outlives_env = OutlivesEnvironment::new(full_env);
infcx.process_registered_region_obligations(&outlives_env);
let region_data =
infcx.inner.borrow_mut().unwrap_region_constraints().region_constraint_data().clone();