1 // Regression test for #87414.
4 // compile-flags: -Zthir-unsafeck
6 fn bad<T>() -> Box<dyn Iterator<Item = [(); { |x: u32| { x }; 4 }]>> { todo!() }
8 fn foo() -> [(); { |x: u32| { x }; 4 }] { todo!() }
9 fn bar() { let _: [(); { |x: u32| { x }; 4 }]; }
11 // This one should not cause any errors either:
13 fn bad2<T>() -> Box<dyn Iterator<Item = [(); { unsafe { || { unsf() } }; 4 }]>> { todo!() }