diff options
| author | Flaper Fesp <flaper87@gmail.com> | 2013-08-20 01:26:05 +0200 |
|---|---|---|
| committer | Flaper Fesp <flaper87@gmail.com> | 2013-08-27 00:35:39 +0200 |
| commit | 5fc4045d789ed752c49b9368a2cc9a1cd8c341d5 (patch) | |
| tree | 1860876ee4ed3beba8d73845bb0c1598a746ce4b /src/libstd/rt | |
| parent | c4093b4a83dc1660257c88ca7834c46530010985 (diff) | |
| download | rust-5fc4045d789ed752c49b9368a2cc9a1cd8c341d5.tar.gz rust-5fc4045d789ed752c49b9368a2cc9a1cd8c341d5.zip | |
Don't make the runtime exit on illegal calls
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/kill.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstd/rt/kill.rs b/src/libstd/rt/kill.rs index b0b425e3aee..afef699390b 100644 --- a/src/libstd/rt/kill.rs +++ b/src/libstd/rt/kill.rs @@ -647,7 +647,9 @@ impl Death { /// All calls must be paired with a preceding call to inhibit_kill. #[inline] pub fn allow_kill(&mut self, already_failing: bool) { - rtassert!(self.unkillable != 0); + if self.unkillable == 0 { + fail!("illegal call of rekillable"); + } self.unkillable -= 1; if self.unkillable == 0 { rtassert!(self.kill_handle.is_some()); |
