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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
482 B
Rust
Raw Normal View History

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