rust/src/test/run-pass/drop-trait.rs
2012-11-29 11:06:15 -08:00

14 lines
153 B
Rust

struct Foo {
x: int
}
impl Foo : Drop {
fn finalize(&self) {
io::println("bye");
}
}
fn main() {
let x: Foo = Foo { x: 3 };
}