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

@@ -325,7 +325,9 @@ fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: LocalDef
// Finally, resolve all regions.
let outlives_env = OutlivesEnvironment::new(param_env);
let _ = infcx.check_region_obligations_and_report_errors(impl_did, &outlives_env);
let _ = infcx
.err_ctxt()
.check_region_obligations_and_report_errors(impl_did, &outlives_env);
}
}
_ => {
@@ -565,7 +567,7 @@ pub fn coerce_unsized_info<'tcx>(tcx: TyCtxt<'tcx>, impl_did: DefId) -> CoerceUn
// Finally, resolve all regions.
let outlives_env = OutlivesEnvironment::new(param_env);
let _ = infcx.check_region_obligations_and_report_errors(impl_did, &outlives_env);
let _ = infcx.err_ctxt().check_region_obligations_and_report_errors(impl_did, &outlives_env);
CoerceUnsizedInfo { custom_kind: kind }
}