Skip to content

Commit

Permalink
silence various warnings in stdlib, no idea why they suddenly started
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Sep 15, 2014
1 parent a2b9562 commit 48bc291
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/liballoc/heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ mod imp {
#[cfg(not(jemalloc), unix)]
mod imp {
use core::cmp;
use core::mem;
use core::ptr;
use libc;
use libc_heap;
Expand Down
12 changes: 6 additions & 6 deletions src/libsync/comm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ pub struct Receiver<T> {
inner: UnsafeCell<Flavor<T>>,
receives: Cell<uint>,
// can't share in an arc
marker: marker::NoSync,
_marker: marker::NoSync,
}

/// An iterator over messages on a receiver, this iterator will block
Expand All @@ -397,7 +397,7 @@ pub struct Sender<T> {
inner: UnsafeCell<Flavor<T>>,
sends: Cell<uint>,
// can't share in an arc
marker: marker::NoSync,
_marker: marker::NoSync,
}

/// The sending-half of Rust's synchronous channel type. This half can only be
Expand All @@ -406,7 +406,7 @@ pub struct Sender<T> {
pub struct SyncSender<T> {
inner: Arc<UnsafeCell<sync::Packet<T>>>,
// can't share in an arc
marker: marker::NoSync,
_marker: marker::NoSync,
}

/// This enumeration is the list of the possible reasons that try_recv could not
Expand Down Expand Up @@ -543,7 +543,7 @@ impl<T: Send> Sender<T> {
Sender {
inner: UnsafeCell::new(inner),
sends: Cell::new(0),
marker: marker::NoSync,
_marker: marker::NoSync,
}
}

Expand Down Expand Up @@ -719,7 +719,7 @@ impl<T: Send> Drop for Sender<T> {

impl<T: Send> SyncSender<T> {
fn new(inner: Arc<UnsafeCell<sync::Packet<T>>>) -> SyncSender<T> {
SyncSender { inner: inner, marker: marker::NoSync }
SyncSender { inner: inner, _marker: marker::NoSync }
}

/// Sends a value on this synchronous channel.
Expand Down Expand Up @@ -807,7 +807,7 @@ impl<T: Send> Drop for SyncSender<T> {

impl<T: Send> Receiver<T> {
fn new(inner: Flavor<T>) -> Receiver<T> {
Receiver { inner: UnsafeCell::new(inner), receives: Cell::new(0), marker: marker::NoSync }
Receiver { inner: UnsafeCell::new(inner), receives: Cell::new(0), _marker: marker::NoSync }
}

/// Blocks waiting for a value on this receiver
Expand Down
10 changes: 5 additions & 5 deletions src/libsync/deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ struct Deque<T> {
/// There may only be one worker per deque.
pub struct Worker<T> {
deque: Arc<Deque<T>>,
noshare: marker::NoSync,
_noshare: marker::NoSync,
}

/// The stealing half of the work-stealing deque. Stealers have access to the
/// opposite end of the deque from the worker, and they only have access to the
/// `steal` method.
pub struct Stealer<T> {
deque: Arc<Deque<T>>,
noshare: marker::NoSync,
_noshare: marker::NoSync,
}

/// When stealing some data, this is an enumeration of the possible outcomes.
Expand Down Expand Up @@ -153,8 +153,8 @@ impl<T: Send> BufferPool<T> {
pub fn deque(&self) -> (Worker<T>, Stealer<T>) {
let a = Arc::new(Deque::new(self.clone()));
let b = a.clone();
(Worker { deque: a, noshare: marker::NoSync },
Stealer { deque: b, noshare: marker::NoSync })
(Worker { deque: a, _noshare: marker::NoSync },
Stealer { deque: b, _noshare: marker::NoSync })
}

fn alloc(&mut self, bits: uint) -> Box<Buffer<T>> {
Expand Down Expand Up @@ -217,7 +217,7 @@ impl<T: Send> Stealer<T> {

impl<T: Send> Clone for Stealer<T> {
fn clone(&self) -> Stealer<T> {
Stealer { deque: self.deque.clone(), noshare: marker::NoSync }
Stealer { deque: self.deque.clone(), _noshare: marker::NoSync }
}
}

Expand Down

0 comments on commit 48bc291

Please sign in to comment.