]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/repeat-to-run-dtor-twice.rs
rollup merge of #17355 : gamazeps/issue17210
[rust.git] / src / test / compile-fail / repeat-to-run-dtor-twice.rs
index e1e1e2313f42a7f94eda36f197f3fe5399c06c3a..8fdf586b3d1de4ec3a88cefcc140ce102c79ec08 100644 (file)
@@ -17,12 +17,13 @@ struct Foo {
 }
 
 impl Drop for Foo {
-    fn finalize(&self) {
-        io::println("Goodbye!");
+    fn drop(&mut self) {
+        println!("Goodbye!");
     }
 }
 
 fn main() {
     let a = Foo { x: 3 };
-    let _ = [ a, ..5 ];     //~ ERROR copying a value of non-copyable type
+    let _ = [ a, ..5 ];
+    //~^ ERROR the trait `core::kinds::Copy` is not implemented for the type `Foo`
 }