diff options
| author | Michael Goulet <michael@errs.io> | 2025-07-13 19:22:09 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-07-13 19:22:17 +0000 |
| commit | f6f2f83043001592f656fa988ef6015694d52ee9 (patch) | |
| tree | 3be8d92138aacd459257d1fa7bd72645b251b823 /compiler/rustc_trait_selection/src | |
| parent | c2c9aad3f69515019a849e3c5451e7a1482febb0 (diff) | |
| download | rust-f6f2f83043001592f656fa988ef6015694d52ee9.tar.gz rust-f6f2f83043001592f656fa988ef6015694d52ee9.zip | |
Simplify make_query_region_constraints
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/delegate.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs | 5 |
2 files changed, 2 insertions, 11 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/delegate.rs b/compiler/rustc_trait_selection/src/solve/delegate.rs index d22529d56a4..1a24254d57f 100644 --- a/compiler/rustc_trait_selection/src/solve/delegate.rs +++ b/compiler/rustc_trait_selection/src/solve/delegate.rs @@ -213,13 +213,7 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate< // inside of a `probe` whenever we have multiple choices inside of the solver. let region_obligations = self.0.inner.borrow().region_obligations().to_owned(); let region_constraints = self.0.with_region_constraints(|region_constraints| { - make_query_region_constraints( - self.tcx, - region_obligations - .iter() - .map(|r_o| (r_o.sup_type, r_o.sub_region, r_o.origin.to_constraint_category())), - region_constraints, - ) + make_query_region_constraints(self.tcx, region_obligations, region_constraints) }); let mut seen = FxHashSet::default(); diff --git a/compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs b/compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs index 18010603286..3b549244431 100644 --- a/compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs +++ b/compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs @@ -103,10 +103,7 @@ where let region_constraint_data = infcx.take_and_reset_region_constraints(); let region_constraints = query_response::make_query_region_constraints( infcx.tcx, - region_obligations - .iter() - .map(|r_o| (r_o.sup_type, r_o.sub_region, r_o.origin.to_constraint_category())) - .map(|(ty, r, cc)| (infcx.resolve_vars_if_possible(ty), r, cc)), + region_obligations, ®ion_constraint_data, ); |
