Remove some pointless imports

This commit is contained in:
Marijn Haverbeke 2012-02-09 15:30:19 +01:00
parent 50fb4c30ed
commit 52a741754c
65 changed files with 12 additions and 134 deletions

View file

@ -1,4 +1,4 @@
import core::ctypes::{c_int, c_uint};
import ctypes::{c_int, c_uint};
import driver::session;
import session::session;
import lib::llvm::llvm;
@ -6,13 +6,8 @@ import front::attr;
import middle::ty;
import metadata::{encoder, cstore};
import middle::trans::common::crate_ctxt;
import str;
import std::fs;
import vec;
import option;
import std::run;
import option::some;
import option::none;
import std::sha1::sha1;
import syntax::ast;
import syntax::print::pprust;

View file

@ -1,10 +1,4 @@
import std::os;
import std::fs;
import std::os_fs;
import vec;
import std::map;
import str;
import uint;
import std::{os, fs, os_fs, map};
import metadata::cstore;
import driver::session;
import util::filesearch;

View file

@ -10,11 +10,9 @@ import middle::{trans, resolve, freevars, kind, ty, typeck, fn_usage,
import syntax::print::{pp, pprust};
import util::{ppaux, filesearch};
import back::link;
import core::{option, str, int, result};
import result::{ok, err};
import std::{fs, io, getopts};
import io::{reader_util, writer_util};
import option::{some, none};
import getopts::{optopt, optmulti, optflag, optflagopt, opt_present};
import back::{x86, x86_64};

View file

@ -2,11 +2,9 @@ use std;
use rustc;
// -*- rust -*-
import core::{option, str, vec, result};
import result::{ok, err};
import std::{io, getopts};
import io::writer_util;
import option::{some, none};
import getopts::{opt_present};
import rustc::driver::driver::*;
import rustc::syntax::codemap;

View file

@ -3,8 +3,6 @@ import syntax::{ast, codemap};
import syntax::ast::node_id;
import codemap::span;
import syntax::ast::{int_ty, uint_ty, float_ty};
import option;
import option::{some, none};
import syntax::parse::parser::parse_sess;
import util::filesearch;
import back::target_strs;

View file

@ -1,6 +1,5 @@
// Functions dealing with attributes and meta_items
import core::{either, vec, option};
import std::map;
import syntax::{ast, ast_util};
import driver::session::session;

View file

@ -1,6 +1,4 @@
import core::{vec, option};
import syntax::{ast, fold};
import attr;
export strip_unconfigured_items;
export metas_in_cfg;

View file

@ -1,6 +1,5 @@
// Code that generates a test runner to run all the tests in a crate
import core::{option, vec};
import syntax::{ast, ast_util};
import syntax::ast_util::*;
//import syntax::ast_util::dummy_sp;

View file

@ -1,4 +1,3 @@
import core::{vec, str, option};
import str::sbuf;
import ctypes::{c_int, c_uint, unsigned, longlong, ulonglong};

View file

@ -1,7 +1,5 @@
// EBML enum definitions and utils shared by the encoder and decoder
import str;
const tag_paths: uint = 0x01u;
const tag_items: uint = 0x02u;

View file

@ -10,7 +10,6 @@ import syntax::codemap::span;
import util::{filesearch};
import std::{io, fs};
import io::writer_util;
import option::{none, some};
import std::map::{hashmap, new_int_hash};
import syntax::print::pprust;
import common::*;

View file

@ -3,7 +3,6 @@
import syntax::ast;
import syntax::ast_util;
import middle::ty;
import option::{some, none};
import driver::session;
export get_symbol;

View file

@ -1,7 +1,6 @@
// The crate store - a central repo for information collected about external
// crates and libraries
import core::{vec, str};
import std::map;
import syntax::ast;
import util::common::*;

View file

@ -1,7 +1,5 @@
// Type decoding
import core::{vec, str, uint};
import option::{none, some};
import syntax::ast;
import syntax::ast::*;
import syntax::ast_util;

View file

@ -3,7 +3,6 @@
import std::io;
import io::writer_util;
import std::map::hashmap;
import option::{some, none};
import syntax::ast::*;
import driver::session::session;
import middle::ty;

View file

@ -4,10 +4,9 @@ import ast::{ident, fn_ident, node_id};
import syntax::codemap::span;
import syntax::visit;
import visit::vt;
import core::{vec, option};
import std::list;
import std::util::unreachable;
import option::{some, none, is_none};
import option::is_none;
import list::list;
import driver::session::session;
import pat_util::*;

View file

@ -1,4 +1,3 @@
import option;
import std::map;
import syntax::ast::*;
import syntax::ast_util;

View file

@ -5,7 +5,6 @@ import syntax::ast_util::{variant_def_ids, dummy_sp, compare_lit_exprs,
import syntax::codemap::span;
import pat_util::*;
import syntax::visit;
import option::{some, none};
import driver::session::session;
import middle::ty;
import middle::ty::*;

View file

@ -1,4 +1,3 @@
import core::{vec, str, option, sys, ctypes, unsafe};
import std::fs;
import std::map::hashmap;
import lib::llvm::llvm;

View file

@ -1,6 +1,5 @@
import syntax::ast;
import syntax::visit;
import option::some;
import syntax::print::pprust::expr_to_str;
import driver::session::session;

View file

@ -2,7 +2,6 @@
// variables that they contain.
import syntax::print::pprust::path_to_str;
import int;
import std::map::*;
import option::*;
import syntax::{ast, ast_util, visit};

View file

@ -1,4 +1,3 @@
import option::{some, none};
import syntax::{visit, ast_util};
import syntax::ast::*;
import syntax::codemap::span;

View file

@ -3,7 +3,6 @@ import syntax::ast::*;
import syntax::codemap::span;
import std::list::{is_not_empty, list, nil, cons, tail};
import std::util::unreachable;
import core::{vec, option};
import std::list;
// Last use analysis pass.

View file

@ -1,5 +1,3 @@
import core::{vec, str, option};
import option::{some, none};
import syntax::ast::*;
import syntax::visit;
import syntax::ast_util;

View file

@ -13,11 +13,10 @@ import std::map::{new_int_hash, new_str_hash};
import syntax::codemap::span;
import syntax::visit;
import visit::vt;
import core::{vec, option, str};
import std::list;
import std::map::hashmap;
import std::list::{list, nil, cons};
import option::{some, none, is_none, is_some};
import option::{is_none, is_some};
import syntax::print::pprust::*;
export resolve_crate;

View file

@ -21,9 +21,7 @@ import util::common;
import trans::build::{Load, Store, Add, GEPi};
import syntax::codemap::span;
import core::{vec, str};
import std::map::hashmap;
import option::{none, some};
import ty_ctxt = middle::ty::ctxt;

View file

@ -1,6 +1,3 @@
import core::{str, vec, option};
import option::{some, none};
import driver::session::session;
import lib::llvm::llvm;
import lib::llvm::{ValueRef, BasicBlockRef};

View file

@ -13,11 +13,10 @@
// but many TypeRefs correspond to one ty::t; for instance, tup(int, int,
// int) and rec(x=int, y=int, z=int) will have the same TypeRef.
import core::ctypes::c_uint;
import ctypes::c_uint;
import std::{map, time};
import std::map::hashmap;
import std::map::{new_int_hash, new_str_hash};
import option::{some, none};
import driver::session;
import session::session;
import front::attr;

View file

@ -1,5 +1,4 @@
import core::{vec, str};
import core::ctypes::{c_uint, c_int};
import ctypes::{c_uint, c_int};
import str::sbuf;
import lib::llvm::llvm;
import syntax::codemap;

View file

@ -7,7 +7,6 @@ import common::*;
import build::*;
import base::*;
import middle::freevars::{get_freevars, freevar_info};
import option::{some, none};
import back::abi;
import syntax::codemap::span;
import syntax::print::pprust::expr_to_str;

View file

@ -3,11 +3,9 @@
*/
import core::{int, vec, str, uint, option, unsafe};
import core::ctypes::unsigned;
import ctypes::unsigned;
import vec::to_ptr;
import std::map::hashmap;
import option::some;
import syntax::ast;
import driver::session;
import session::session;

View file

@ -1,9 +1,8 @@
import core::ctypes::c_uint;
import ctypes::c_uint;
import base::*;
import common::*;
import build::*;
import driver::session::session;
import option::{some, none};
import syntax::{ast, ast_util};
import metadata::csearch;
import back::{link, abi};

View file

@ -1,5 +1,3 @@
import vec;
import option::none;
import syntax::ast;
import driver::session::session;
import lib::llvm::{ValueRef, TypeRef};

View file

@ -1,5 +1,4 @@
import core::{int, uint};
import syntax::ast::*;
import syntax::visit;
import syntax::codemap::span;

View file

@ -1,4 +1,3 @@
import core::{vec, int, uint, option};
import option::*;
import pat_util::*;
import syntax::ast::*;

View file

@ -1,6 +1,5 @@
import syntax::ast::*;
import syntax::visit;
import vec;
import option::*;
import aux::*;
import tstate::ann::{pre_and_post, precond, postcond, prestate, poststate,

View file

@ -6,7 +6,6 @@ import syntax::codemap::span;
import middle::ty;
import tstate::ann::{precond, prestate,
implies, ann_precond, ann_prestate};
import option;
import aux::*;
import syntax::print::pprust::ty_to_str;
import bitvectors::*;

View file

@ -1,7 +1,3 @@
import core::{vec, option};
import option::{none, some};
import tstate::ann::*;
import aux::*;
import bitvectors::{bit_num, seq_preconds, seq_postconds,

View file

@ -1,5 +1,3 @@
import core::{vec, option};
import option::{none, some};
import ann::*;
import aux::*;
import tritv::{tritv_clone, tritv_set, ttrue};

View file

@ -1,13 +1,5 @@
import vec;
import str;
import uint;
import std::ufind;
import std::map;
import std::{ufind, map, smallintmap};
import std::map::hashmap;
import option;
import option::none;
import option::some;
import std::smallintmap;
import driver::session;
import session::session;
import syntax::ast;

View file

@ -13,10 +13,8 @@ import middle::ty::{node_id_to_type, arg, block_ty,
ty_param_bounds_and_ty};
import util::ppaux::ty_to_str;
import middle::ty::unify::{ures_ok, ures_err, fix_ok, fix_err};
import core::{int, vec, str, option};
import std::smallintmap;
import std::map::{hashmap, new_int_hash};
import option::{none, some};
import syntax::print::pprust::*;
export check_crate;

View file

@ -1,6 +1,5 @@
// The Rust abstract syntax tree.
import option;
import codemap::{span, filename};
type spanned<T> = {node: T, span: span};

View file

@ -1,6 +1,3 @@
import core::{vec, uint, str, option, result};
import option::{some, none};
type filename = str;
type file_pos = {ch: uint, byte: uint};

View file

@ -1,9 +1,7 @@
import core::{vec, option};
import std::map::hashmap;
import driver::session::session;
import codemap::{span, expn_info, expanded_from};
import std::map::new_str_hash;
import codemap;
type syntax_expander_ =
fn@(ext_ctxt, span, ast::mac_arg, ast::mac_body) -> @ast::expr;

View file

@ -1,5 +1,3 @@
import core::{vec, str, option};
import option::{some};
import codemap::span;
import syntax::ext::base::ext_ctxt;

View file

@ -1,4 +1,3 @@
import option;
import base::*;
import syntax::ast;

View file

@ -4,7 +4,6 @@
* should all get sucked into either the compiler syntax extension plugin
* interface.
*/
import core::{vec, option};
import std::generic_os;
import base::*;
export expand_syntax_ext;

View file

@ -1,9 +1,6 @@
import driver::session;
import option::{none, some};
import std::map::hashmap;
import vec;
import syntax::ast::{crate, expr_, expr_mac, mac_invoc};
import syntax::fold::*;

View file

@ -5,8 +5,6 @@
* should all get sucked into either the standard library extfmt module or the
* compiler syntax extension plugin interface.
*/
import core::{vec, str, option};
import option::{some};
import extfmt::ct::*;
import base::*;
import codemap::span;

View file

@ -1,4 +1,3 @@
import core::{vec, option};
import base::*;
import syntax::ast;

View file

@ -1,7 +1,5 @@
import driver::session;
import option::{none, some};
import syntax::ast::{crate, expr_, mac_invoc,
mac_aq, mac_var};
import syntax::fold::*;

View file

@ -1,9 +1,7 @@
use std;
import codemap::span;
import core::{vec, option};
import std::map::{hashmap, new_str_hash};
import option::{some, none};
import driver::session::session;
import base::*;

View file

@ -1,8 +1,6 @@
import syntax::codemap::span;
import ast::*;
import core::{vec, option};
export ast_fold_precursor;
export ast_fold;
export default_ast_fold;

View file

@ -1,8 +1,6 @@
import front::attr;
import core::{option, result};
import std::{io, fs};
import option::{some, none};
import syntax::ast;
import syntax::parse::token;
import syntax::parse::parser::{parser, new_parser_from_file,

View file

@ -1,11 +1,8 @@
import core::{vec, str, option, either};
import std::io;
import io::reader_util;
import option::{some, none};
import util::interner;
import util::interner::intern;
import codemap;
import driver::diagnostic;
type reader = @{

View file

@ -1,6 +1,4 @@
import core::{vec, str, option, either, result};
import std::{io, fs};
import option::{some, none};
import either::{left, right};
import std::map::{hashmap, new_str_hash};
import token::can_begin_expr;

View file

@ -1,6 +1,5 @@
import util::interner;
import core::{int, uint, str};
import lexer::reader;
type str_num = uint;

View file

@ -1,5 +1,4 @@
import core::{vec, str};
import std::io;
import io::writer_util;

View file

@ -1,11 +1,7 @@
import core::{vec, int, str, uint, option};
import std::io;
import parse::lexer;
import syntax::codemap::codemap;
import ast;
import ast_util;
import option::{some, none};
import pp::{break_offset, word, printer,
space, zerobreak, hardbreak, breaks, consistent,
inconsistent, eof};

View file

@ -1,10 +1,8 @@
// An "interner" is a data structure that associates values with uint tags and
// allows bidirectional lookup; i.e. given a value, one can easily find the
// type, and vice versa.
import core::vec;
import std::map;
import std::map::{hashmap, hashfn, eqfn};
import option::{none, some};
type interner<T> =
{map: hashmap<T, uint>,

View file

@ -1,10 +1,7 @@
import ast::*;
import option;
import option::{none, some};
import codemap::span;
// Context-passing AST walker. Each overridden visit method has full control
// over what happens with its node, it can do its own traversal of the node's
// children (potentially passing in different contexts to each), call

View file

@ -1,6 +1,5 @@
import math::{max, min};
import std::map::hashmap;
import option::{some};
import syntax::ast;
import ast::{ty, pat};
import syntax::codemap::{span};

View file

@ -2,12 +2,7 @@
// FIXME: I'm not happy how this module turned out. Should probably
// just be folded into cstore.
import core::option;
import std::fs;
import vec;
import std::os;
import result;
import std::generic_os;
import std::{fs, os, generic_os};
export filesearch;
export mk_filesearch;

View file

@ -1,5 +1,3 @@
import core::{vec, str, int, option};
import option::{none, some};
import middle::ty;
import middle::ty::*;
import metadata::encoder;

View file

@ -264,7 +264,7 @@ fn string_reader(s: str) -> reader {
// Writing
enum fileflag { append, create, truncate, none, }
enum fileflag { append, create, truncate, no_flag, }
// FIXME: Seekable really should be orthogonal.
// FIXME: eventually u64
@ -350,7 +350,7 @@ fn mk_file_writer(path: str, flags: [fileflag])
append { fflags |= os::libc_constants::O_APPEND; }
create { fflags |= os::libc_constants::O_CREAT; }
truncate { fflags |= os::libc_constants::O_TRUNC; }
none { }
no_flag { }
}
}
let fd = str::as_buf(path, {|pathbuf|