2 // Regression test for Issue #30530: alloca's created for storing
3 // intermediate scratch values during brace-less match arms need to be
4 // initialized with their drop-flag set to "dropped" (or else we end
5 // up running the destructors on garbage data at the end of the
11 Custom(*mut Box<dyn Fn()>),
15 #[allow(unused_must_use)] {
16 take(Handler::Default, Box::new(main));
21 pub fn take(h: Handler, f: Box<dyn Fn()>) -> Box<dyn Fn()> {
24 Handler::Custom(ptr) => *Box::from_raw(ptr),
25 Handler::Default => f,