about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src/member_constraints.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_borrowck/src/member_constraints.rs')
-rw-r--r--compiler/rustc_borrowck/src/member_constraints.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/compiler/rustc_borrowck/src/member_constraints.rs b/compiler/rustc_borrowck/src/member_constraints.rs
index f920d9d5c3f..61838c41e39 100644
--- a/compiler/rustc_borrowck/src/member_constraints.rs
+++ b/compiler/rustc_borrowck/src/member_constraints.rs
@@ -8,7 +8,7 @@ use std::ops::Index;
 
 /// Compactly stores a set of `R0 member of [R1...Rn]` constraints,
 /// indexed by the region `R0`.
-crate struct MemberConstraintSet<'tcx, R>
+pub(crate) struct MemberConstraintSet<'tcx, R>
 where
     R: Copy + Eq,
 {
@@ -28,17 +28,17 @@ where
 }
 
 /// Represents a `R0 member of [R1..Rn]` constraint
-crate struct NllMemberConstraint<'tcx> {
+pub(crate) struct NllMemberConstraint<'tcx> {
     next_constraint: Option<NllMemberConstraintIndex>,
 
     /// The span where the hidden type was instantiated.
-    crate definition_span: Span,
+    pub(crate) definition_span: Span,
 
     /// The hidden type in which `R0` appears. (Used in error reporting.)
-    crate hidden_ty: Ty<'tcx>,
+    pub(crate) hidden_ty: Ty<'tcx>,
 
     /// The region `R0`.
-    crate member_region_vid: ty::RegionVid,
+    pub(crate) member_region_vid: ty::RegionVid,
 
     /// Index of `R1` in `choice_regions` vector from `MemberConstraintSet`.
     start_index: usize,
@@ -48,7 +48,7 @@ crate struct NllMemberConstraint<'tcx> {
 }
 
 rustc_index::newtype_index! {
-    crate struct NllMemberConstraintIndex {
+    pub(crate) struct NllMemberConstraintIndex {
         DEBUG_FORMAT = "MemberConstraintIndex({})"
     }
 }
@@ -73,7 +73,7 @@ impl<'tcx> MemberConstraintSet<'tcx, ty::RegionVid> {
     /// within into `RegionVid` format -- it typically consults the
     /// `UniversalRegions` data structure that is known to the caller
     /// (but which this code is unaware of).
-    crate fn push_constraint(
+    pub(crate) fn push_constraint(
         &mut self,
         m_c: &MemberConstraint<'tcx>,
         mut to_region_vid: impl FnMut(ty::Region<'tcx>) -> ty::RegionVid,
@@ -106,7 +106,7 @@ where
     /// the original `RegionVid` to an scc index. In some cases, we
     /// may have multiple `R1` values mapping to the same `R2` key -- that
     /// is ok, the two sets will be merged.
-    crate fn into_mapped<R2>(
+    pub(crate) fn into_mapped<R2>(
         self,
         mut map_fn: impl FnMut(R1) -> R2,
     ) -> MemberConstraintSet<'tcx, R2>
@@ -144,14 +144,14 @@ impl<R> MemberConstraintSet<'_, R>
 where
     R: Copy + Hash + Eq,
 {
-    crate fn all_indices(&self) -> impl Iterator<Item = NllMemberConstraintIndex> + '_ {
+    pub(crate) fn all_indices(&self) -> impl Iterator<Item = NllMemberConstraintIndex> + '_ {
         self.constraints.indices()
     }
 
     /// Iterate down the constraint indices associated with a given
     /// peek-region.  You can then use `choice_regions` and other
     /// methods to access data.
-    crate fn indices(
+    pub(crate) fn indices(
         &self,
         member_region_vid: R,
     ) -> impl Iterator<Item = NllMemberConstraintIndex> + '_ {
@@ -172,7 +172,7 @@ where
     /// ```text
     /// R0 member of [R1..Rn]
     /// ```
-    crate fn choice_regions(&self, pci: NllMemberConstraintIndex) -> &[ty::RegionVid] {
+    pub(crate) fn choice_regions(&self, pci: NllMemberConstraintIndex) -> &[ty::RegionVid] {
         let NllMemberConstraint { start_index, end_index, .. } = &self.constraints[pci];
         &self.choice_regions[*start_index..*end_index]
     }