File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -648,7 +648,9 @@ impl Death {
648
648
#[ inline]
649
649
pub fn allow_kill ( & mut self , already_failing : bool ) {
650
650
if self . unkillable == 0 {
651
- fail ! ( "illegal call of rekillable" ) ;
651
+ // we need to decrement the counter before failing.
652
+ self . unkillable -= 1 ;
653
+ fail ! ( "Cannot enter a rekillable() block without a surrounding unkillable()" ) ;
652
654
}
653
655
self . unkillable -= 1 ;
654
656
if self . unkillable == 0 {
Original file line number Diff line number Diff line change @@ -651,8 +651,8 @@ fn test_kill_unkillable_task() {
651
651
}
652
652
}
653
653
654
- #[ ignore( reason = "linked failure" ) ]
655
654
#[ test]
655
+ #[ ignore( cfg( windows) ) ]
656
656
fn test_kill_rekillable_task ( ) {
657
657
use rt:: test:: * ;
658
658
@@ -672,8 +672,8 @@ fn test_kill_rekillable_task() {
672
672
}
673
673
674
674
#[ test]
675
- #[ ignore( cfg( windows) ) ]
676
675
#[ should_fail]
676
+ #[ ignore( cfg( windows) ) ]
677
677
fn test_rekillable_not_nested ( ) {
678
678
do rekillable {
679
679
// This should fail before
You can’t perform that action at this time.
0 commit comments