]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/borrowck-move-out-of-struct-with-dtor.rs
switch Drop to `&mut self`
[rust.git] / src / test / compile-fail / borrowck-move-out-of-struct-with-dtor.rs
index 4407329f49775876f027132e63bfc287da426620..ade9ce9568f958a5b758c6a8abefcd3576cac1c8 100644 (file)
@@ -1,6 +1,6 @@
 struct S {f:~str}
 impl Drop for S {
-    fn drop(&self) { println(self.f); }
+    fn drop(&mut self) { println(self.f); }
 }
 
 fn move_in_match() {