Move check_region_obligations_and_report_errors to TypeErrCtxt

This commit is contained in:
Michael Goulet
2022-12-26 22:41:49 +00:00
parent c7572670a1
commit c104ee9f6d
7 changed files with 34 additions and 31 deletions

View File

@@ -181,7 +181,8 @@ fn get_impl_substs(
let implied_bounds = infcx.implied_bounds_tys(param_env, impl1_hir_id, assumed_wf_types);
let outlives_env = OutlivesEnvironment::with_bounds(param_env, Some(infcx), implied_bounds);
let _ = infcx.check_region_obligations_and_report_errors(impl1_def_id, &outlives_env);
let _ =
infcx.err_ctxt().check_region_obligations_and_report_errors(impl1_def_id, &outlives_env);
let Ok(impl2_substs) = infcx.fully_resolve(impl2_substs) else {
let span = tcx.def_span(impl1_def_id);
tcx.sess.emit_err(SubstsOnOverriddenImpl { span });