]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/issue-2718.rs
switch Drop to `&mut self`
[rust.git] / src / test / run-pass / issue-2718.rs
index edfae096407b6f77d7e1da4bc5ccdd13feb515f9..19f0843efd82c81d85742672bdc3862238e88172 100644 (file)
@@ -161,7 +161,7 @@ pub struct send_packet<T> {
 
     #[unsafe_destructor]
     impl<T:Send> Drop for send_packet<T> {
-        fn drop(&self) {
+        fn drop(&mut self) {
             unsafe {
                 if self.p != None {
                     let self_p: &mut Option<*packet<T>> =
@@ -191,7 +191,7 @@ pub struct recv_packet<T> {
 
     #[unsafe_destructor]
     impl<T:Send> Drop for recv_packet<T> {
-        fn drop(&self) {
+        fn drop(&mut self) {
             unsafe {
                 if self.p != None {
                     let self_p: &mut Option<*packet<T>> =