Skip to content

Commit f792bab

Browse files
committed
only use #[no_core] in libcore
1 parent dd5b1de commit f792bab

File tree

211 files changed

+6
-810
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+6
-810
lines changed

src/compiletest/common.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
#[deriving(Eq)]
1412
pub enum mode {
1513
mode_compile_fail,

src/compiletest/compiletest.rc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,11 @@
1010

1111
#[crate_type = "bin"];
1212

13-
#[no_core];
14-
1513
#[allow(vecs_implicitly_copyable)];
1614
#[allow(non_camel_case_types)];
1715
#[allow(deprecated_mode)];
1816
#[allow(deprecated_pattern)];
1917

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

2320
use core::*;

src/compiletest/errors.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
13-
use core::io;
14-
use core::io::ReaderUtil;
15-
use core::str;
16-
1711
pub struct ExpectedError { line: uint, kind: ~str, msg: ~str }
1812

1913
// Load any test directives embedded in the file

src/compiletest/header.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use common;
1412
use common::config;
1513

16-
use core::io::ReaderUtil;
17-
use core::io;
18-
use core::os;
19-
use core::str;
20-
2114
pub struct TestProps {
2215
// Lines that should be expected, in order, on standard out
2316
error_patterns: ~[~str],

src/compiletest/procsrv.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
1211

13-
use core::io::{ReaderUtil, WriterUtil};
14-
use core::io;
1512
use core::libc::c_int;
16-
use core::os;
1713
use core::run::spawn_process;
1814
use core::run;
19-
use core::str;
20-
use core::task;
2115

2216
#[cfg(target_os = "win32")]
2317
fn target_env(lib_path: ~str, prog: ~str) -> ~[(~str,~str)] {

src/compiletest/runtest.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use common::mode_run_pass;
1412
use common::mode_run_fail;
1513
use common::mode_compile_fail;
@@ -22,13 +20,6 @@ use procsrv;
2220
use util;
2321
use util::logv;
2422

25-
use core::io::WriterUtil;
26-
use core::io;
27-
use core::os;
28-
use core::str;
29-
use core::uint;
30-
use core::vec;
31-
3223
pub fn run(config: config, testfile: ~str) {
3324
if config.verbose {
3425
// We're going to be dumping a lot of info. Start on a new line.

src/compiletest/util.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use common::config;
1412

15-
use core::io;
1613
use core::os::getenv;
1714

1815
pub fn make_new_path(path: ~str) -> ~str {

src/libfuzzer/fuzzer.rc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#[comment = "The Rust fuzzer library"];
1818
#[license = "MIT/ASL2"];
1919
#[crate_type = "lib"];
20-
#[no_core];
2120

2221
#[legacy_modes];
2322

@@ -26,12 +25,10 @@
2625
#[allow(deprecated_mode)];
2726
#[allow(deprecated_pattern)];
2827

29-
extern mod core(vers = "0.7-pre");
3028
extern mod std(vers = "0.7-pre");
3129
extern mod syntax(vers = "0.7-pre");
3230

33-
use core::*;
34-
use core::io::WriterUtil;
31+
use core::run;
3532

3633
use syntax::{ast, fold, visit, codemap};
3734
use syntax::parse;

src/librust/rust.rc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#[license = "MIT/ASL2"];
2121
#[crate_type = "lib"];
2222

23-
extern mod core(vers = "0.7-pre");
24-
2523
use core::run;
2624

2725
enum ValidUsage {

src/librustc/back/link.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use back::rpath;
1412
use driver::session::Session;
1513
use driver::session;
@@ -22,17 +20,12 @@ use middle::trans::common::CrateContext;
2220
use middle::ty;
2321
use util::ppaux;
2422

25-
use core::char;
2623
use core::hash::Streaming;
2724
use core::hash;
2825
use core::io::WriterUtil;
2926
use core::libc::{c_int, c_uint};
3027
use core::os::consts::{macos, freebsd, linux, android, win32};
31-
use core::os;
32-
use core::ptr;
3328
use core::run;
34-
use core::str;
35-
use core::vec;
3629
use syntax::ast;
3730
use syntax::ast_map::{path, path_mod, path_name};
3831
use syntax::attr;
@@ -98,10 +91,7 @@ pub mod jit {
9891
use lib::llvm::{ModuleRef, PassManagerRef};
9992
use metadata::cstore;
10093

101-
use core::cast;
10294
use core::libc::c_int;
103-
use core::ptr;
104-
use core::str;
10595

10696
pub mod rusti {
10797
#[nolink]
@@ -183,10 +173,8 @@ pub mod write {
183173
use lib::llvm::{False, ModuleRef, mk_pass_manager, mk_target_data};
184174
use lib;
185175

186-
use core::prelude::*;
187176
use core::libc::{c_int, c_uint};
188177
use core::path::Path;
189-
use core::str;
190178
use core::run;
191179

192180
pub fn is_object_or_assembly_or_exe(ot: output_type) -> bool {

src/librustc/back/rpath.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use driver::session;
1412
use metadata::cstore;
1513
use metadata::filesearch;
1614

17-
use core::os;
18-
use core::uint;
1915
use core::util;
20-
use core::vec;
2116
use core::hashmap::HashSet;
2217

2318
fn not_win32(os: session::os) -> bool {
@@ -201,7 +196,6 @@ mod test {
201196
// FIXME(#2119): the outer attribute should be #[cfg(unix, test)], then
202197
// these redundant #[cfg(test)] blocks can be removed
203198
#[cfg(test)]
204-
use core::prelude::*;
205199
#[cfg(test)]
206200
use back::rpath::{get_absolute_rpath, get_install_prefix_rpath};
207201
#[cfg(test)]

src/librustc/driver/driver.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use back::link;
1412
use back::{arm, x86, x86_64, mips};
1513
use driver::session::{Aggressive};
@@ -893,8 +891,6 @@ pub fn list_metadata(sess: Session, path: &Path, out: @io::Writer) {
893891

894892
#[cfg(test)]
895893
mod test {
896-
use core::prelude::*;
897-
898894
use driver::driver::{build_configuration, build_session};
899895
use driver::driver::{build_session_options, optgroups, str_input};
900896

src/librustc/driver/session.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use back::link;
1412
use back::target_strs;
1513
use back;

src/librustc/front/config.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use syntax::{ast, fold, attr};
1412

15-
use core::option;
16-
use core::vec;
17-
1813
type in_cfg_pred = @fn(attrs: ~[ast::attribute]) -> bool;
1914

2015
struct Context {

src/librustc/front/core_inject.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use driver::session::Session;
1412

15-
use core::vec;
1613
use syntax::ast;
1714
use syntax::attr;
1815
use syntax::codemap;

src/librustc/front/intrinsic_inject.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use driver::session::Session;
1412
use syntax::parse;
1513
use syntax::ast;
1614
use syntax::codemap::spanned;
1715

18-
use core::vec;
19-
2016
pub fn inject_intrinsic(sess: Session, crate: @ast::crate) -> @ast::crate {
2117
let intrinsic_module = @(include_str!("intrinsic.rs").to_owned());
2218

src/librustc/front/test.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@
1010

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

13-
use core::prelude::*;
14-
1513
use driver::session;
1614
use front::config;
1715

18-
use core::vec;
1916
use syntax::ast_util::*;
2017
use syntax::attr;
2118
use syntax::codemap::{dummy_sp, span, ExpandedFrom, CallInfo, NameAndSpan};

src/librustc/lib/llvm.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use core::hashmap::HashMap;
1412
use core::libc::c_uint;
15-
use core::option;
16-
use core::ptr;
17-
use core::str;
18-
use core::vec;
1913

2014
pub type Opcode = u32;
2115
pub type Bool = c_uint;

src/librustc/metadata/creader.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,12 @@
1111

1212
//! Validates all used crates and extern libraries and loads their metadata
1313
14-
use core::prelude::*;
15-
1614
use metadata::cstore;
1715
use metadata::decoder;
1816
use metadata::filesearch::FileSearch;
1917
use metadata::loader;
2018

2119
use core::hashmap::HashMap;
22-
use core::vec;
2320
use syntax::attr;
2421
use syntax::codemap::{span, dummy_sp};
2522
use syntax::diagnostic::span_handler;

src/librustc/metadata/csearch.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,14 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
1211
// Searching for information from the cstore
1312

14-
use core::prelude::*;
15-
1613
use metadata::common::*;
1714
use metadata::cstore;
1815
use metadata::decoder;
1916
use metadata;
2017
use middle::{ty, resolve};
2118

22-
use core::vec;
2319
use reader = std::ebml::reader;
2420
use syntax::ast;
2521
use syntax::ast_map;

src/librustc/metadata/cstore.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@
1212
// The crate store - a central repo for information collected about external
1313
// crates and libraries
1414

15-
use core::prelude::*;
16-
1715
use metadata::cstore;
1816
use metadata::decoder;
1917

2018
use core::hashmap::HashMap;
21-
use core::vec;
2219
use std;
2320
use syntax::ast;
2421
use syntax::parse::token::ident_interner;

src/librustc/metadata/decoder.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
1211
// Decoding metadata from a single crate's metadata
1312

14-
use core::prelude::*;
15-
1613
use metadata::cstore::crate_metadata;
1714
use metadata::common::*;
1815
use metadata::csearch::{ProvidedTraitMethodInfo, StaticMethodInfo};

src/librustc/metadata/encoder.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
1211
// Metadata encoding
1312

14-
use core::prelude::*;
15-
1613
use metadata::common::*;
1714
use metadata::cstore;
1815
use metadata::decoder;
@@ -26,13 +23,6 @@ use util::ppaux::ty_to_str;
2623
use core::flate;
2724
use core::hash::HashUtil;
2825
use core::hashmap::HashMap;
29-
use core::int;
30-
use core::io::{Writer, WriterUtil};
31-
use core::io;
32-
use core::str;
33-
use core::to_bytes::IterBytes;
34-
use core::uint;
35-
use core::vec;
3626
use std::serialize::Encodable;
3727
use std;
3828
use syntax::abi::AbiSet;

0 commit comments

Comments
 (0)