@@ -50,6 +50,7 @@ use std::borrow;
50
50
51
51
/// As sync::condvar, a mechanism for unlock-and-descheduling and signaling.
52
52
pub struct Condvar < ' self > {
53
+ // all were already priv
53
54
priv is_mutex : bool ,
54
55
priv failed : & ' self mut bool ,
55
56
priv cond : & ' self sync:: Condvar < ' self >
@@ -108,6 +109,7 @@ impl<'self> Condvar<'self> {
108
109
****************************************************************************/
109
110
110
111
/// An atomically reference counted wrapper for shared immutable state.
112
+ // all were already priv
111
113
pub struct Arc < T > { priv x: UnsafeArc < T > }
112
114
113
115
@@ -162,6 +164,7 @@ struct MutexArcInner<T> { priv lock: Mutex, priv failed: bool, priv data: T }
162
164
163
165
/// An Arc with mutable data protected by a blocking mutex.
164
166
#[ no_freeze]
167
+ //All were already priv
165
168
pub struct MutexArc < T > { priv x: UnsafeArc < MutexArcInner < T > > }
166
169
167
170
@@ -344,6 +347,7 @@ struct RWArcInner<T> { priv lock: RWLock, priv failed: bool, priv data: T }
344
347
*/
345
348
#[ no_freeze]
346
349
pub struct RWArc < T > {
350
+ // all were already priv
347
351
priv x: UnsafeArc < RWArcInner < T > > ,
348
352
}
349
353
@@ -521,15 +525,18 @@ fn borrow_rwlock<T:Freeze + Send>(state: *mut RWArcInner<T>) -> *RWLock {
521
525
522
526
/// The "write permission" token used for RWArc.write_downgrade().
523
527
pub struct RWWriteMode < ' self , T > {
524
- data : & ' self mut T ,
525
- token : sync:: RWLockWriteMode < ' self > ,
526
- poison : PoisonOnFail ,
528
+
529
+ /// reedlepee added priv in all the feilds below
530
+ priv data : & ' self mut T ,
531
+ priv token : sync:: RWLockWriteMode < ' self > ,
532
+ priv poison : PoisonOnFail ,
527
533
}
528
534
529
535
/// The "read permission" token used for RWArc.write_downgrade().
530
536
pub struct RWReadMode < ' self , T > {
531
- data : & ' self T ,
532
- token : sync:: RWLockReadMode < ' self > ,
537
+ /// reedlepee added priv in all the feilds below
538
+ priv data : & ' self T ,
539
+ priv token : sync:: RWLockReadMode < ' self > ,
533
540
}
534
541
535
542
impl < ' self , T : Freeze + Send > RWWriteMode < ' self , T > {
0 commit comments