Skip to content

Commit 860cbcc

Browse files
committed
Convert a &Lrc<T> argument to Lrc<T>.
It's slightly simpler.
1 parent 731469f commit 860cbcc

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

compiler/rustc_infer/src/infer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ impl<'tcx> InferCtxt<'tcx> {
776776
definition_span: Span,
777777
hidden_ty: Ty<'tcx>,
778778
region: ty::Region<'tcx>,
779-
in_regions: &Lrc<Vec<ty::Region<'tcx>>>,
779+
in_regions: Lrc<Vec<ty::Region<'tcx>>>,
780780
) {
781781
self.inner.borrow_mut().unwrap_region_constraints().member_constraint(
782782
key,

compiler/rustc_infer/src/infer/opaque_types/mod.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,15 @@ impl<'tcx> InferCtxt<'tcx> {
359359
// not currently sound until we have existential regions.
360360
concrete_ty.visit_with(&mut ConstrainOpaqueTypeRegionVisitor {
361361
tcx: self.tcx,
362-
op: |r| self.member_constraint(opaque_type_key, span, concrete_ty, r, &choice_regions),
362+
op: |r| {
363+
self.member_constraint(
364+
opaque_type_key,
365+
span,
366+
concrete_ty,
367+
r,
368+
choice_regions.clone(),
369+
)
370+
},
363371
});
364372
}
365373
}

compiler/rustc_infer/src/infer/region_constraints/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
522522
definition_span: Span,
523523
hidden_ty: Ty<'tcx>,
524524
member_region: ty::Region<'tcx>,
525-
choice_regions: &Lrc<Vec<ty::Region<'tcx>>>,
525+
choice_regions: Lrc<Vec<ty::Region<'tcx>>>,
526526
) {
527527
debug!("member_constraint({:?} in {:#?})", member_region, choice_regions);
528528

@@ -535,7 +535,7 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
535535
definition_span,
536536
hidden_ty,
537537
member_region,
538-
choice_regions: choice_regions.clone(),
538+
choice_regions,
539539
});
540540
}
541541

0 commit comments

Comments
 (0)