Move check_region_obligations_and_report_errors to TypeErrCtxt
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user