Skip to content

Commit 42dffdf

Browse files
committed
---
yaml --- r: 77694 b: refs/heads/master c: 5e80e0c h: refs/heads/master v: v3
1 parent 88a6f99 commit 42dffdf

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 5fc4045d789ed752c49b9368a2cc9a1cd8c341d5
2+
refs/heads/master: 5e80e0cbf415219bb4fb483a24bd8cc03836d315
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 60fba4d7d677ec098e6a43014132fe99f7547363
55
refs/heads/try: ebfe63cd1c0b5d23f7ea60c69b4fde2e30cfd42a

trunk/src/libstd/rt/kill.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,9 @@ impl Death {
648648
#[inline]
649649
pub fn allow_kill(&mut self, already_failing: bool) {
650650
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()");
652654
}
653655
self.unkillable -= 1;
654656
if self.unkillable == 0 {

trunk/src/libstd/task/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,8 +651,8 @@ fn test_kill_unkillable_task() {
651651
}
652652
}
653653

654-
#[ignore(reason = "linked failure")]
655654
#[test]
655+
#[ignore(cfg(windows))]
656656
fn test_kill_rekillable_task() {
657657
use rt::test::*;
658658

@@ -672,8 +672,8 @@ fn test_kill_rekillable_task() {
672672
}
673673

674674
#[test]
675-
#[ignore(cfg(windows))]
676675
#[should_fail]
676+
#[ignore(cfg(windows))]
677677
fn test_rekillable_not_nested() {
678678
do rekillable {
679679
// This should fail before

0 commit comments

Comments
 (0)