@@ -126,6 +126,7 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
126
126
skip : vec ! [ ] ,
127
127
list : false ,
128
128
options : test:: Options :: new ( ) ,
129
+ #[ cfg( not( feature = "stable" ) ) ]
129
130
time_options : None ,
130
131
}
131
132
}
@@ -151,8 +152,8 @@ fn collect_tests_from_dir(config: &Config,
151
152
-> io:: Result < ( ) > {
152
153
// Ignore directories that contain a file
153
154
// `compiletest-ignore-dir`.
154
- for file in try! ( fs:: read_dir ( dir) ) {
155
- let file = try! ( file) ;
155
+ for file in fs:: read_dir ( dir) ? {
156
+ let file = file? ;
156
157
let name = file. file_name ( ) ;
157
158
if name == * "compiletest-ignore-dir" {
158
159
return Ok ( ( ) ) ;
@@ -179,9 +180,9 @@ fn collect_tests_from_dir(config: &Config,
179
180
180
181
// Add each `.rs` file as a test, and recurse further on any
181
182
// subdirectories we find, except for `aux` directories.
182
- let dirs = try! ( fs:: read_dir ( dir) ) ;
183
+ let dirs = fs:: read_dir ( dir) ? ;
183
184
for file in dirs {
184
- let file = try! ( file) ;
185
+ let file = file? ;
185
186
let file_path = file. path ( ) ;
186
187
let file_name = file. file_name ( ) ;
187
188
if is_test ( & file_name) {
@@ -212,11 +213,11 @@ fn collect_tests_from_dir(config: &Config,
212
213
fs:: create_dir_all ( & build_dir) . unwrap ( ) ;
213
214
} else {
214
215
debug ! ( "found directory: {:?}" , file_path. display( ) ) ;
215
- try! ( collect_tests_from_dir ( config,
216
+ collect_tests_from_dir ( config,
216
217
base,
217
218
& file_path,
218
219
& relative_file_path,
219
- tests) ) ;
220
+ tests) ? ;
220
221
}
221
222
} else {
222
223
debug ! ( "found other file/directory: {:?}" , file_path. display( ) ) ;
0 commit comments