2021-07-30 19:04:16 +02:00
|
|
|
// Regression test for #87414.
|
|
|
|
|
|
2024-02-16 20:02:50 +00:00
|
|
|
//@ check-pass
|
2021-07-30 19:04:16 +02:00
|
|
|
|
|
|
|
|
fn bad<T>() -> Box<dyn Iterator<Item = [(); { |x: u32| { x }; 4 }]>> { 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<T>() -> Box<dyn Iterator<Item = [(); { unsafe { || { unsf() } }; 4 }]>> { todo!() }
|
|
|
|
|
|
|
|
|
|
fn main() {}
|