17 lines
281 B
Rust
17 lines
281 B
Rust
#[derive(Debug)]
|
|
struct Object {}
|
|
|
|
impl Drop for Object {
|
|
fn drop(&mut self) {
|
|
println!("Object#drop");
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
{
|
|
let object = Object {};
|
|
println!("Dump: {:?}", object);
|
|
println!("Block end.");
|
|
}
|
|
println!("Main end.");
|
|
} |