Skip to content

Commit

Permalink
Make TypeChecker::region_bound_pairs owned.
Browse files Browse the repository at this point in the history
No reason not to be, and it's simpler that way.
  • Loading branch information
nnethercote committed Nov 19, 2024
1 parent 227ecc8 commit ed11fbe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions compiler/rustc_borrowck/src/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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: &region_bound_pairs,
region_bound_pairs,
known_type_outlives_obligations,
implicit_region_bound,
reported_errors: Default::default(),
Expand Down Expand Up @@ -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<ty::PolyTypeOutlivesPredicate<'tcx>>,
implicit_region_bound: ty::Region<'tcx>,
reported_errors: FxIndexSet<(Ty<'tcx>, Span)>,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit ed11fbe

Please sign in to comment.