about summary refs log tree commit diff
path: root/src/libcore/private.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/private.rs')
-rw-r--r--src/libcore/private.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/libcore/private.rs b/src/libcore/private.rs
index 2580efe6d09..e4fab18966c 100644
--- a/src/libcore/private.rs
+++ b/src/libcore/private.rs
@@ -126,7 +126,10 @@ struct ArcData<T> {
 
 struct ArcDestruct<T> {
     mut data: *libc::c_void,
-    drop {
+}
+
+impl<T> Drop for ArcDestruct<T>{
+    fn finalize(&self) {
         unsafe {
             if self.data.is_null() {
                 return; // Happens when destructing an unwrapper's handle.
@@ -178,7 +181,10 @@ pub unsafe fn unwrap_shared_mutable_state<T:Owned>(rc: SharedMutableState<T>)
     struct DeathThroes<T> {
         mut ptr:      Option<~ArcData<T>>,
         mut response: Option<comm::ChanOne<bool>>,
-        drop {
+    }
+
+    impl<T> Drop for DeathThroes<T>{
+        fn finalize(&self) {
             unsafe {
                 let response = option::swap_unwrap(&mut self.response);
                 // In case we get killed early, we need to tell the person who
@@ -311,7 +317,10 @@ type rust_little_lock = *libc::c_void;
 
 struct LittleLock {
     l: rust_little_lock,
-    drop {
+}
+
+impl Drop for LittleLock {
+    fn finalize(&self) {
         unsafe {
             rustrt::rust_destroy_little_lock(self.l);
         }