]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-1.rs
switch Drop to `&mut self`
[rust.git] / src / test / compile-fail / bind-by-move-neither-can-live-while-the-other-survives-1.rs
index 6353d7c6581b175ebfc2f3321777c983acc76c50..3d1cca46085dbf06f8d9f95a890360b85d309391 100644 (file)
@@ -11,7 +11,7 @@
 struct X { x: () }
 
 impl Drop for X {
-    fn drop(&self) {
+    fn drop(&mut self) {
         error!("destructor runs");
     }
 }