Skip to content

Commit f6d2995

Browse files
committed
Make some functions pub(super)
1 parent 1ca9eb8 commit f6d2995

File tree

1 file changed

+14
-14
lines changed
  • compiler/rustc_infer/src/infer/region_constraints

1 file changed

+14
-14
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -426,21 +426,21 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
426426
data
427427
}
428428

429-
pub fn data(&self) -> &RegionConstraintData<'tcx> {
429+
pub(super) fn data(&self) -> &RegionConstraintData<'tcx> {
430430
&self.data
431431
}
432432

433-
pub fn start_snapshot(&mut self) -> RegionSnapshot {
433+
pub(super) fn start_snapshot(&mut self) -> RegionSnapshot {
434434
debug!("RegionConstraintCollector: start_snapshot");
435435
RegionSnapshot { any_unifications: self.any_unifications }
436436
}
437437

438-
pub fn rollback_to(&mut self, snapshot: RegionSnapshot) {
438+
pub(super) fn rollback_to(&mut self, snapshot: RegionSnapshot) {
439439
debug!("RegionConstraintCollector: rollback_to({:?})", snapshot);
440440
self.any_unifications = snapshot.any_unifications;
441441
}
442442

443-
pub fn new_region_var(
443+
pub(super) fn new_region_var(
444444
&mut self,
445445
universe: ty::UniverseIndex,
446446
origin: RegionVariableOrigin,
@@ -455,12 +455,12 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
455455
}
456456

457457
/// Returns the universe for the given variable.
458-
pub fn var_universe(&self, vid: RegionVid) -> ty::UniverseIndex {
458+
pub(super) fn var_universe(&self, vid: RegionVid) -> ty::UniverseIndex {
459459
self.var_infos[vid].universe
460460
}
461461

462462
/// Returns the origin for the given variable.
463-
pub fn var_origin(&self, vid: RegionVid) -> RegionVariableOrigin {
463+
pub(super) fn var_origin(&self, vid: RegionVid) -> RegionVariableOrigin {
464464
self.var_infos[vid].origin
465465
}
466466

@@ -492,7 +492,7 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
492492
self.undo_log.push(AddVerify(index));
493493
}
494494

495-
pub fn add_given(&mut self, sub: Region<'tcx>, sup: ty::RegionVid) {
495+
pub(super) fn add_given(&mut self, sub: Region<'tcx>, sup: ty::RegionVid) {
496496
// cannot add givens once regions are resolved
497497
if self.data.givens.insert((sub, sup)) {
498498
debug!("add_given({:?} <= {:?})", sub, sup);
@@ -501,7 +501,7 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
501501
}
502502
}
503503

504-
pub fn make_eqregion(
504+
pub(super) fn make_eqregion(
505505
&mut self,
506506
origin: SubregionOrigin<'tcx>,
507507
sub: Region<'tcx>,
@@ -530,7 +530,7 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
530530
}
531531
}
532532

533-
pub fn member_constraint(
533+
pub(super) fn member_constraint(
534534
&mut self,
535535
key: ty::OpaqueTypeKey<'tcx>,
536536
definition_span: Span,
@@ -554,7 +554,7 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
554554
}
555555

556556
#[instrument(skip(self, origin), level = "debug")]
557-
pub fn make_subregion(
557+
pub(super) fn make_subregion(
558558
&mut self,
559559
origin: SubregionOrigin<'tcx>,
560560
sub: Region<'tcx>,
@@ -585,7 +585,7 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
585585
}
586586
}
587587

588-
pub fn verify_generic_bound(
588+
pub(super) fn verify_generic_bound(
589589
&mut self,
590590
origin: SubregionOrigin<'tcx>,
591591
kind: GenericKind<'tcx>,
@@ -595,7 +595,7 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
595595
self.add_verify(Verify { kind, origin, region: sub, bound });
596596
}
597597

598-
pub fn lub_regions(
598+
pub(super) fn lub_regions(
599599
&mut self,
600600
tcx: TyCtxt<'tcx>,
601601
origin: SubregionOrigin<'tcx>,
@@ -613,7 +613,7 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
613613
}
614614
}
615615

616-
pub fn glb_regions(
616+
pub(super) fn glb_regions(
617617
&mut self,
618618
tcx: TyCtxt<'tcx>,
619619
origin: SubregionOrigin<'tcx>,
@@ -634,7 +634,7 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
634634
}
635635

636636
/// Resolves the passed RegionVid to the root RegionVid in the unification table
637-
pub fn opportunistic_resolve_var(&mut self, rid: ty::RegionVid) -> ty::RegionVid {
637+
pub(super) fn opportunistic_resolve_var(&mut self, rid: ty::RegionVid) -> ty::RegionVid {
638638
self.unification_table().find(rid).vid
639639
}
640640

0 commit comments

Comments
 (0)