This crate provides final_fn macros, what executes given code when leaving code block
use final_fn::final_fn; fn main() { final_fn!({ println!("End of main!"); }); println!("Hello world!"); }