1
Fork 0

Revert "Convert libstd to use the Drop trait"

This reverts commit 28c7a25151.
This commit is contained in:
Brian Anderson 2012-11-14 14:51:16 -08:00
parent 11024eaebb
commit c44c9a47d8
8 changed files with 52 additions and 107 deletions

View file

@ -217,10 +217,7 @@ fn check_poison(is_mutex: bool, failed: bool) {
#[doc(hidden)]
struct PoisonOnFail {
failed: &mut bool,
}
impl PoisonOnFail : Drop {
fn finalize() {
drop {
/* assert !*self.failed; -- might be false in case of cond.wait() */
if task::failing() { *self.failed = true; }
}