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