Remove unnecessary 'use' forms

Fix a laundry list of warnings involving unused imports that glutted
up compilation output.  There are more, but there seems to be some
false positives (where 'remedy' appears to break the build), but this
particular set of fixes seems safe.
This commit is contained in:
Daniel Farina 2013-05-30 03:16:33 -07:00
parent a39429887a
commit aef1e10eba
25 changed files with 28 additions and 52 deletions

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -13,7 +13,6 @@
use core::cmp;
use core::ops;
use core::uint;
use core::vec::from_elem;
use core::vec;
struct SmallBitv {

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -24,13 +24,11 @@
use core::comm::{stream, SharedChan};
use core::either;
use core::io;
use core::num;
use core::option;
use core::result;
use core::str;
use core::task;
use core::to_str::ToStr;
use core::u64;
use core::uint;
use core::vec;

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -16,9 +16,7 @@
use uv_iotask::{IoTask, spawn_iotask};
use core::comm::Chan;
use core::libc;
use core::option::{Some, None};
use core::str;
use core::task::task;
use core::unstable::global::{global_data_clone_create, global_data_clone};
use core::unstable::weak_task::weaken_task;

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -106,9 +106,7 @@ pub mod jit {
use metadata::cstore;
use core::cast;
use core::char;
use core::libc::c_int;
use core::os;
use core::ptr;
use core::str;

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -12,7 +12,7 @@
use core::str;
use core::io;
use driver::session::{OptLevel, No, Less, Default, Aggressive};
use driver::session::{OptLevel, No, Less, Aggressive};
use driver::session::{Session};
use lib::llvm::{PassRef, ModuleRef,PassManagerRef,TargetDataRef};
use lib::llvm::llvm;

View File

@ -34,7 +34,6 @@
use middle::ty::FnSig;
use util::ppaux::ty_to_str;
use core::str;
use core::uint;
use core::vec;
use syntax::codemap::span;

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -19,7 +19,6 @@
use driver::session;
use lib;
use lib::llvm::{llvm, ValueRef, TypeRef, True};
use lib::llvm::type_to_str;
use middle::trans::adt;
use middle::trans::base::*;
use middle::trans::callee;

View File

@ -37,7 +37,6 @@
use core::u32;
use core::uint;
use core::vec;
use extra::smallintmap::SmallIntMap;
use syntax::ast::*;
use syntax::ast_util::is_local;
use syntax::ast_util;

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -24,7 +24,6 @@
use core::cell::Cell;
use core::comm::{stream, SharedChan, Port};
use core::task;
use core::vec;
use rustc::driver::driver;
use rustc::driver::session::Session;
use rustc::driver::session::{basic_options, options};
@ -33,6 +32,8 @@
use syntax::ast_map;
use syntax;
#[cfg(test)] use core::vec;
pub struct Ctxt {
ast: @ast::crate,
ast_map: ast_map::map

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -16,7 +16,6 @@
use doc::ItemUtils;
use doc;
use core::local_data::local_data_get;
use core::vec;
use syntax::ast;
use syntax::parse::token::{ident_interner};

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -17,8 +17,6 @@
use core::comm::*;
use core::comm;
use core::io;
use core::libc;
use core::os;
use core::result;
use core::run;
use core::str;

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -22,7 +22,6 @@
use core::prelude::*;
use core::str;
use core::task;
use core::uint;
use core::vec;
use pass::Pass;

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -11,7 +11,6 @@
//! A mutable, nullable memory location
use cast::transmute_mut;
use cmp;
use prelude::*;
use util::replace;

View File

@ -20,7 +20,6 @@
use cmp;
use iter;
use num::{Zero, One};
use num;
use prelude::*;
/// An interface for dealing with "external iterators". These types of iterators

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -29,7 +29,8 @@
use prelude::*;
use task::local_data_priv::{local_get, local_pop, local_modify, local_set, Handle};
use task;
#[cfg(test)] use task;
/**
* Indexes a task-local data slot. The function's code pointer is used for

View File

@ -21,7 +21,6 @@
// could implement VIZIGNOR the ZIGNOR paper for more speed.
use f64;
use prelude::*;
use rand::{Rng,Rand};
mod ziggurat_tables;

View File

@ -20,7 +20,6 @@
use rt::local::Local;
use rt::logging::StdErrLogger;
use super::local_heap::LocalHeap;
use super::sched::Scheduler;
pub struct Task {
heap: LocalHeap,

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -37,22 +37,22 @@
use prelude::*;
use cast;
use cell::Cell;
use cmp::Eq;
use comm::{stream, Chan, GenericChan, GenericPort, Port};
use comm;
use ptr;
use result::Result;
use result;
use rt::{context, OldTaskContext};
use task::rt::{task_id, sched_id};
use task;
use unstable::finally::Finally;
use util::replace;
use util;
#[cfg(test)] use cast;
#[cfg(test)] use comm::SharedChan;
#[cfg(test)] use comm;
#[cfg(test)] use ptr;
#[cfg(test)] use task;
mod local_data_priv;
pub mod rt;

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -79,7 +79,6 @@
use cell::Cell;
use container::Map;
use comm::{Chan, GenericChan};
use comm;
use ptr;
use hashmap::HashSet;
use task::local_data_priv::{local_get, local_set, OldHandle};
@ -89,13 +88,14 @@
use task::{Success, TaskOpts, TaskResult, ThreadPerCore, ThreadPerTask};
use task::{ExistingScheduler, SchedulerHandle};
use task::unkillable;
use task;
use uint;
use util;
use unstable::sync::{Exclusive, exclusive};
use rt::local::Local;
#[cfg(test)] use task::default_task_opts;
#[cfg(test)] use comm;
#[cfg(test)] use task;
macro_rules! move_it (
{ $x:expr } => ( unsafe { let y = *ptr::to_unsafe_ptr(&($x)); y } )

View File

@ -10,8 +10,6 @@
//! An ordered map and set for integer keys implemented as a radix trie
use local_data;
use os;
use prelude::*;
use uint;
use util::{swap, replace};

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -14,7 +14,6 @@
use comm;
use libc;
use prelude::*;
use ptr;
use task;
pub mod at_exit;

View File

@ -11,7 +11,6 @@
//! Miscellaneous helpers for common patterns.
use cast;
use local_data;
use ptr;
use prelude::*;
use unstable::intrinsics;

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -19,7 +19,6 @@
use ast;
use codemap::span;
use core::str;
use core::vec;
// Transitional reexports so qquote can find the paths it is looking for

View File

@ -92,7 +92,6 @@
use opt_vec;
use opt_vec::OptVec;
use core::char;
use core::either::Either;
use core::either;
use core::hashmap::HashSet;

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -19,11 +19,9 @@
use core::cast;
use core::char;
use core::cmp::Equiv;
use core::hashmap::HashSet;
use core::local_data;
use core::str;
use core::to_bytes;
use core::vec;
#[deriving(Encodable, Decodable, Eq)]
pub enum binop {