Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRustDrop plus move interactionSingle-choice MCQ

In the snippet below, what is the exact order in which the three destructors run, and why?

struct N(&'static str); impl Drop for N { fn drop(&mut self) { println!("{}", self.0); } } fn main() { let a = N("a"); let b = N("b"); let c = N("c"); }