]> git.lizzy.rs Git - rust.git/blobdiff - src/libextra/rc.rs
switch Drop to `&mut self`
[rust.git] / src / libextra / rc.rs
index 86fbbd4c3cc597f62e4978a9e26904cd295d7b65..fa7cd9025eb7ce2bd65f1acc6945e7dfcff5ebc2 100644 (file)
@@ -73,7 +73,7 @@ pub fn borrow<'r>(&'r self) -> &'r T {
 
 #[unsafe_destructor]
 impl<T> Drop for Rc<T> {
-    fn drop(&self) {
+    fn drop(&mut self) {
         unsafe {
             if self.ptr.is_not_null() {
                 (*self.ptr).count -= 1;
@@ -218,7 +218,7 @@ pub fn with_mut_borrow<U>(&self, f: &fn(&mut T) -> U) -> U {
 
 #[unsafe_destructor]
 impl<T> Drop for RcMut<T> {
-    fn drop(&self) {
+    fn drop(&mut self) {
         unsafe {
             if self.ptr.is_not_null() {
                 (*self.ptr).count -= 1;