Skip to content

Commit 3e637d5

Browse files
committed
Remove NonCopyable::new
The issue that required it has been fixed.
1 parent c159acb commit 3e637d5

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

src/libextra/sync.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ impl Sem<~[WaitQueue]> {
326326
// and rwlock_write_mode.
327327
pub fn access_cond<U>(&self, blk: |c: &Condvar| -> U) -> U {
328328
do self.access {
329-
blk(&Condvar { sem: self, order: Nothing, token: NonCopyable::new() })
329+
blk(&Condvar { sem: self, order: Nothing, token: NonCopyable })
330330
}
331331
}
332332
}
@@ -569,7 +569,7 @@ impl RWLock {
569569
do task::rekillable {
570570
let opt_lock = Just(&self.order_lock);
571571
blk(&Condvar { sem: cond.sem, order: opt_lock,
572-
token: NonCopyable::new() })
572+
token: NonCopyable })
573573
}
574574
}
575575
}
@@ -605,7 +605,7 @@ impl RWLock {
605605
(&self.order_lock).release();
606606
do (|| {
607607
do task::rekillable {
608-
blk(RWLockWriteMode { lock: self, token: NonCopyable::new() })
608+
blk(RWLockWriteMode { lock: self, token: NonCopyable })
609609
}
610610
}).finally {
611611
let writer_or_last_reader;
@@ -662,7 +662,7 @@ impl RWLock {
662662
}
663663
}
664664
}
665-
RWLockReadMode { lock: token.lock, token: NonCopyable::new() }
665+
RWLockReadMode { lock: token.lock, token: NonCopyable }
666666
}
667667
}
668668

@@ -682,7 +682,7 @@ impl<'self> RWLockWriteMode<'self> {
682682
// access lock. See comment in RWLock::write_cond for why.
683683
blk(&Condvar { sem: &self.lock.access_lock,
684684
order: Just(&self.lock.order_lock),
685-
token: NonCopyable::new() })
685+
token: NonCopyable })
686686
}
687687
}
688688

src/libstd/util.rs

-6
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,6 @@ pub fn replace<T>(dest: &mut T, mut src: T) -> T {
6262
#[unsafe_no_drop_flag]
6363
pub struct NonCopyable;
6464

65-
impl NonCopyable {
66-
// FIXME(#8233) should not be necessary
67-
/// Create a new noncopyable token.
68-
pub fn new() -> NonCopyable { NonCopyable }
69-
}
70-
7165
impl Drop for NonCopyable {
7266
fn drop(&mut self) { }
7367
}

0 commit comments

Comments
 (0)