rust/src/test/run-pass/struct-literal-dtor.rs

9 lines
112 B
Rust
Raw Normal View History

struct foo {
x: ~str;
drop { #error["%s", self.x]; }
}
fn main() {
let _z = foo { x: ~"Hello" };
}