#[warn(vecs_implicitly_copyable)];
#[deny(non_camel_case_types)];
#[allow(deprecated_mutable_fields)];
-#[allow(deprecated_drop)];
// Make core testable by not duplicating lang items. See #2912
#[cfg(test)] extern mod realcore(name = "core", vers = "0.7-pre");
use either::{Either, Left, Right};
use kinds::Owned;
use libc;
+use ops::Drop;
use option::{None, Option, Some};
use unstable::intrinsics;
use ptr;
let p_ = p.unwrap();
let p = unsafe { &*p_ };
- #[unsafe_destructor]
struct DropState<'self> {
p: &'self PacketHeader,
+ }
- drop {
+ #[unsafe_destructor]
+ impl<'self> Drop for DropState<'self> {
+ fn finalize(&self) {
unsafe {
if task::failing() {
self.p.state = Terminated;
}
}
}
- };
+ }
let _drop_state = DropState { p: &p.header };