mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
15 lines
406 B
Rust
15 lines
406 B
Rust
// Regression test for #87414.
|
|
|
|
//@ check-pass
|
|
|
|
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() {}
|