@@ -282,7 +282,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
282
282
// check if each line in props.check_lines appears in the
283
283
// output (in order)
284
284
let mut i = 0 u;
285
- foreach line in ProcRes . stdout . line_iter ( ) {
285
+ for line in ProcRes . stdout . line_iter ( ) {
286
286
if check_lines[ i] . trim ( ) == line. trim ( ) {
287
287
i += 1 u;
288
288
}
@@ -312,7 +312,7 @@ fn check_error_patterns(props: &TestProps,
312
312
let mut next_err_idx = 0 u;
313
313
let mut next_err_pat = & props. error_patterns [ next_err_idx] ;
314
314
let mut done = false ;
315
- foreach line in ProcRes . stderr . line_iter ( ) {
315
+ for line in ProcRes . stderr . line_iter ( ) {
316
316
if line. contains ( * next_err_pat) {
317
317
debug ! ( "found error pattern %s" , * next_err_pat) ;
318
318
next_err_idx += 1 u;
@@ -332,7 +332,7 @@ fn check_error_patterns(props: &TestProps,
332
332
fatal_ProcRes ( fmt ! ( "error pattern '%s' not found!" ,
333
333
missing_patterns[ 0 ] ) , ProcRes ) ;
334
334
} else {
335
- foreach pattern in missing_patterns. iter ( ) {
335
+ for pattern in missing_patterns. iter ( ) {
336
336
error ( fmt ! ( "error pattern '%s' not found!" , * pattern) ) ;
337
337
}
338
338
fatal_ProcRes ( ~"multiple error patterns not found", ProcRes ) ;
@@ -385,9 +385,9 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
385
385
// filename:line1:col1: line2:col2: *warning:* msg
386
386
// where line1:col1: is the starting point, line2:col2:
387
387
// is the ending point, and * represents ANSI color codes.
388
- foreach line in ProcRes . stderr . line_iter ( ) {
388
+ for line in ProcRes . stderr . line_iter ( ) {
389
389
let mut was_expected = false ;
390
- foreach ( i, ee) in expected_errors. iter ( ) . enumerate ( ) {
390
+ for ( i, ee) in expected_errors. iter ( ) . enumerate ( ) {
391
391
if !found_flags[ i] {
392
392
debug ! ( "prefix=%s ee.kind=%s ee.msg=%s line=%s" ,
393
393
prefixes[ i] , ee. kind, ee. msg, line) ;
@@ -413,7 +413,7 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
413
413
}
414
414
}
415
415
416
- foreach i in range( 0 u, found_flags. len ( ) ) {
416
+ for i in range ( 0 u, found_flags. len ( ) ) {
417
417
if !found_flags[ i] {
418
418
let ee = & expected_errors[ i] ;
419
419
fatal_ProcRes ( fmt ! ( "expected %s on line %u not found: %s" ,
@@ -558,7 +558,7 @@ fn compose_and_run_compiler(
558
558
let extra_link_args = ~[ ~"-L ",
559
559
aux_output_dir_name ( config, testfile) . to_str ( ) ] ;
560
560
561
- foreach rel_ab in props. aux_builds . iter ( ) {
561
+ for rel_ab in props. aux_builds . iter ( ) {
562
562
let abs_ab = config. aux_base . push_rel ( & Path ( * rel_ab) ) ;
563
563
let aux_args =
564
564
make_compile_args ( config, props, ~[ ~"--lib"] + extra_link_args,
@@ -785,7 +785,7 @@ fn _arm_exec_compiled_test(config: &config, props: &TestProps,
785
785
runargs. push ( fmt ! ( "%s" , config. adb_test_dir) ) ;
786
786
runargs. push ( fmt ! ( "%s" , prog_short) ) ;
787
787
788
- foreach tv in args. args . iter ( ) {
788
+ for tv in args. args . iter ( ) {
789
789
runargs. push ( tv. to_owned ( ) ) ;
790
790
}
791
791
@@ -802,7 +802,7 @@ fn _arm_exec_compiled_test(config: &config, props: &TestProps,
802
802
Some ( ~"") ) ;
803
803
804
804
let mut exitcode : int = 0 ;
805
- foreach c in exitcode_out. iter ( ) {
805
+ for c in exitcode_out. iter ( ) {
806
806
if !c. is_digit ( ) { break ; }
807
807
exitcode = exitcode * 10 + match c {
808
808
'0' .. '9' => c as int - ( '0' as int ) ,
@@ -851,7 +851,7 @@ fn _arm_push_aux_shared_library(config: &config, testfile: &Path) {
851
851
let tstr = aux_output_dir_name ( config, testfile) . to_str ( ) ;
852
852
853
853
let dirs = os:: list_dir_path ( & Path ( tstr) ) ;
854
- foreach file in dirs. iter ( ) {
854
+ for file in dirs. iter ( ) {
855
855
856
856
if ( file. filetype ( ) == Some ( ~". so ") ) {
857
857
0 commit comments