Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary 'use' forms #6833

Merged
merged 1 commit into from
May 31, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/libextra/bitv.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand All @@ -13,7 +13,6 @@ use core::prelude::*;
use core::cmp;
use core::ops;
use core::uint;
use core::vec::from_elem;
use core::vec;

struct SmallBitv {
Expand Down
4 changes: 1 addition & 3 deletions src/libextra/test.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand All @@ -24,13 +24,11 @@ use term;
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;

Expand Down
4 changes: 1 addition & 3 deletions src/libextra/uv_global_loop.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand All @@ -16,9 +16,7 @@ use iotask = uv_iotask;
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;
Expand Down
4 changes: 1 addition & 3 deletions src/librustc/back/link.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/librustc/back/passes.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand All @@ -12,7 +12,7 @@ use core::prelude::*;
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;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/trans/foreign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ use middle::ty;
use middle::ty::FnSig;
use util::ppaux::ty_to_str;

use core::str;
use core::uint;
use core::vec;
use syntax::codemap::span;
Expand Down
3 changes: 1 addition & 2 deletions src/librustc/middle/trans/glue.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand All @@ -19,7 +19,6 @@ use back::link::*;
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;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ use core::to_bytes;
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;
Expand Down
5 changes: 3 additions & 2 deletions src/librustdoc/astsrv.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand All @@ -24,7 +24,6 @@ use parse;
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};
Expand All @@ -33,6 +32,8 @@ use syntax::ast;
use syntax::ast_map;
use syntax;

#[cfg(test)] use core::vec;

pub struct Ctxt {
ast: @ast::crate,
ast_map: ast_map::map
Expand Down
3 changes: 1 addition & 2 deletions src/librustdoc/extract.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand All @@ -16,7 +16,6 @@ use astsrv;
use doc::ItemUtils;
use doc;

use core::local_data::local_data_get;
use core::vec;
use syntax::ast;
use syntax::parse::token::{ident_interner};
Expand Down
4 changes: 1 addition & 3 deletions src/librustdoc/markdown_writer.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand All @@ -17,8 +17,6 @@ use doc;
use core::comm::*;
use core::comm;
use core::io;
use core::libc;
use core::os;
use core::result;
use core::run;
use core::str;
Expand Down
3 changes: 1 addition & 2 deletions src/librustdoc/unindent_pass.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand All @@ -22,7 +22,6 @@ middle of a line, and each of the following lines is indented.
use core::prelude::*;

use core::str;
use core::task;
use core::uint;
use core::vec;
use pass::Pass;
Expand Down
3 changes: 1 addition & 2 deletions src/libstd/cell.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand All @@ -11,7 +11,6 @@
//! A mutable, nullable memory location

use cast::transmute_mut;
use cmp;
use prelude::*;
use util::replace;

Expand Down
1 change: 0 additions & 1 deletion src/libstd/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ implementing the `Iterator` trait.
use cmp;
use iter;
use num::{Zero, One};
use num;
use prelude::*;

/// An interface for dealing with "external iterators". These types of iterators
Expand Down
5 changes: 3 additions & 2 deletions src/libstd/local_data.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand Down Expand Up @@ -29,7 +29,8 @@ magic.
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
Expand Down
1 change: 0 additions & 1 deletion src/libstd/rand/distributions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
// could implement VIZIGNOR the ZIGNOR paper for more speed.

use f64;
use prelude::*;
use rand::{Rng,Rand};

mod ziggurat_tables;
Expand Down
1 change: 0 additions & 1 deletion src/libstd/rt/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use prelude::*;
use rt::local::Local;
use rt::logging::StdErrLogger;
use super::local_heap::LocalHeap;
use super::sched::Scheduler;

pub struct Task {
heap: LocalHeap,
Expand Down
10 changes: 5 additions & 5 deletions src/libstd/task/mod.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/libstd/task/spawn.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand Down Expand Up @@ -79,7 +79,6 @@ use cast;
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};
Expand All @@ -89,13 +88,14 @@ use task::{Failure, ManualThreads, PlatformThread, SchedOpts, SingleThreaded};
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 } )
Expand Down
2 changes: 0 additions & 2 deletions src/libstd/trie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
3 changes: 1 addition & 2 deletions src/libstd/unstable/mod.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand All @@ -14,7 +14,6 @@ use comm::{GenericChan, GenericPort};
use comm;
use libc;
use prelude::*;
use ptr;
use task;

pub mod at_exit;
Expand Down
1 change: 0 additions & 1 deletion src/libstd/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
//! Miscellaneous helpers for common patterns.

use cast;
use local_data;
use ptr;
use prelude::*;
use unstable::intrinsics;
Expand Down
3 changes: 1 addition & 2 deletions src/libsyntax/ext/pipes/ast_builder.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand All @@ -19,7 +19,6 @@ use ast::ident;
use ast;
use codemap::span;

use core::str;
use core::vec;

// Transitional reexports so qquote can find the paths it is looking for
Expand Down
1 change: 0 additions & 1 deletion src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ use parse::{new_sub_parser_from_file, next_node_id, ParseSess};
use opt_vec;
use opt_vec::OptVec;

use core::char;
use core::either::Either;
use core::either;
use core::hashmap::HashSet;
Expand Down
4 changes: 1 addition & 3 deletions src/libsyntax/parse/token.rs
Original file line number Diff line number Diff line change
@@ -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.
//
Expand All @@ -19,11 +19,9 @@ use util::interner;
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 {
Expand Down