Hard
A panic inside Drop while the stack is already unwinding
What does running this program print, and how does the process end?
main.rs
struct Noisy(&'static str);
impl Drop for Noisy {
fn drop(&mut self) {
println!("Dropping {}", self.0);
if self.0 == "second" {
panic!("panic during drop!");
}
}
}
fn main() {
let _a = Noisy("first");
let _b = Noisy("second");
panic!("initial panic");
}40 of 53 in Rust