summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/deeply-nested_closures.rs
blob: a02684ee1de1ee0bb75b121cf2b93567918ab4b2 (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];
}