11
11
#[ crate_type = "bin" ] ;
12
12
13
13
#[ allow( non_camel_case_types) ] ;
14
+ #[ allow( unrecognized_lint) ] ; // NOTE: remove after snapshot
15
+ #[ deny( warnings) ] ;
14
16
15
- #[ no_core] ; // XXX: Remove after snapshot
16
- #[ no_std] ;
17
+ extern mod extra;
17
18
18
- extern mod core ( name = "std" , vers = "0.7" ) ;
19
- extern mod extra ( name = "extra" , vers = "0.7" ) ;
20
-
21
- use core:: prelude:: * ;
22
- use core:: * ;
19
+ use std:: os;
23
20
24
21
use extra:: getopts;
25
22
use extra:: test;
26
23
27
- use core:: result:: { Ok , Err } ;
28
-
29
24
use common:: config;
30
25
use common:: mode_run_pass;
31
26
use common:: mode_run_fail;
@@ -42,13 +37,6 @@ pub mod runtest;
42
37
pub mod common;
43
38
pub mod errors;
44
39
45
- mod std {
46
- pub use core:: cmp;
47
- pub use core:: str;
48
- pub use core:: sys;
49
- pub use core:: unstable;
50
- }
51
-
52
40
pub fn main ( ) {
53
41
let args = os:: args ( ) ;
54
42
let config = parse_config ( args) ;
@@ -98,8 +86,8 @@ pub fn parse_config(args: ~[~str]) -> config {
98
86
run_ignored : getopts:: opt_present ( matches, "ignored" ) ,
99
87
filter :
100
88
if !matches. free . is_empty ( ) {
101
- option :: Some ( copy matches. free [ 0 ] )
102
- } else { option :: None } ,
89
+ Some ( copy matches. free [ 0 ] )
90
+ } else { None } ,
103
91
logfile : getopts:: opt_maybe_str ( matches, "logfile" ) . map ( |s| Path ( * s) ) ,
104
92
runtool : getopts:: opt_maybe_str ( matches, "runtool" ) ,
105
93
rustcflags : getopts:: opt_maybe_str ( matches, "rustcflags" ) ,
@@ -148,8 +136,8 @@ pub fn log_config(config: &config) {
148
136
149
137
pub fn opt_str < ' a > ( maybestr : & ' a Option < ~str > ) -> & ' a str {
150
138
match * maybestr {
151
- option :: None => "(none)" ,
152
- option :: Some ( ref s) => {
139
+ None => "(none)" ,
140
+ Some ( ref s) => {
153
141
let s: & ' a str = * s;
154
142
s
155
143
}
@@ -161,7 +149,7 @@ pub fn opt_str2(maybestr: Option<~str>) -> ~str {
161
149
}
162
150
163
151
pub fn str_opt ( maybestr : ~str ) -> Option < ~str > {
164
- if maybestr != ~"( none) " { option :: Some ( maybestr) } else { option :: None }
152
+ if maybestr != ~"( none) " { Some ( maybestr) } else { None }
165
153
}
166
154
167
155
pub fn str_mode ( s : ~str ) -> mode {
@@ -199,8 +187,8 @@ pub fn test_opts(config: &config) -> test::TestOpts {
199
187
logfile : copy config. logfile ,
200
188
run_tests : true ,
201
189
run_benchmarks : false ,
202
- save_results : option :: None ,
203
- compare_results : option :: None
190
+ save_results : None ,
191
+ compare_results : None
204
192
}
205
193
}
206
194
@@ -268,7 +256,7 @@ pub fn make_test_name(config: &config, testfile: &Path) -> test::TestName {
268
256
}
269
257
270
258
pub fn make_test_closure ( config : & config , testfile : & Path ) -> test:: TestFn {
271
- use core :: cell:: Cell ;
259
+ use std :: cell:: Cell ;
272
260
let config = Cell :: new ( copy * config) ;
273
261
let testfile = Cell :: new ( testfile. to_str ( ) ) ;
274
262
test:: DynTestFn ( || { runtest:: run ( config. take ( ) , testfile. take ( ) ) } )
0 commit comments