Files
simple-rust-tests/__std/misc/src/bin/drop_test.rs
2024-01-07 23:51:29 +08:00

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.");
}