diff options
Diffstat (limited to 'tests/ui/closures/deeply-nested_closures.rs')
-rw-r--r-- | tests/ui/closures/deeply-nested_closures.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/closures/deeply-nested_closures.rs b/tests/ui/closures/deeply-nested_closures.rs new file mode 100644 index 000000000..a02684ee1 --- /dev/null +++ b/tests/ui/closures/deeply-nested_closures.rs @@ -0,0 +1,23 @@ +// Check that this can be compiled in a reasonable time. + +// build-pass + +fn main() { + // 96 nested closures + let x = (); + || || || || || || || || + || || || || || || || || + || || || || || || || || + || || || || || || || || + + || || || || || || || || + || || || || || || || || + || || || || || || || || + || || || || || || || || + + || || || || || || || || + || || || || || || || || + || || || || || || || || + || || || || || || || || + [&(), &x]; +} |