@@ -619,7 +619,7 @@ fn test_spawn_unlinked_unsup_no_fail_down() { // grandchild sends on a port
619
619
let ch = ch. clone ( ) ;
620
620
do spawn_unlinked {
621
621
// Give middle task a chance to fail-but-not-kill-us.
622
- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
622
+ for 16 . times { task : : yield ( ) ; }
623
623
ch. send ( ( ) ) ; // If killed first, grandparent hangs.
624
624
}
625
625
fail ! ( ) ; // Shouldn't kill either (grand)parent or (grand)child.
@@ -634,7 +634,7 @@ fn test_spawn_unlinked_unsup_no_fail_up() { // child unlinked fails
634
634
fn test_spawn_unlinked_sup_no_fail_up ( ) { // child unlinked fails
635
635
do spawn_supervised { fail!( ) ; }
636
636
// Give child a chance to fail-but-not-kill-us.
637
- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
637
+ for 16 . times { task : : yield( ) ; }
638
638
}
639
639
#[ test] #[ should_fail] #[ ignore( cfg( windows) ) ]
640
640
fn test_spawn_unlinked_sup_fail_down ( ) {
@@ -709,7 +709,7 @@ fn test_spawn_failure_propagate_grandchild() {
709
709
loop { task:: yield ( ) ; }
710
710
}
711
711
}
712
- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
712
+ for 16 . times { task: : yield ( ) ; }
713
713
fail ! ( ) ;
714
714
}
715
715
@@ -721,7 +721,7 @@ fn test_spawn_failure_propagate_secondborn() {
721
721
loop { task:: yield ( ) ; }
722
722
}
723
723
}
724
- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
724
+ for 16 . times { task: : yield ( ) ; }
725
725
fail ! ( ) ;
726
726
}
727
727
@@ -733,7 +733,7 @@ fn test_spawn_failure_propagate_nephew_or_niece() {
733
733
loop { task:: yield ( ) ; }
734
734
}
735
735
}
736
- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
736
+ for 16 . times { task: : yield ( ) ; }
737
737
fail ! ( ) ;
738
738
}
739
739
@@ -745,7 +745,7 @@ fn test_spawn_linked_sup_propagate_sibling() {
745
745
loop { task:: yield ( ) ; }
746
746
}
747
747
}
748
- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
748
+ for 16 . times { task: : yield ( ) ; }
749
749
fail ! ( ) ;
750
750
}
751
751
@@ -904,8 +904,7 @@ fn test_spawn_sched_blocking() {
904
904
905
905
// Testing that a task in one scheduler can block in foreign code
906
906
// without affecting other schedulers
907
- for old_iter:: repeat( 20 u) {
908
-
907
+ for 20 u. times {
909
908
let ( start_po, start_ch) = stream( ) ;
910
909
let ( fin_po, fin_ch) = stream( ) ;
911
910
@@ -1024,7 +1023,7 @@ fn test_unkillable() {
1024
1023
1025
1024
// We want to do this after failing
1026
1025
do spawn_unlinked {
1027
- for old_iter :: repeat ( 10 ) { yield( ) }
1026
+ for 10 . times { yield( ) }
1028
1027
ch. send( ( ) ) ;
1029
1028
}
1030
1029
@@ -1059,7 +1058,7 @@ fn test_unkillable_nested() {
1059
1058
1060
1059
// We want to do this after failing
1061
1060
do spawn_unlinked || {
1062
- for old_iter :: repeat ( 10 ) { yield( ) }
1061
+ for 10 . times { yield( ) }
1063
1062
ch. send( ( ) ) ;
1064
1063
}
1065
1064
0 commit comments