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