about summary refs log tree commit diff
path: root/tests/ui/closures/deeply-nested_closures.rs
blob: 5407702f7c51b5ab34464ee71fc2dc356a51b812 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Check that this can be compiled in a reasonable time.

//@ build-pass

fn main() {
    // 96 nested closures
    let x = ();
    || || || || || || || ||
    || || || || || || || ||
    || || || || || || || ||
    || || || || || || || ||

    || || || || || || || ||
    || || || || || || || ||
    || || || || || || || ||
    || || || || || || || ||

    || || || || || || || ||
    || || || || || || || ||
    || || || || || || || ||
    || || || || || || || ||
    [&(), &x];
}