Revert "Convert libstd to use the Drop trait"
This reverts commit 28c7a25151
.
This commit is contained in:
parent
11024eaebb
commit
c44c9a47d8
8 changed files with 52 additions and 107 deletions
|
@ -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; }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue