Skip to content

Commit c3dcf9b

Browse files
committed
fix code and comments referencing RW_LOCK_INIT
1 parent 5344ae2 commit c3dcf9b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/libstd/sync/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub use alloc::arc::{Arc, Weak};
2121

2222
pub use self::mutex::{Mutex, MutexGuard, StaticMutex};
2323
pub use self::mutex::MUTEX_INIT;
24-
pub use self::rwlock::{RwLock, StaticRwLock, RWLOCK_INIT};
24+
pub use self::rwlock::{RwLock, StaticRwLock, RW_LOCK_INIT};
2525
pub use self::rwlock::{RWLockReadGuard, RWLockWriteGuard};
2626
pub use self::condvar::{Condvar, StaticCondvar, CONDVAR_INIT};
2727
pub use self::once::{Once, ONCE_INIT};

src/libstd/sync/rwlock.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ unsafe impl<T> Sync for RwLock<T> {}
7676
/// # Example
7777
///
7878
/// ```
79-
/// use std::sync::{StaticRwLock, RWLOCK_INIT};
79+
/// use std::sync::{StaticRwLock, RW_LOCK_INIT};
8080
///
81-
/// static LOCK: StaticRwLock = RWLOCK_INIT;
81+
/// static LOCK: StaticRwLock = RW_LOCK_INIT;
8282
///
8383
/// {
8484
/// let _g = LOCK.read().unwrap();
@@ -131,7 +131,7 @@ impl<T: Send + Sync> RwLock<T> {
131131
/// Creates a new instance of an RwLock which is unlocked and read to go.
132132
#[stable]
133133
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) }
135135
}
136136

137137
/// Locks this rwlock with shared read access, blocking the current thread
@@ -365,7 +365,7 @@ mod tests {
365365
use rand::{mod, Rng};
366366
use sync::mpsc::channel;
367367
use thread::Thread;
368-
use sync::{Arc, RwLock, StaticRwLock, RWLOCK_INIT};
368+
use sync::{Arc, RwLock, StaticRwLock, RW_LOCK_INIT};
369369

370370
#[test]
371371
fn smoke() {
@@ -378,7 +378,7 @@ mod tests {
378378

379379
#[test]
380380
fn static_smoke() {
381-
static R: StaticRwLock = RWLOCK_INIT;
381+
static R: StaticRwLock = RW_LOCK_INIT;
382382
drop(R.read().unwrap());
383383
drop(R.write().unwrap());
384384
drop((R.read().unwrap(), R.read().unwrap()));
@@ -388,7 +388,7 @@ mod tests {
388388

389389
#[test]
390390
fn frob() {
391-
static R: StaticRwLock = RWLOCK_INIT;
391+
static R: StaticRwLock = RW_LOCK_INIT;
392392
static N: uint = 10;
393393
static M: uint = 1000;
394394

0 commit comments

Comments
 (0)