3 // ignore-pretty issue #37199
5 // Don't panic on blocks without results
6 // There are several tests in this run-pass that raised
7 // when this bug was opened. The cases where the compiler
8 // panics before the fix have a comment.
12 fn test(slot: &mut Option<Box<dyn FnMut() -> Box<dyn FnMut()>>>) -> () {
15 // `{let .. a(); }` would break
16 Some(mut a) => { let _a = a(); },
21 fn not(b: bool) -> bool {
25 // `panic!(...)` would break
26 panic!("Break the compiler");
34 // `{ test(...); }` would break
35 let _s : S = S{ x: { test(&mut slot); } };