Auto merge of #98041 - jackh726:remove-regionckmode, r=oli-obk
Remove RegionckMode in favor of calling new skip_region_resolution Simple cleanup. We can skip a bunch of stuff for places where NLL does the region checking, so skip earlier. r? rust-lang/types
This commit is contained in:
commit
4e02a9281d
8 changed files with 52 additions and 80 deletions
|
@ -5,7 +5,7 @@
|
|||
//! [trait-specialization]: https://rustc-dev-guide.rust-lang.org/traits/specialization.html
|
||||
|
||||
use crate::infer::outlives::env::OutlivesEnvironment;
|
||||
use crate::infer::{CombinedSnapshot, InferOk, RegionckMode};
|
||||
use crate::infer::{CombinedSnapshot, InferOk};
|
||||
use crate::traits::select::IntercrateAmbiguityCause;
|
||||
use crate::traits::util::impl_subject_and_oblig;
|
||||
use crate::traits::SkipLeakCheck;
|
||||
|
@ -413,7 +413,7 @@ fn resolve_negative_obligation<'cx, 'tcx>(
|
|||
param_env,
|
||||
);
|
||||
|
||||
let errors = infcx.resolve_regions(region_context, &outlives_env, RegionckMode::default());
|
||||
let errors = infcx.resolve_regions(region_context, &outlives_env);
|
||||
|
||||
if !errors.is_empty() {
|
||||
return false;
|
||||
|
|
|
@ -23,7 +23,7 @@ mod util;
|
|||
pub mod wf;
|
||||
|
||||
use crate::infer::outlives::env::OutlivesEnvironment;
|
||||
use crate::infer::{InferCtxt, RegionckMode, TyCtxtInferExt};
|
||||
use crate::infer::{InferCtxt, TyCtxtInferExt};
|
||||
use crate::traits::error_reporting::InferCtxtExt as _;
|
||||
use crate::traits::query::evaluate_obligation::InferCtxtExt as _;
|
||||
use rustc_errors::ErrorGuaranteed;
|
||||
|
@ -240,11 +240,7 @@ fn do_normalize_predicates<'tcx>(
|
|||
// cares about declarations like `'a: 'b`.
|
||||
let outlives_env = OutlivesEnvironment::new(elaborated_env);
|
||||
|
||||
infcx.resolve_regions_and_report_errors(
|
||||
region_context,
|
||||
&outlives_env,
|
||||
RegionckMode::default(),
|
||||
);
|
||||
infcx.resolve_regions_and_report_errors(region_context, &outlives_env);
|
||||
|
||||
let predicates = match infcx.fully_resolve(predicates) {
|
||||
Ok(predicates) => predicates,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue