diff options
| author | bors <bors@rust-lang.org> | 2013-05-23 18:10:36 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-05-23 18:10:36 -0700 |
| commit | a776d65b4d8e5eaad501af2b147cfbe1dbf10d3c (patch) | |
| tree | 1366910aafb8be2d6a9ef3872035e166a6dd8f65 /src/libstd/rt | |
| parent | 4bbc13d6db303264cea477972969bf88442a611b (diff) | |
| parent | cc4fabcb4361d0daada096f5e6ac19eb6ed21d33 (diff) | |
| download | rust-a776d65b4d8e5eaad501af2b147cfbe1dbf10d3c.tar.gz rust-a776d65b4d8e5eaad501af2b147cfbe1dbf10d3c.zip | |
auto merge of #6690 : erickt/rust/cleanup-warnings, r=brson
Simple patch series to fix up all the warnings a rustc compile is giving at the moment. It also fixes a NOTE in `to_bytes.rs` to remove the `to_bytes::iter_bytes_<N>` functions.
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/comm.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/io/extensions.rs | 6 | ||||
| -rw-r--r-- | src/libstd/rt/local.rs | 8 | ||||
| -rw-r--r-- | src/libstd/rt/sched.rs | 1 | ||||
| -rw-r--r-- | src/libstd/rt/task.rs | 1 |
5 files changed, 7 insertions, 11 deletions
diff --git a/src/libstd/rt/comm.rs b/src/libstd/rt/comm.rs index 576a402b709..54db03b6069 100644 --- a/src/libstd/rt/comm.rs +++ b/src/libstd/rt/comm.rs @@ -474,7 +474,7 @@ mod test { #[test] fn oneshot_single_thread_peek_open() { do run_in_newsched_task { - let (port, chan) = oneshot::<int>(); + let (port, _) = oneshot::<int>(); assert!(!port.peek()); } } diff --git a/src/libstd/rt/io/extensions.rs b/src/libstd/rt/io/extensions.rs index ceff2ecd77d..fcbf31e87f2 100644 --- a/src/libstd/rt/io/extensions.rs +++ b/src/libstd/rt/io/extensions.rs @@ -587,12 +587,10 @@ fn extend_sign(val: u64, nbytes: uint) -> i64 { #[cfg(test)] mod test { - use super::{ReaderUtil, ReaderByteConversions, WriterByteConversions}; - use u64; - use i32; + use super::ReaderUtil; use option::{Some, None}; use cell::Cell; - use rt::io::mem::{MemReader, MemWriter}; + use rt::io::mem::MemReader; use rt::io::mock::MockReader; use rt::io::{read_error, placeholder_error}; diff --git a/src/libstd/rt/local.rs b/src/libstd/rt/local.rs index 64a384ddff0..313123c38b5 100644 --- a/src/libstd/rt/local.rs +++ b/src/libstd/rt/local.rs @@ -33,7 +33,7 @@ impl Local for Scheduler { } impl Local for Task { - fn put(value: ~Task) { abort!("unimpl") } + fn put(_value: ~Task) { abort!("unimpl") } fn take() -> ~Task { abort!("unimpl") } fn exists() -> bool { abort!("unimpl") } fn borrow(f: &fn(&mut Task)) { @@ -71,10 +71,10 @@ impl Local for Task { // XXX: This formulation won't work once ~IoFactoryObject is a real trait pointer impl Local for IoFactoryObject { - fn put(value: ~IoFactoryObject) { abort!("unimpl") } + fn put(_value: ~IoFactoryObject) { abort!("unimpl") } fn take() -> ~IoFactoryObject { abort!("unimpl") } fn exists() -> bool { abort!("unimpl") } - fn borrow(f: &fn(&mut IoFactoryObject)) { abort!("unimpl") } + fn borrow(_f: &fn(&mut IoFactoryObject)) { abort!("unimpl") } unsafe fn unsafe_borrow() -> *mut IoFactoryObject { let sched = Local::unsafe_borrow::<Scheduler>(); let io: *mut IoFactoryObject = (*sched).event_loop.io().unwrap(); @@ -115,4 +115,4 @@ mod test { } let _scheduler: ~Scheduler = Local::take(); } -} \ No newline at end of file +} diff --git a/src/libstd/rt/sched.rs b/src/libstd/rt/sched.rs index 50c6a894093..2d9cdaddc84 100644 --- a/src/libstd/rt/sched.rs +++ b/src/libstd/rt/sched.rs @@ -20,7 +20,6 @@ use super::context::Context; use super::task::Task; use rt::local_ptr; use rt::local::Local; -use rt::rtio::IoFactoryObject; /// The Scheduler is responsible for coordinating execution of Coroutines /// on a single thread. When the scheduler is running it is owned by diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs index 0314137fc7f..cf4967b12b3 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -16,7 +16,6 @@ use prelude::*; use libc::{c_void, uintptr_t}; use cast::transmute; -use super::sched::Scheduler; use rt::local::Local; use super::local_heap::LocalHeap; use rt::logging::StdErrLogger; |
