Rollup merge of #109629 - aliemjay:remove-givens, r=lcnr

remove obsolete `givens` from regionck

Revives #107376. The only change is the last commit (2a3177a8bc) which should fix the regression.

Fixes https://github.com/rust-lang/rust/issues/106567

r? `@lcnr`
This commit is contained in:
nils
2023-03-28 12:51:14 +02:00
committed by GitHub
15 changed files with 114 additions and 152 deletions

View File

@@ -330,7 +330,6 @@ fn compare_method_predicate_entailment<'tcx>(
// lifetime parameters.
let outlives_env = OutlivesEnvironment::with_bounds(
param_env,
Some(infcx),
infcx.implied_bounds_tys(param_env, impl_m_def_id, wf_tys.clone()),
);
infcx.process_registered_region_obligations(
@@ -727,7 +726,6 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
// lifetime parameters.
let outlives_environment = OutlivesEnvironment::with_bounds(
param_env,
Some(infcx),
infcx.implied_bounds_tys(param_env, impl_m_def_id, wf_tys),
);
infcx
@@ -2065,8 +2063,7 @@ pub(super) fn check_type_bounds<'tcx>(
// Finally, resolve all regions. This catches wily misuses of
// lifetime parameters.
let implied_bounds = infcx.implied_bounds_tys(param_env, impl_ty_def_id, assumed_wf_types);
let outlives_environment =
OutlivesEnvironment::with_bounds(param_env, Some(&infcx), implied_bounds);
let outlives_environment = OutlivesEnvironment::with_bounds(param_env, implied_bounds);
infcx.err_ctxt().check_region_obligations_and_report_errors(
impl_ty.def_id.expect_local(),