@@ -20,18 +20,18 @@ pub struct BorrowSet<'tcx> {
2020 /// by the `Location` of the assignment statement in which it
2121 /// appears on the right hand side. Thus the location is the map
2222 /// key, and its position in the map corresponds to `BorrowIndex`.
23- pub ( crate ) location_map : FxIndexMap < Location , BorrowData < ' tcx > > ,
23+ pub location_map : FxIndexMap < Location , BorrowData < ' tcx > > ,
2424
2525 /// Locations which activate borrows.
2626 /// NOTE: a given location may activate more than one borrow in the future
2727 /// when more general two-phase borrow support is introduced, but for now we
2828 /// only need to store one borrow index.
29- pub ( crate ) activation_map : FxIndexMap < Location , Vec < BorrowIndex > > ,
29+ pub activation_map : FxIndexMap < Location , Vec < BorrowIndex > > ,
3030
3131 /// Map from local to all the borrows on that local.
32- pub ( crate ) local_map : FxIndexMap < mir:: Local , FxIndexSet < BorrowIndex > > ,
32+ pub local_map : FxIndexMap < mir:: Local , FxIndexSet < BorrowIndex > > ,
3333
34- pub ( crate ) locals_state_at_exit : LocalsStateAtExit ,
34+ pub locals_state_at_exit : LocalsStateAtExit ,
3535}
3636
3737impl < ' tcx > Index < BorrowIndex > for BorrowSet < ' tcx > {
@@ -45,7 +45,7 @@ impl<'tcx> Index<BorrowIndex> for BorrowSet<'tcx> {
4545/// Location where a two-phase borrow is activated, if a borrow
4646/// is in fact a two-phase borrow.
4747#[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
48- pub ( crate ) enum TwoPhaseActivation {
48+ pub enum TwoPhaseActivation {
4949 NotTwoPhase ,
5050 NotActivated ,
5151 ActivatedAt ( Location ) ,
@@ -55,17 +55,17 @@ pub(crate) enum TwoPhaseActivation {
5555pub struct BorrowData < ' tcx > {
5656 /// Location where the borrow reservation starts.
5757 /// In many cases, this will be equal to the activation location but not always.
58- pub ( crate ) reserve_location : Location ,
58+ pub reserve_location : Location ,
5959 /// Location where the borrow is activated.
60- pub ( crate ) activation_location : TwoPhaseActivation ,
60+ pub activation_location : TwoPhaseActivation ,
6161 /// What kind of borrow this is
62- pub ( crate ) kind : mir:: BorrowKind ,
62+ pub kind : mir:: BorrowKind ,
6363 /// The region for which this borrow is live
64- pub ( crate ) region : RegionVid ,
64+ pub region : RegionVid ,
6565 /// Place from which we are borrowing
66- pub ( crate ) borrowed_place : mir:: Place < ' tcx > ,
66+ pub borrowed_place : mir:: Place < ' tcx > ,
6767 /// Place to which the borrow was stored
68- pub ( crate ) assigned_place : mir:: Place < ' tcx > ,
68+ pub assigned_place : mir:: Place < ' tcx > ,
6969}
7070
7171impl < ' tcx > fmt:: Display for BorrowData < ' tcx > {
@@ -120,7 +120,7 @@ impl LocalsStateAtExit {
120120}
121121
122122impl < ' tcx > BorrowSet < ' tcx > {
123- pub ( crate ) fn build (
123+ pub fn build (
124124 tcx : TyCtxt < ' tcx > ,
125125 body : & Body < ' tcx > ,
126126 locals_are_invalidated_at_exit : bool ,
0 commit comments