diff options
| author | bors <bors@rust-lang.org> | 2022-06-14 05:07:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-06-14 05:07:11 +0000 |
| commit | 4e02a9281dd8c74cf5c04df044659b5e03b17571 (patch) | |
| tree | bdcd5a540aae7f13c704872c9bcf79bf365a853b /compiler/rustc_trait_selection/src/traits | |
| parent | a2ecbf87cf355a121a62f0629ea5f880c9bf41fc (diff) | |
| parent | d716245aa60a5d556c9c2922726183c05a7d945a (diff) | |
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
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/coherence.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/mod.rs | 8 |
2 files changed, 4 insertions, 8 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/coherence.rs b/compiler/rustc_trait_selection/src/traits/coherence.rs index e7f0e47f12c..b37db4b9e18 100644 --- a/compiler/rustc_trait_selection/src/traits/coherence.rs +++ b/compiler/rustc_trait_selection/src/traits/coherence.rs @@ -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; diff --git a/compiler/rustc_trait_selection/src/traits/mod.rs b/compiler/rustc_trait_selection/src/traits/mod.rs index 03757b5447e..34b0f431b8e 100644 --- a/compiler/rustc_trait_selection/src/traits/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/mod.rs @@ -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, |
