From 066a973312066b792c5de4b41b92dcb437f22bac Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Fri, 25 Jul 2025 20:34:36 +1000 Subject: Overhaul `Constraint`. This commit changes it to store a `Region` instead of a `RegionVid` for the `Var` cases: - We avoid having to call `Region::new_var` to re-create `Region`s from `RegionVid`s in a few places, avoiding the interning process, giving a small perf win. (At the cost of the type allowing some invalid combinations of values.) - All the cases now store two `Region`s, so the commit also separates the `ConstraintKind` (a new type) from the `sub` and `sup` arguments in `Constraint`. --- compiler/rustc_trait_selection/src/solve/delegate.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'compiler/rustc_trait_selection/src/solve/delegate.rs') diff --git a/compiler/rustc_trait_selection/src/solve/delegate.rs b/compiler/rustc_trait_selection/src/solve/delegate.rs index 7426504e139..96c6e589373 100644 --- a/compiler/rustc_trait_selection/src/solve/delegate.rs +++ b/compiler/rustc_trait_selection/src/solve/delegate.rs @@ -205,7 +205,6 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate< let region_assumptions = self.0.inner.borrow().region_assumptions().to_owned(); let region_constraints = self.0.with_region_constraints(|region_constraints| { make_query_region_constraints( - self.tcx, region_obligations, region_constraints, region_assumptions, -- cgit 1.4.1-3-g733a5