diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-06-30 19:36:55 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-07-04 16:30:48 -0700 |
| commit | 8552a7477544b4bbf6ddd39e011a0e514cfd75d6 (patch) | |
| tree | 3772af49908fcaa4cd6154c3288a0aa33829b19e /src/compiletest | |
| parent | f8507778a36478035f46bfa9f925398a36cd443f (diff) | |
Bring compiletest/rustpkg/driver up to date on std vs core
Diffstat (limited to 'src/compiletest')
| -rw-r--r-- | src/compiletest/common.rs | 2 | ||||
| -rw-r--r-- | src/compiletest/compiletest.rs | 36 | ||||
| -rw-r--r-- | src/compiletest/errors.rs | 4 | ||||
| -rw-r--r-- | src/compiletest/header.rs | 6 | ||||
| -rw-r--r-- | src/compiletest/procsrv.rs | 8 | ||||
| -rw-r--r-- | src/compiletest/runtest.rs | 10 | ||||
| -rw-r--r-- | src/compiletest/util.rs | 6 |
7 files changed, 24 insertions, 48 deletions
diff --git a/src/compiletest/common.rs b/src/compiletest/common.rs index 869657326b7..38289f62741 100644 --- a/src/compiletest/common.rs +++ b/src/compiletest/common.rs @@ -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, diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 82206f12fae..7d9a7c3ea75 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -11,21 +11,16 @@ #[crate_type = "bin"]; #[allow(non_camel_case_types)]; +#[allow(unrecognized_lint)]; // NOTE: remove after snapshot +#[deny(warnings)]; -#[no_core]; // XXX: Remove after snapshot -#[no_std]; +extern mod extra; -extern mod core(name = "std", vers = "0.7"); -extern mod extra(name = "extra", vers = "0.7"); - -use core::prelude::*; -use core::*; +use std::os; use extra::getopts; use extra::test; -use core::result::{Ok, Err}; - use common::config; use common::mode_run_pass; use common::mode_run_fail; @@ -42,13 +37,6 @@ pub mod runtest; pub mod common; pub mod errors; -mod std { - pub use core::cmp; - pub use core::str; - pub use core::sys; - pub use core::unstable; -} - pub fn main() { let args = os::args(); let config = parse_config(args); @@ -98,8 +86,8 @@ pub fn parse_config(args: ~[~str]) -> config { run_ignored: getopts::opt_present(matches, "ignored"), filter: if !matches.free.is_empty() { - option::Some(copy matches.free[0]) - } else { option::None }, + Some(copy matches.free[0]) + } else { None }, logfile: getopts::opt_maybe_str(matches, "logfile").map(|s| Path(*s)), runtool: getopts::opt_maybe_str(matches, "runtool"), rustcflags: getopts::opt_maybe_str(matches, "rustcflags"), @@ -148,8 +136,8 @@ pub fn log_config(config: &config) { pub fn opt_str<'a>(maybestr: &'a Option<~str>) -> &'a str { match *maybestr { - option::None => "(none)", - option::Some(ref s) => { + None => "(none)", + Some(ref s) => { let s: &'a str = *s; s } @@ -161,7 +149,7 @@ pub fn opt_str2(maybestr: Option<~str>) -> ~str { } pub fn str_opt(maybestr: ~str) -> Option<~str> { - if maybestr != ~"(none)" { option::Some(maybestr) } else { option::None } + if maybestr != ~"(none)" { Some(maybestr) } else { None } } pub fn str_mode(s: ~str) -> mode { @@ -199,8 +187,8 @@ pub fn test_opts(config: &config) -> test::TestOpts { logfile: copy config.logfile, run_tests: true, run_benchmarks: false, - save_results: option::None, - compare_results: option::None + save_results: None, + compare_results: None } } @@ -268,7 +256,7 @@ pub fn make_test_name(config: &config, testfile: &Path) -> test::TestName { } pub fn make_test_closure(config: &config, testfile: &Path) -> test::TestFn { - use core::cell::Cell; + use std::cell::Cell; let config = Cell::new(copy *config); let testfile = Cell::new(testfile.to_str()); test::DynTestFn(|| { runtest::run(config.take(), testfile.take()) }) diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs index 4649d4dfc3c..780a917c019 100644 --- a/src/compiletest/errors.rs +++ b/src/compiletest/errors.rs @@ -8,9 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; - -use core::io; +use std::io; pub struct ExpectedError { line: uint, kind: ~str, msg: ~str } diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs index ddb68d48116..9cd489f0576 100644 --- a/src/compiletest/header.rs +++ b/src/compiletest/header.rs @@ -8,13 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; - use common::config; use common; -use core::io; -use core::os; +use std::io; +use std::os; pub struct TestProps { // Lines that should be expected, in order, on standard out diff --git a/src/compiletest/procsrv.rs b/src/compiletest/procsrv.rs index 93fe258d167..0e61b45d619 100644 --- a/src/compiletest/procsrv.rs +++ b/src/compiletest/procsrv.rs @@ -8,11 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; - -use core::os; -use core::run; -use core::str; +use std::os; +use std::run; +use std::str; #[cfg(target_os = "win32")] fn target_env(lib_path: &str, prog: &str) -> ~[(~str,~str)] { diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 8e493fd5396..91016ba91fa 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -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; @@ -22,10 +20,10 @@ use procsrv; use util; use util::logv; -use core::io; -use core::os; -use core::uint; -use core::vec; +use std::io; +use std::os; +use std::uint; +use std::vec; pub fn run(config: config, testfile: ~str) { if config.verbose { diff --git a/src/compiletest/util.rs b/src/compiletest/util.rs index 26a62f8a5b2..5af469ff841 100644 --- a/src/compiletest/util.rs +++ b/src/compiletest/util.rs @@ -8,12 +8,10 @@ // 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; +use std::io; +use std::os::getenv; pub fn make_new_path(path: &str) -> ~str { |
