rust/src/test/run-pass/struct-literal-dtor.rs
2012-11-14 19:26:37 -08:00

14 lines
154 B
Rust

struct foo {
x: ~str,
}
impl foo : Drop {
fn finalize() {
error!("%s", self.x);
}
}
fn main() {
let _z = foo { x: ~"Hello" };
}