}
impl Drop for Foo {
- fn finalize(&self) {
- 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`
}