In which order are these lines printed?

from Moves, partial moves and drops
Rust 1.98 beginner 2 min

In which order are these lines printed?

Rust
struct Traced(&'static str);

impl Drop for Traced {
    fn drop(&mut self) {
        println!("drop {}", self.0);
    }
}

fn main() {
    let _outer = Traced("outer");
    {
        let _inner = Traced("inner");
        println!("work");
    }
    println!("done");
}
Open in playground
Report an error