@@ -635,7 +635,7 @@ fn test_spawn_unlinked_unsup_no_fail_down() { // grandchild sends on a port
635
635
let ch = ch. clone ( ) ;
636
636
do spawn_unlinked {
637
637
// 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 ( ) ; }
639
639
ch. send ( ( ) ) ; // If killed first, grandparent hangs.
640
640
}
641
641
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
650
650
fn test_spawn_unlinked_sup_no_fail_up ( ) { // child unlinked fails
651
651
do spawn_supervised { fail!( ) ; }
652
652
// Give child a chance to fail-but-not-kill-us.
653
- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
653
+ for 16 . times { task : : yield( ) ; }
654
654
}
655
655
#[ test] #[ should_fail] #[ ignore( cfg( windows) ) ]
656
656
fn test_spawn_unlinked_sup_fail_down ( ) {
@@ -725,7 +725,7 @@ fn test_spawn_failure_propagate_grandchild() {
725
725
loop { task:: yield ( ) ; }
726
726
}
727
727
}
728
- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
728
+ for 16 . times { task: : yield ( ) ; }
729
729
fail ! ( ) ;
730
730
}
731
731
@@ -737,7 +737,7 @@ fn test_spawn_failure_propagate_secondborn() {
737
737
loop { task:: yield ( ) ; }
738
738
}
739
739
}
740
- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
740
+ for 16 . times { task: : yield ( ) ; }
741
741
fail ! ( ) ;
742
742
}
743
743
@@ -749,7 +749,7 @@ fn test_spawn_failure_propagate_nephew_or_niece() {
749
749
loop { task:: yield ( ) ; }
750
750
}
751
751
}
752
- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
752
+ for 16 . times { task: : yield ( ) ; }
753
753
fail ! ( ) ;
754
754
}
755
755
@@ -761,7 +761,7 @@ fn test_spawn_linked_sup_propagate_sibling() {
761
761
loop { task:: yield ( ) ; }
762
762
}
763
763
}
764
- for old_iter :: repeat ( 16 ) { task:: yield ( ) ; }
764
+ for 16 . times { task: : yield ( ) ; }
765
765
fail ! ( ) ;
766
766
}
767
767
@@ -920,8 +920,7 @@ fn test_spawn_sched_blocking() {
920
920
921
921
// Testing that a task in one scheduler can block in foreign code
922
922
// without affecting other schedulers
923
- for old_iter:: repeat( 20 u) {
924
-
923
+ for 20 u. times {
925
924
let ( start_po, start_ch) = stream( ) ;
926
925
let ( fin_po, fin_ch) = stream( ) ;
927
926
@@ -1040,7 +1039,7 @@ fn test_unkillable() {
1040
1039
1041
1040
// We want to do this after failing
1042
1041
do spawn_unlinked {
1043
- for old_iter :: repeat ( 10 ) { yield( ) }
1042
+ for 10 . times { yield( ) }
1044
1043
ch. send( ( ) ) ;
1045
1044
}
1046
1045
@@ -1075,7 +1074,7 @@ fn test_unkillable_nested() {
1075
1074
1076
1075
// We want to do this after failing
1077
1076
do spawn_unlinked || {
1078
- for old_iter :: repeat ( 10 ) { yield( ) }
1077
+ for 10 . times { yield( ) }
1079
1078
ch. send( ( ) ) ;
1080
1079
}
1081
1080
0 commit comments