Auto merge of #99796 - compiler-errors:issue-53475, r=oli-obk
use `check_region_obligations_and_report_errors` to avoid ICEs If we don't call `process_registered_region_obligations` before `resolve_regions_and_report_errors` then we'll ICE if we have any region obligations, and `check_region_obligations_and_report_errors` just does both of these for us in a nice convenient function. Fixes #53475 r? types
This commit is contained in:
commit
110777b60c
8 changed files with 45 additions and 13 deletions
|
@ -1325,6 +1325,10 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||
/// result. After this, no more unification operations should be
|
||||
/// done -- or the compiler will panic -- but it is legal to use
|
||||
/// `resolve_vars_if_possible` as well as `fully_resolve`.
|
||||
///
|
||||
/// Make sure to call [`InferCtxt::process_registered_region_obligations`]
|
||||
/// first, or preferrably use [`InferCtxt::check_region_obligations_and_report_errors`]
|
||||
/// to do both of these operations together.
|
||||
pub fn resolve_regions_and_report_errors(
|
||||
&self,
|
||||
generic_param_scope: LocalDefId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue