]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/option-unwrap.rs
switch Drop to `&mut self`
[rust.git] / src / test / run-pass / option-unwrap.rs
index a469e4b86ebcd27c8a76143aac9f5ebd526ca27a..66cd7f2b55f7499e5ee58e6152fef537e3ac638e 100644 (file)
@@ -15,7 +15,7 @@ struct dtor {
 
 #[unsafe_destructor]
 impl Drop for dtor {
-    fn drop(&self) {
+    fn drop(&mut self) {
         // abuse access to shared mutable state to write this code
         *self.x -= 1;
     }