Skip to content

Commit

Permalink
Make a minimal amount of region APIs public
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier Denis authored and Xavier Denis committed May 8, 2024
1 parent 31e6e8c commit 202e3ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_borrowck/src/region_infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1329,13 +1329,13 @@ impl<'tcx> RegionInferenceContext<'tcx> {
}

// Evaluate whether `sup_region == sub_region`.
fn eval_equal(&self, r1: RegionVid, r2: RegionVid) -> bool {
pub fn eval_equal(&self, r1: RegionVid, r2: RegionVid) -> bool {
self.eval_outlives(r1, r2) && self.eval_outlives(r2, r1)
}

// Evaluate whether `sup_region: sub_region`.
#[instrument(skip(self), level = "debug", ret)]
fn eval_outlives(&self, sup_region: RegionVid, sub_region: RegionVid) -> bool {
pub fn eval_outlives(&self, sup_region: RegionVid, sub_region: RegionVid) -> bool {
debug!(
"sup_region's value = {:?} universal={:?}",
self.region_value_str(sup_region),
Expand Down Expand Up @@ -2248,7 +2248,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
}

/// Access to the SCC constraint graph.
pub(crate) fn constraint_sccs(&self) -> &Sccs<RegionVid, ConstraintSccIndex> {
pub fn constraint_sccs(&self) -> &Sccs<RegionVid, ConstraintSccIndex> {
self.constraint_sccs.as_ref()
}

Expand Down

0 comments on commit 202e3ed

Please sign in to comment.