Skip to content

Commit

Permalink
auto merge of #6075 : thestinger/rust/no-no_core, r=brson
Browse files Browse the repository at this point in the history
core injection works fine now
  • Loading branch information
bors committed Apr 28, 2013
2 parents dd5b1de + f792bab commit 5f7947a
Show file tree
Hide file tree
Showing 211 changed files with 6 additions and 810 deletions.
2 changes: 0 additions & 2 deletions src/compiletest/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

#[deriving(Eq)]
pub enum mode {
mode_compile_fail,
Expand Down
3 changes: 0 additions & 3 deletions src/compiletest/compiletest.rc
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@

#[crate_type = "bin"];

#[no_core];

#[allow(vecs_implicitly_copyable)];
#[allow(non_camel_case_types)];
#[allow(deprecated_mode)];
#[allow(deprecated_pattern)];

extern mod core(vers = "0.7-pre");
extern mod std(vers = "0.7-pre");

use core::*;
Expand Down
6 changes: 0 additions & 6 deletions src/compiletest/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

use core::io;
use core::io::ReaderUtil;
use core::str;

pub struct ExpectedError { line: uint, kind: ~str, msg: ~str }

// Load any test directives embedded in the file
Expand Down
7 changes: 0 additions & 7 deletions src/compiletest/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

use common;
use common::config;

use core::io::ReaderUtil;
use core::io;
use core::os;
use core::str;

pub struct TestProps {
// Lines that should be expected, in order, on standard out
error_patterns: ~[~str],
Expand Down
6 changes: 0 additions & 6 deletions src/compiletest/procsrv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

use core::io::{ReaderUtil, WriterUtil};
use core::io;
use core::libc::c_int;
use core::os;
use core::run::spawn_process;
use core::run;
use core::str;
use core::task;

#[cfg(target_os = "win32")]
fn target_env(lib_path: ~str, prog: ~str) -> ~[(~str,~str)] {
Expand Down
9 changes: 0 additions & 9 deletions src/compiletest/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

use common::mode_run_pass;
use common::mode_run_fail;
use common::mode_compile_fail;
Expand All @@ -22,13 +20,6 @@ use procsrv;
use util;
use util::logv;

use core::io::WriterUtil;
use core::io;
use core::os;
use core::str;
use core::uint;
use core::vec;

pub fn run(config: config, testfile: ~str) {
if config.verbose {
// We're going to be dumping a lot of info. Start on a new line.
Expand Down
3 changes: 0 additions & 3 deletions src/compiletest/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

use common::config;

use core::io;
use core::os::getenv;

pub fn make_new_path(path: ~str) -> ~str {
Expand Down
5 changes: 1 addition & 4 deletions src/libfuzzer/fuzzer.rc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#[comment = "The Rust fuzzer library"];
#[license = "MIT/ASL2"];
#[crate_type = "lib"];
#[no_core];

#[legacy_modes];

Expand All @@ -26,12 +25,10 @@
#[allow(deprecated_mode)];
#[allow(deprecated_pattern)];

extern mod core(vers = "0.7-pre");
extern mod std(vers = "0.7-pre");
extern mod syntax(vers = "0.7-pre");

use core::*;
use core::io::WriterUtil;
use core::run;

use syntax::{ast, fold, visit, codemap};
use syntax::parse;
Expand Down
2 changes: 0 additions & 2 deletions src/librust/rust.rc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#[license = "MIT/ASL2"];
#[crate_type = "lib"];

extern mod core(vers = "0.7-pre");

use core::run;

enum ValidUsage {
Expand Down
12 changes: 0 additions & 12 deletions src/librustc/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

use back::rpath;
use driver::session::Session;
use driver::session;
Expand All @@ -22,17 +20,12 @@ use middle::trans::common::CrateContext;
use middle::ty;
use util::ppaux;

use core::char;
use core::hash::Streaming;
use core::hash;
use core::io::WriterUtil;
use core::libc::{c_int, c_uint};
use core::os::consts::{macos, freebsd, linux, android, win32};
use core::os;
use core::ptr;
use core::run;
use core::str;
use core::vec;
use syntax::ast;
use syntax::ast_map::{path, path_mod, path_name};
use syntax::attr;
Expand Down Expand Up @@ -98,10 +91,7 @@ pub mod jit {
use lib::llvm::{ModuleRef, PassManagerRef};
use metadata::cstore;

use core::cast;
use core::libc::c_int;
use core::ptr;
use core::str;

pub mod rusti {
#[nolink]
Expand Down Expand Up @@ -183,10 +173,8 @@ pub mod write {
use lib::llvm::{False, ModuleRef, mk_pass_manager, mk_target_data};
use lib;

use core::prelude::*;
use core::libc::{c_int, c_uint};
use core::path::Path;
use core::str;
use core::run;

pub fn is_object_or_assembly_or_exe(ot: output_type) -> bool {
Expand Down
6 changes: 0 additions & 6 deletions src/librustc/back/rpath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

use driver::session;
use metadata::cstore;
use metadata::filesearch;

use core::os;
use core::uint;
use core::util;
use core::vec;
use core::hashmap::HashSet;

fn not_win32(os: session::os) -> bool {
Expand Down Expand Up @@ -201,7 +196,6 @@ mod test {
// FIXME(#2119): the outer attribute should be #[cfg(unix, test)], then
// these redundant #[cfg(test)] blocks can be removed
#[cfg(test)]
use core::prelude::*;
#[cfg(test)]
use back::rpath::{get_absolute_rpath, get_install_prefix_rpath};
#[cfg(test)]
Expand Down
4 changes: 0 additions & 4 deletions src/librustc/driver/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

use back::link;
use back::{arm, x86, x86_64, mips};
use driver::session::{Aggressive};
Expand Down Expand Up @@ -893,8 +891,6 @@ pub fn list_metadata(sess: Session, path: &Path, out: @io::Writer) {

#[cfg(test)]
mod test {
use core::prelude::*;

use driver::driver::{build_configuration, build_session};
use driver::driver::{build_session_options, optgroups, str_input};

Expand Down
2 changes: 0 additions & 2 deletions src/librustc/driver/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

use back::link;
use back::target_strs;
use back;
Expand Down
5 changes: 0 additions & 5 deletions src/librustc/front/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

use syntax::{ast, fold, attr};

use core::option;
use core::vec;

type in_cfg_pred = @fn(attrs: ~[ast::attribute]) -> bool;

struct Context {
Expand Down
3 changes: 0 additions & 3 deletions src/librustc/front/core_inject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

use driver::session::Session;

use core::vec;
use syntax::ast;
use syntax::attr;
use syntax::codemap;
Expand Down
4 changes: 0 additions & 4 deletions src/librustc/front/intrinsic_inject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

use driver::session::Session;
use syntax::parse;
use syntax::ast;
use syntax::codemap::spanned;

use core::vec;

pub fn inject_intrinsic(sess: Session, crate: @ast::crate) -> @ast::crate {
let intrinsic_module = @(include_str!("intrinsic.rs").to_owned());

Expand Down
3 changes: 0 additions & 3 deletions src/librustc/front/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@

// Code that generates a test runner to run all the tests in a crate

use core::prelude::*;

use driver::session;
use front::config;

use core::vec;
use syntax::ast_util::*;
use syntax::attr;
use syntax::codemap::{dummy_sp, span, ExpandedFrom, CallInfo, NameAndSpan};
Expand Down
6 changes: 0 additions & 6 deletions src/librustc/lib/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

use core::hashmap::HashMap;
use core::libc::c_uint;
use core::option;
use core::ptr;
use core::str;
use core::vec;

pub type Opcode = u32;
pub type Bool = c_uint;
Expand Down
3 changes: 0 additions & 3 deletions src/librustc/metadata/creader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@

//! Validates all used crates and extern libraries and loads their metadata

use core::prelude::*;

use metadata::cstore;
use metadata::decoder;
use metadata::filesearch::FileSearch;
use metadata::loader;

use core::hashmap::HashMap;
use core::vec;
use syntax::attr;
use syntax::codemap::{span, dummy_sp};
use syntax::diagnostic::span_handler;
Expand Down
4 changes: 0 additions & 4 deletions src/librustc/metadata/csearch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.


// Searching for information from the cstore

use core::prelude::*;

use metadata::common::*;
use metadata::cstore;
use metadata::decoder;
use metadata;
use middle::{ty, resolve};

use core::vec;
use reader = std::ebml::reader;
use syntax::ast;
use syntax::ast_map;
Expand Down
3 changes: 0 additions & 3 deletions src/librustc/metadata/cstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@
// The crate store - a central repo for information collected about external
// crates and libraries

use core::prelude::*;

use metadata::cstore;
use metadata::decoder;

use core::hashmap::HashMap;
use core::vec;
use std;
use syntax::ast;
use syntax::parse::token::ident_interner;
Expand Down
3 changes: 0 additions & 3 deletions src/librustc/metadata/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.


// Decoding metadata from a single crate's metadata

use core::prelude::*;

use metadata::cstore::crate_metadata;
use metadata::common::*;
use metadata::csearch::{ProvidedTraitMethodInfo, StaticMethodInfo};
Expand Down
10 changes: 0 additions & 10 deletions src/librustc/metadata/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.


// Metadata encoding

use core::prelude::*;

use metadata::common::*;
use metadata::cstore;
use metadata::decoder;
Expand All @@ -26,13 +23,6 @@ use util::ppaux::ty_to_str;
use core::flate;
use core::hash::HashUtil;
use core::hashmap::HashMap;
use core::int;
use core::io::{Writer, WriterUtil};
use core::io;
use core::str;
use core::to_bytes::IterBytes;
use core::uint;
use core::vec;
use std::serialize::Encodable;
use std;
use syntax::abi::AbiSet;
Expand Down
Loading

0 comments on commit 5f7947a

Please sign in to comment.