@@ -76,9 +76,9 @@ unsafe impl<T> Sync for RwLock<T> {}
76
76
/// # Example
77
77
///
78
78
/// ```
79
- /// use std::sync::{StaticRwLock, RWLOCK_INIT };
79
+ /// use std::sync::{StaticRwLock, RW_LOCK_INIT };
80
80
///
81
- /// static LOCK: StaticRwLock = RWLOCK_INIT ;
81
+ /// static LOCK: StaticRwLock = RW_LOCK_INIT ;
82
82
///
83
83
/// {
84
84
/// let _g = LOCK.read().unwrap();
@@ -131,7 +131,7 @@ impl<T: Send + Sync> RwLock<T> {
131
131
/// Creates a new instance of an RwLock which is unlocked and read to go.
132
132
#[ stable]
133
133
pub fn new ( t : T ) -> RwLock < T > {
134
- RwLock { inner : box RWLOCK_INIT , data : UnsafeCell :: new ( t) }
134
+ RwLock { inner : box RW_LOCK_INIT , data : UnsafeCell :: new ( t) }
135
135
}
136
136
137
137
/// Locks this rwlock with shared read access, blocking the current thread
@@ -365,7 +365,7 @@ mod tests {
365
365
use rand:: { mod, Rng } ;
366
366
use sync:: mpsc:: channel;
367
367
use thread:: Thread ;
368
- use sync:: { Arc , RwLock , StaticRwLock , RWLOCK_INIT } ;
368
+ use sync:: { Arc , RwLock , StaticRwLock , RW_LOCK_INIT } ;
369
369
370
370
#[ test]
371
371
fn smoke ( ) {
@@ -378,7 +378,7 @@ mod tests {
378
378
379
379
#[ test]
380
380
fn static_smoke ( ) {
381
- static R : StaticRwLock = RWLOCK_INIT ;
381
+ static R : StaticRwLock = RW_LOCK_INIT ;
382
382
drop ( R . read ( ) . unwrap ( ) ) ;
383
383
drop ( R . write ( ) . unwrap ( ) ) ;
384
384
drop ( ( R . read ( ) . unwrap ( ) , R . read ( ) . unwrap ( ) ) ) ;
@@ -388,7 +388,7 @@ mod tests {
388
388
389
389
#[ test]
390
390
fn frob ( ) {
391
- static R : StaticRwLock = RWLOCK_INIT ;
391
+ static R : StaticRwLock = RW_LOCK_INIT ;
392
392
static N : uint = 10 ;
393
393
static M : uint = 1000 ;
394
394
0 commit comments