Skip to content

Commit c6eeeb0

Browse files
committed
Make TypeChecker::region_bound_pairs owned.
No reason not to be, and it's simpler that way.
1 parent a58a717 commit c6eeeb0

File tree

1 file changed

+4
-4
lines changed
  • compiler/rustc_borrowck/src/type_check

1 file changed

+4
-4
lines changed

compiler/rustc_borrowck/src/type_check/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ pub(crate) fn type_check<'a, 'tcx>(
162162
last_span: body.span,
163163
body,
164164
user_type_annotations: &body.user_type_annotations,
165-
region_bound_pairs: &region_bound_pairs,
165+
region_bound_pairs,
166166
known_type_outlives_obligations,
167167
implicit_region_bound,
168168
reported_errors: Default::default(),
@@ -843,7 +843,7 @@ struct TypeChecker<'a, 'tcx> {
843843
/// User type annotations are shared between the main MIR and the MIR of
844844
/// all of the promoted items.
845845
user_type_annotations: &'a CanonicalUserTypeAnnotations<'tcx>,
846-
region_bound_pairs: &'a RegionBoundPairs<'tcx>,
846+
region_bound_pairs: RegionBoundPairs<'tcx>,
847847
known_type_outlives_obligations: Vec<ty::PolyTypeOutlivesPredicate<'tcx>>,
848848
implicit_region_bound: ty::Region<'tcx>,
849849
reported_errors: FxIndexSet<(Ty<'tcx>, Span)>,
@@ -1025,7 +1025,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
10251025
constraint_conversion::ConstraintConversion::new(
10261026
self.infcx,
10271027
self.universal_regions,
1028-
self.region_bound_pairs,
1028+
&self.region_bound_pairs,
10291029
self.implicit_region_bound,
10301030
self.param_env,
10311031
&self.known_type_outlives_obligations,
@@ -2785,7 +2785,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
27852785
constraint_conversion::ConstraintConversion::new(
27862786
self.infcx,
27872787
self.universal_regions,
2788-
self.region_bound_pairs,
2788+
&self.region_bound_pairs,
27892789
self.implicit_region_bound,
27902790
self.param_env,
27912791
&self.known_type_outlives_obligations,

0 commit comments

Comments
 (0)