The dbg! macro in Rust not only prints debug output but also returns the value, making it perfect for inline debugging:
let result = dbg!(expensive_calculation());
This prints [src/main.rs:1] expensive_calculation() = 42 and assigns 42 to result. No need to split into separate lines for debugging.