rust/tests/ui/closures/deeply-nested_closures.rs

24 lines
483 B
Rust

// Check that this can be compiled in a reasonable time.
//@ build-pass
fn main() {
// 96 nested closures
let x = ();
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
|| || || || || || || ||
[&(), &x];
}