rust/src/test/compile-fail/issue-2825-b.rs

18 lines
257 B
Rust
Raw Normal View History

2012-08-15 18:46:55 -07:00
struct example {
2012-09-06 19:40:15 -07:00
x: int,
drop {} //~ ERROR First destructor declared
drop {
debug!("Goodbye, cruel world");
}
}
2012-09-05 15:58:43 -07:00
fn example() -> example {
example {
x: 1
}
}
fn main(_args: ~[~str]) {
let e: example = example();
}