@@ -635,7 +635,7 @@ fn test_spawn_unlinked_unsup_no_fail_down() { // grandchild sends on a port
635635 let ch = ch. clone ( ) ;
636636 do spawn_unlinked {
637637 // Give middle task a chance to fail-but-not-kill-us.
638- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
638+ for 16 . times { task : : yield ( ) ; }
639639 ch. send ( ( ) ) ; // If killed first, grandparent hangs.
640640 }
641641 fail ! ( ) ; // Shouldn't kill either (grand)parent or (grand)child.
@@ -650,7 +650,7 @@ fn test_spawn_unlinked_unsup_no_fail_up() { // child unlinked fails
650650fn test_spawn_unlinked_sup_no_fail_up ( ) { // child unlinked fails
651651 do spawn_supervised { fail!( ) ; }
652652 // Give child a chance to fail-but-not-kill-us.
653- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
653+ for 16 . times { task : : yield( ) ; }
654654}
655655#[ test] #[ should_fail] #[ ignore( cfg( windows) ) ]
656656fn test_spawn_unlinked_sup_fail_down ( ) {
@@ -725,7 +725,7 @@ fn test_spawn_failure_propagate_grandchild() {
725725 loop { task:: yield ( ) ; }
726726 }
727727 }
728- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
728+ for 16 . times { task: : yield ( ) ; }
729729 fail ! ( ) ;
730730}
731731
@@ -737,7 +737,7 @@ fn test_spawn_failure_propagate_secondborn() {
737737 loop { task:: yield ( ) ; }
738738 }
739739 }
740- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
740+ for 16 . times { task: : yield ( ) ; }
741741 fail ! ( ) ;
742742}
743743
@@ -749,7 +749,7 @@ fn test_spawn_failure_propagate_nephew_or_niece() {
749749 loop { task:: yield ( ) ; }
750750 }
751751 }
752- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
752+ for 16 . times { task: : yield ( ) ; }
753753 fail ! ( ) ;
754754}
755755
@@ -761,7 +761,7 @@ fn test_spawn_linked_sup_propagate_sibling() {
761761 loop { task:: yield ( ) ; }
762762 }
763763 }
764- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
764+ for 16 . times { task: : yield ( ) ; }
765765 fail ! ( ) ;
766766}
767767
@@ -920,8 +920,7 @@ fn test_spawn_sched_blocking() {
920920
921921 // Testing that a task in one scheduler can block in foreign code
922922 // without affecting other schedulers
923- for old_iter:: repeat( 20 u) {
924-
923+ for 20 u. times {
925924 let ( start_po, start_ch) = stream( ) ;
926925 let ( fin_po, fin_ch) = stream( ) ;
927926
@@ -1040,7 +1039,7 @@ fn test_unkillable() {
10401039
10411040 // We want to do this after failing
10421041 do spawn_unlinked {
1043- for old_iter :: repeat ( 10 ) { yield( ) }
1042+ for 10 . times { yield( ) }
10441043 ch. send( ( ) ) ;
10451044 }
10461045
@@ -1075,7 +1074,7 @@ fn test_unkillable_nested() {
10751074
10761075 // We want to do this after failing
10771076 do spawn_unlinked || {
1078- for old_iter :: repeat ( 10 ) { yield( ) }
1077+ for 10 . times { yield( ) }
10791078 ch. send( ( ) ) ;
10801079 }
10811080
0 commit comments