// Regression test for #87414. // check-pass // compile-flags: -Zthir-unsafeck fn bad() -> Box> { todo!() } fn foo() -> [(); { |x: u32| { x }; 4 }] { todo!() } fn bar() { let _: [(); { |x: u32| { x }; 4 }]; } // This one should not cause any errors either: unsafe fn unsf() {} fn bad2() -> Box> { todo!() } fn main() {}