Convert a &Lrc<T> argument to Lrc<T>.

It's slightly simpler.
This commit is contained in:
Nicholas Nethercote 2024-10-07 13:06:28 +11:00
parent 731469fee5
commit 860cbccad9
3 changed files with 12 additions and 4 deletions

View File

@ -776,7 +776,7 @@ pub fn member_constraint(
definition_span: Span,
hidden_ty: Ty<'tcx>,
region: ty::Region<'tcx>,
in_regions: &Lrc<Vec<ty::Region<'tcx>>>,
in_regions: Lrc<Vec<ty::Region<'tcx>>>,
) {
self.inner.borrow_mut().unwrap_region_constraints().member_constraint(
key,

View File

@ -359,7 +359,15 @@ pub fn register_member_constraints(
// not currently sound until we have existential regions.
concrete_ty.visit_with(&mut ConstrainOpaqueTypeRegionVisitor {
tcx: self.tcx,
op: |r| self.member_constraint(opaque_type_key, span, concrete_ty, r, &choice_regions),
op: |r| {
self.member_constraint(
opaque_type_key,
span,
concrete_ty,
r,
choice_regions.clone(),
)
},
});
}
}

View File

@ -522,7 +522,7 @@ pub(super) fn member_constraint(
definition_span: Span,
hidden_ty: Ty<'tcx>,
member_region: ty::Region<'tcx>,
choice_regions: &Lrc<Vec<ty::Region<'tcx>>>,
choice_regions: Lrc<Vec<ty::Region<'tcx>>>,
) {
debug!("member_constraint({:?} in {:#?})", member_region, choice_regions);
@ -535,7 +535,7 @@ pub(super) fn member_constraint(
definition_span,
hidden_ty,
member_region,
choice_regions: choice_regions.clone(),
choice_regions,
});
}