From dc970c13f476ef086066a47829185ac83645c61f Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Thu, 23 May 2013 09:39:17 -0700 Subject: cleanup warnings from libstd --- src/libstd/rt/comm.rs | 2 +- src/libstd/rt/io/extensions.rs | 6 ++---- src/libstd/rt/local.rs | 8 ++++---- src/libstd/rt/sched.rs | 1 - src/libstd/rt/task.rs | 1 - 5 files changed, 7 insertions(+), 11 deletions(-) (limited to 'src/libstd/rt') 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::(); + let (port, _) = oneshot::(); 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::(); 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; -- cgit 1.4.1-3-g733a5