From ed11fbe5dfc4abab912f5b6b80191730d9e64e61 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 29 Oct 2024 13:08:50 +1100 Subject: [PATCH] Make `TypeChecker::region_bound_pairs` owned. No reason not to be, and it's simpler that way. --- compiler/rustc_borrowck/src/type_check/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs index b9bf052f00295..bca57d645dde9 100644 --- a/compiler/rustc_borrowck/src/type_check/mod.rs +++ b/compiler/rustc_borrowck/src/type_check/mod.rs @@ -162,7 +162,7 @@ pub(crate) fn type_check<'a, 'tcx>( last_span: body.span, body, user_type_annotations: &body.user_type_annotations, - region_bound_pairs: ®ion_bound_pairs, + region_bound_pairs, known_type_outlives_obligations, implicit_region_bound, reported_errors: Default::default(), @@ -843,7 +843,7 @@ struct TypeChecker<'a, 'tcx> { /// User type annotations are shared between the main MIR and the MIR of /// all of the promoted items. user_type_annotations: &'a CanonicalUserTypeAnnotations<'tcx>, - region_bound_pairs: &'a RegionBoundPairs<'tcx>, + region_bound_pairs: RegionBoundPairs<'tcx>, known_type_outlives_obligations: Vec>, implicit_region_bound: ty::Region<'tcx>, reported_errors: FxIndexSet<(Ty<'tcx>, Span)>, @@ -1025,7 +1025,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { constraint_conversion::ConstraintConversion::new( self.infcx, self.universal_regions, - self.region_bound_pairs, + &self.region_bound_pairs, self.implicit_region_bound, self.param_env, &self.known_type_outlives_obligations, @@ -2787,7 +2787,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { constraint_conversion::ConstraintConversion::new( self.infcx, self.universal_regions, - self.region_bound_pairs, + &self.region_bound_pairs, self.implicit_region_bound, self.param_env, &self.known_type_outlives_obligations,