@@ -20,18 +20,18 @@ pub struct BorrowSet<'tcx> {
20
20
/// by the `Location` of the assignment statement in which it
21
21
/// appears on the right hand side. Thus the location is the map
22
22
/// 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 > > ,
24
24
25
25
/// Locations which activate borrows.
26
26
/// NOTE: a given location may activate more than one borrow in the future
27
27
/// when more general two-phase borrow support is introduced, but for now we
28
28
/// only need to store one borrow index.
29
- pub ( crate ) activation_map : FxIndexMap < Location , Vec < BorrowIndex > > ,
29
+ pub activation_map : FxIndexMap < Location , Vec < BorrowIndex > > ,
30
30
31
31
/// 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 > > ,
33
33
34
- pub ( crate ) locals_state_at_exit : LocalsStateAtExit ,
34
+ pub locals_state_at_exit : LocalsStateAtExit ,
35
35
}
36
36
37
37
impl < ' tcx > Index < BorrowIndex > for BorrowSet < ' tcx > {
@@ -45,7 +45,7 @@ impl<'tcx> Index<BorrowIndex> for BorrowSet<'tcx> {
45
45
/// Location where a two-phase borrow is activated, if a borrow
46
46
/// is in fact a two-phase borrow.
47
47
#[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
48
- pub ( crate ) enum TwoPhaseActivation {
48
+ pub enum TwoPhaseActivation {
49
49
NotTwoPhase ,
50
50
NotActivated ,
51
51
ActivatedAt ( Location ) ,
@@ -55,17 +55,17 @@ pub(crate) enum TwoPhaseActivation {
55
55
pub struct BorrowData < ' tcx > {
56
56
/// Location where the borrow reservation starts.
57
57
/// 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 ,
59
59
/// Location where the borrow is activated.
60
- pub ( crate ) activation_location : TwoPhaseActivation ,
60
+ pub activation_location : TwoPhaseActivation ,
61
61
/// What kind of borrow this is
62
- pub ( crate ) kind : mir:: BorrowKind ,
62
+ pub kind : mir:: BorrowKind ,
63
63
/// The region for which this borrow is live
64
- pub ( crate ) region : RegionVid ,
64
+ pub region : RegionVid ,
65
65
/// Place from which we are borrowing
66
- pub ( crate ) borrowed_place : mir:: Place < ' tcx > ,
66
+ pub borrowed_place : mir:: Place < ' tcx > ,
67
67
/// Place to which the borrow was stored
68
- pub ( crate ) assigned_place : mir:: Place < ' tcx > ,
68
+ pub assigned_place : mir:: Place < ' tcx > ,
69
69
}
70
70
71
71
impl < ' tcx > fmt:: Display for BorrowData < ' tcx > {
@@ -120,7 +120,7 @@ impl LocalsStateAtExit {
120
120
}
121
121
122
122
impl < ' tcx > BorrowSet < ' tcx > {
123
- pub ( crate ) fn build (
123
+ pub fn build (
124
124
tcx : TyCtxt < ' tcx > ,
125
125
body : & Body < ' tcx > ,
126
126
locals_are_invalidated_at_exit : bool ,
0 commit comments