Medium
Drop order across struct fields, Vec elements, and locals
What does this program print when main returns?
main.rs
struct Noisy(&'static str);
impl Drop for Noisy {
fn drop(&mut self) {
print!("{} ", self.0);
}
}
struct Pair {
a: Noisy,
b: Noisy,
}
fn main() {
let _p = Pair { a: Noisy("a"), b: Noisy("b") };
let _v = vec![Noisy("v0"), Noisy("v1")];
let _x = Noisy("x");
}46 of 53 in Rust